Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-particle for openSUSE:Factory
checked in at 2023-07-03 17:44:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-particle (Old)
and /work/SRC/openSUSE:Factory/.python-particle.new.13546 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-particle"
Mon Jul 3 17:44:24 2023 rev:15 rq:1096570 version:0.22.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-particle/python-particle.changes
2023-05-05 15:58:27.496488410 +0200
+++
/work/SRC/openSUSE:Factory/.python-particle.new.13546/python-particle.changes
2023-07-03 17:44:42.109395537 +0200
@@ -1,0 +2,15 @@
+Mon Jul 3 11:02:10 UTC 2023 - Atri Bhattacharya <[email protected]>
+
+- Update to version 0.22.1:
+ * Particle class and submodules: Added support for providing
+ spin for SUSY particles, with tests.
+ * Tests: Test added for particles that should be assigned None
+ masses.
+- Add python-particle.rpmlintrc to disable some
+ "python-missing-requires" false positives.
+- Update deps:
+ * Drop BuildRequires: python-importlib-metadata as no longer
+ needed for python < 3.9
+ * Add Requires: python-Deprecated.
+
+-------------------------------------------------------------------
Old:
----
particle-0.22.0.tar.gz
New:
----
particle-0.22.1.tar.gz
python-particle.rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-particle.spec ++++++
--- /var/tmp/diff_new_pack.6eqsWd/_old 2023-07-03 17:44:42.833399800 +0200
+++ /var/tmp/diff_new_pack.6eqsWd/_new 2023-07-03 17:44:42.837399823 +0200
@@ -20,12 +20,13 @@
%define skip_python2 1
%define skip_python36 1
Name: python-particle
-Version: 0.22.0
+Version: 0.22.1
Release: 0
Summary: PDG particle data and identification codes
License: BSD-3-Clause
URL: https://github.com/scikit-hep/particle
Source0:
https://files.pythonhosted.org/packages/source/p/particle/%{modname}-%{version}.tar.gz
+Source1: python-particle.rpmlintrc
BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
@@ -34,6 +35,7 @@
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
+Requires: python-Deprecated
Requires: python-attrs >= 19.2
Requires: python-hepunits >= 2.0.0
Recommends: python-pandas
@@ -42,7 +44,6 @@
# SECTION For tests
BuildRequires: %{python_module Deprecated}
BuildRequires: %{python_module hepunits}
-BuildRequires: %{python_module importlib_resources}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest}
# /SECTION
++++++ particle-0.22.0.tar.gz -> particle-0.22.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/.github/workflows/cd.yml
new/particle-0.22.1/.github/workflows/cd.yml
--- old/particle-0.22.0/.github/workflows/cd.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/particle-0.22.1/.github/workflows/cd.yml 2020-02-02
01:00:00.000000000 +0100
@@ -36,7 +36,7 @@
with:
fetch-depth: 0
- - uses: wntrblm/[email protected]
+ - uses: wntrblm/[email protected]
- name: Make ZipApp
run: nox -s zipapp
@@ -58,7 +58,7 @@
name: artifact
path: dist
- - uses: pypa/[email protected]
+ - uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/.github/workflows/ci.yml
new/particle-0.22.1/.github/workflows/ci.yml
--- old/particle-0.22.0/.github/workflows/ci.yml 2020-02-02
01:00:00.000000000 +0100
+++ new/particle-0.22.1/.github/workflows/ci.yml 2020-02-02
01:00:00.000000000 +0100
@@ -96,7 +96,7 @@
with:
fetch-depth: 0
- - uses: wntrblm/[email protected]
+ - uses: wntrblm/[email protected]
- name: Make ZipApp
run: nox -s zipapp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/.pre-commit-config.yaml
new/particle-0.22.1/.pre-commit-config.yaml
--- old/particle-0.22.0/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000
+0100
+++ new/particle-0.22.1/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000
+0100
@@ -19,18 +19,18 @@
- id: end-of-file-fixer
- repo: https://github.com/psf/black
- rev: 23.1.0
+ rev: 23.3.0
hooks:
- id: black-jupyter
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: "v0.0.257"
+ rev: "v0.0.270"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.1.1
+ rev: v1.3.0
hooks:
- id: mypy
files: src
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/PKG-INFO new/particle-0.22.1/PKG-INFO
--- old/particle-0.22.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/particle-0.22.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: particle
-Version: 0.22.0
+Version: 0.22.1
Summary: Extended PDG particle data and MC identification codes
Project-URL: Homepage, https://github.com/scikit-hep/particle
Author-email: Eduardo Rodrigues <[email protected]>, Henry Schreiner
<[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/docs/CHANGELOG.md
new/particle-0.22.1/docs/CHANGELOG.md
--- old/particle-0.22.0/docs/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
+++ new/particle-0.22.1/docs/CHANGELOG.md 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,18 @@
Changelog
=========
+Version 0.22.1
+--------------
+
+June 12th, 2023
+
+- `Particle` class and submodules:
+ - Added support for providing spin for SUSY particles, with tests.
+- Tests:
+ - Test added for particles that should be assigned None masses.
+ - Updates to pre-commit hooks.
+
+
Version 0.22.0
--------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/src/particle/particle/convert.py
new/particle-0.22.1/src/particle/particle/convert.py
--- old/particle-0.22.0/src/particle/particle/convert.py 2020-02-02
01:00:00.000000000 +0100
+++ new/particle-0.22.1/src/particle/particle/convert.py 2020-02-02
01:00:00.000000000 +0100
@@ -230,9 +230,9 @@
inplace=True,
)
pdg_table_inv.Latex = (
- pdg_table_inv.Latex.str.replace(r"+", r"%", regex=True)
- .str.replace(r"-", r"+")
- .str.replace(r"%", r"-")
+ pdg_table_inv.Latex.str.replace(r"+", r"%", regex=False)
+ .str.replace(r"-", r"+", regex=False)
+ .str.replace(r"%", r"-", regex=False)
)
# Make a combined table with + and - ID numbers
@@ -385,7 +385,6 @@
# 30221 - the f(0)(1370) since it was renumbered
# 100223 - the omega(1420) since it was renumbered
# 5132 and 5232 - the Xi_b baryons got their IDs swapped at some stage
- # 30553 - the Upsilon(2)(1D) was wrongly assigned its ID, and has been
renumbered
full_table.drop([30221, 100223, 5132, 5232], axis=0, inplace=True)
# No longer write out the particle2008.csv file, which nobody should use
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/src/particle/pdgid/functions.py
new/particle-0.22.1/src/particle/pdgid/functions.py
--- old/particle-0.22.0/src/particle/pdgid/functions.py 2020-02-02
01:00:00.000000000 +0100
+++ new/particle-0.22.1/src/particle/pdgid/functions.py 2020-02-02
01:00:00.000000000 +0100
@@ -703,17 +703,27 @@
return None
if _fundamental_id(pdgid) > 0:
fund = _fundamental_id(pdgid)
- if 0 < fund < 7: # 4th generation quarks not dealt with !
- return 2
- if (
- fund == 9
- ): # Alternative ID for the gluon in codes for glueballs to allow a
notation in close analogy with that of hadrons
- return 3
- if 10 < fund < 17: # 4th generation leptons not dealt with !
- return 2
- if 20 < fund < 25:
- return 3
- return None
+ if is_SUSY(pdgid): # susy particles
+ if 0 < fund < 17:
+ return 1
+ if fund == 21:
+ return 2
+ if 22 <= fund < 38:
+ return 2
+ if fund == 39:
+ return 4
+ else: # other particles
+ if 0 < fund < 7: # 4th generation quarks not dealt with !
+ return 2
+ if (
+ fund == 9
+ ): # Alternative ID for the gluon in codes for glueballs to allow
a notation in close analogy with that of hadrons
+ return 3
+ if 10 < fund < 17: # 4th generation leptons not dealt with !
+ return 2
+ if 20 < fund < 25:
+ return 3
+ return None
if abs(int(pdgid)) in {1000000010, 1000010010}: # neutron, proton
return 2
if _extra_bits(pdgid) > 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/src/particle/version.py
new/particle-0.22.1/src/particle/version.py
--- old/particle-0.22.0/src/particle/version.py 2020-02-02 01:00:00.000000000
+0100
+++ new/particle-0.22.1/src/particle/version.py 2020-02-02 01:00:00.000000000
+0100
@@ -1,4 +1,4 @@
# file generated by setuptools_scm
# don't change, don't track in version control
-__version__ = version = '0.22.0'
-__version_tuple__ = version_tuple = (0, 22, 0)
+__version__ = version = '0.22.1'
+__version_tuple__ = version_tuple = (0, 22, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/tests/conftest.py
new/particle-0.22.1/tests/conftest.py
--- old/particle-0.22.0/tests/conftest.py 2020-02-02 01:00:00.000000000
+0100
+++ new/particle-0.22.1/tests/conftest.py 2020-02-02 01:00:00.000000000
+0100
@@ -112,6 +112,8 @@
Gravitino = 1000039
STildeL = 1000003
CTildeR = 2000004
+ Neutralino_1 = 1000022
+ Chargino_1 = 1000024
# R-hadrons
R0_1000017 = 1000017
RPlus_TTildeDbar = 1000612
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/tests/particle/test_generation.py
new/particle-0.22.1/tests/particle/test_generation.py
--- old/particle-0.22.0/tests/particle/test_generation.py 2020-02-02
01:00:00.000000000 +0100
+++ new/particle-0.22.1/tests/particle/test_generation.py 2020-02-02
01:00:00.000000000 +0100
@@ -15,6 +15,23 @@
from particle import data
from particle.particle import Particle
from particle.particle.convert import produce_files
+from particle.pdgid import (
+ is_diquark,
+ is_dyon,
+ is_excited_quark_or_lepton,
+ is_generator_specific,
+ is_lepton,
+ is_meson,
+ is_pentaquark,
+ is_Qball,
+ is_quark,
+ is_Rhadron,
+ is_sm_lepton,
+ is_special_particle,
+ is_SUSY,
+ is_technicolor,
+ three_charge,
+)
FILES = ["particle2021.csv", "particle2022.csv"]
@@ -60,6 +77,42 @@
assert p[p.Latex == ""].empty
+def test_None_masses():
+ "Only certain specific particles should have None masses."
+ none_masses = {
+ 100321,
+ -100321, # K(1460)+
+ }
+ for p in Particle.all():
+ pdgid = p.pdgid
+ if pdgid in none_masses:
+ continue
+
+ if (
+ is_Qball(pdgid)
+ or is_Rhadron(pdgid)
+ or is_SUSY(pdgid)
+ or is_diquark(pdgid)
+ or is_dyon(pdgid)
+ or is_excited_quark_or_lepton(pdgid)
+ or is_generator_specific(pdgid)
+ or (is_lepton(pdgid) and three_charge(pdgid) == 0)
+ or (is_lepton(pdgid) and not is_sm_lepton(pdgid)) # neutrinos
+ or ( # 4-th generation leptons
+ is_meson(pdgid) and (abs(pdgid) // 1000000 % 10 == 9)
+ )
+ or is_pentaquark( # Mesons with PDGIDs of the kind 9XXXXXX are
not experimentally well-known
+ pdgid
+ )
+ or is_quark(pdgid)
+ or is_special_particle(pdgid)
+ or is_technicolor(pdgid)
+ ):
+ continue
+
+ assert p.mass is not None
+
+
check_nucleons = (
(2212, 1000010010),
(-2212, -1000010010),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/particle-0.22.0/tests/pdgid/test_functions.py
new/particle-0.22.1/tests/pdgid/test_functions.py
--- old/particle-0.22.0/tests/pdgid/test_functions.py 2020-02-02
01:00:00.000000000 +0100
+++ new/particle-0.22.1/tests/pdgid/test_functions.py 2020-02-02
01:00:00.000000000 +0100
@@ -431,6 +431,8 @@
PDGIDs.Gravitino,
PDGIDs.STildeL,
PDGIDs.CTildeR,
+ PDGIDs.Chargino_1,
+ PDGIDs.Neutralino_1,
PDGIDs.R0_1000017,
)
_non_susy = [pid for pid in PDGIDs if pid not in _susy]
@@ -611,6 +613,7 @@
PDGIDs.AntiElectronStar,
PDGIDs.STildeL,
PDGIDs.CTildeR,
+ PDGIDs.Chargino_1,
PDGIDs.AntiCHadron,
PDGIDs.R0_1000017,
)
@@ -767,7 +770,8 @@
def test_J_non_mesons(PDGIDs):
# TODO: test special particles, supersymmetric particles, R-hadrons,
di-quarks, nuclei and pentaquarks
- _J_eq_0 = ()
+ _J_eq_0 = (PDGIDs.STildeL, PDGIDs.CTildeR)
+
_J_eq_1 = (
PDGIDs.Gluon,
PDGIDs.Photon,
@@ -803,10 +807,11 @@
PDGIDs.LcPlus,
PDGIDs.Lb,
PDGIDs.LtPlus,
- PDGIDs.STildeL,
- PDGIDs.CTildeR,
+ PDGIDs.Gluino,
+ PDGIDs.Neutralino_1,
+ PDGIDs.Chargino_1,
)
- _J_eq_3over2 = (PDGIDs.OmegaMinus,)
+ _J_eq_3over2 = (PDGIDs.OmegaMinus, PDGIDs.Gravitino)
_invalid_pdgids = (PDGIDs.Invalid1, PDGIDs.Invalid2)
# cases not dealt with in the code, where None is returned
_J_eq_None = (PDGIDs.TauPrime, PDGIDs.BPrimeQuark, PDGIDs.TPrimeQuark)
++++++ python-particle.rpmlintrc ++++++
# rpmlint cannot read conditionalised python modules
## only needed for python < 3.9
addFilter("W: python-missing-require importlib-resources")
## only needed for python < 3.8
addFilter("W: python-missing-require typing-extensions")