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-12-12 19:32:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-particle (Old) and /work/SRC/openSUSE:Factory/.python-particle.new.25432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-particle" Tue Dec 12 19:32:40 2023 rev:17 rq:1132678 version:0.23.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-particle/python-particle.changes 2023-07-12 17:27:04.546398000 +0200 +++ /work/SRC/openSUSE:Factory/.python-particle.new.25432/python-particle.changes 2023-12-12 19:33:09.474515061 +0100 @@ -1,0 +2,7 @@ +Tue Dec 12 13:25:58 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 0.23.1: + * Modernisation of Ruff configuration in pyproject.toml. + * Updates to pre-commit hooks and CI YAML files. + +------------------------------------------------------------------- Old: ---- particle-0.23.0.tar.gz New: ---- particle-0.23.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-particle.spec ++++++ --- /var/tmp/diff_new_pack.AwcaVG/_old 2023-12-12 19:33:09.922531591 +0100 +++ /var/tmp/diff_new_pack.AwcaVG/_new 2023-12-12 19:33:09.922531591 +0100 @@ -20,7 +20,7 @@ %define skip_python2 1 %define skip_python36 1 Name: python-particle -Version: 0.23.0 +Version: 0.23.1 Release: 0 Summary: PDG particle data and identification codes License: BSD-3-Clause ++++++ particle-0.23.0.tar.gz -> particle-0.23.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/.github/workflows/cd.yml new/particle-0.23.1/.github/workflows/cd.yml --- old/particle-0.23.0/.github/workflows/cd.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/.github/workflows/cd.yml 2020-02-02 01:00:00.000000000 +0100 @@ -14,7 +14,7 @@ dist: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -32,7 +32,7 @@ name: ZipApp runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/.github/workflows/ci.yml new/particle-0.23.1/.github/workflows/ci.yml --- old/particle-0.23.0/.github/workflows/ci.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/.github/workflows/ci.yml 2020-02-02 01:00:00.000000000 +0100 @@ -7,12 +7,15 @@ branches: - master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-python@v4 @@ -41,7 +44,7 @@ - {os: windows-latest, python-version: '3.11'} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -64,13 +67,13 @@ - name: Test docstrings with doctest if: "runner.os == 'Linux' && matrix.python-version == 3.11" - run: python -m pytest --doctest-modules src/particle --ignore-glob="src/particle/particle/convert.py" + run: python -m pytest --doctest-modules src/particle --ignore=src/particle/particle/convert.py notebooks: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -92,7 +95,7 @@ name: ZipApp runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/.pre-commit-config.yaml new/particle-0.23.1/.pre-commit-config.yaml --- old/particle-0.23.0/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 @@ -4,7 +4,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files args: ['--maxkb=1000'] @@ -18,27 +18,24 @@ - id: debug-statements - id: end-of-file-fixer -- repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black-jupyter - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.0.276" + rev: "v0.1.6" hooks: - id: ruff args: ["--fix", "--show-fixes"] + - id: ruff-format + types_or: [python, pyi, jupyter] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.4.1 + rev: v1.7.1 hooks: - id: mypy files: src - additional_dependencies: [attrs==21.4.0, hepunits>=2.2.0, importlib_resources, types-deprecated] + additional_dependencies: [attrs==21.4.0, hepunits>=2.2.0, importlib_resources] args: [--show-error-codes] - repo: https://github.com/codespell-project/codespell - rev: v2.2.5 + rev: v2.2.6 hooks: - id: codespell exclude: ^(src/particle/data/.*\.csv|src/particle/data/.*\.fwf)$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/PKG-INFO new/particle-0.23.1/PKG-INFO --- old/particle-0.23.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: particle -Version: 0.23.0 +Version: 0.23.1 Summary: Extended PDG particle data and MC identification codes Project-URL: Homepage, https://github.com/scikit-hep/particle Author-email: Eduardo Rodrigues <eduardo.rodrig...@cern.ch>, Henry Schreiner <henr...@princeton.edu> @@ -23,10 +23,9 @@ Classifier: Topic :: Scientific/Engineering Requires-Python: >=3.7 Requires-Dist: attrs>=19.2 -Requires-Dist: deprecated Requires-Dist: hepunits>=2.0.0 Requires-Dist: importlib-resources>=2.0; python_version < '3.9' -Requires-Dist: typing-extensions; python_version < '3.8' +Requires-Dist: typing-extensions>=4.5; python_version < '3.13' Provides-Extra: dev Requires-Dist: pandas; extra == 'dev' Requires-Dist: pytest-benchmark; extra == 'dev' @@ -49,7 +48,7 @@ |Scikit-HEP| |PyPI version| |Conda-forge version| |Zenodo DOI| -|GitHub Actions Status: CI| |Code Coverage| |Code style: black| +|GitHub Actions Status: CI| |Code Coverage| |Binder| @@ -452,7 +451,7 @@ Getting started: experiment-specific modules -------------------------------------------- -Experiment-specific submodules are welcome if they tie in nicely with the functionality of the package while prodiving +Experiment-specific submodules are welcome if they tie in nicely with the functionality of the package while providing add-ons of particular relevance to experiments. LHCb-specific module @@ -531,8 +530,5 @@ .. |Code Coverage| image:: https://codecov.io/gh/scikit-hep/particle/graph/badge.svg?branch=master :target: https://codecov.io/gh/scikit-hep/particle?branch=master -.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - .. |Binder| image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gh/scikit-hep/particle/master?urlpath=lab/tree/notebooks/ParticleDemo.ipynb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/README.rst new/particle-0.23.1/README.rst --- old/particle-0.23.0/README.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/README.rst 2020-02-02 01:00:00.000000000 +0100 @@ -7,7 +7,7 @@ |Scikit-HEP| |PyPI version| |Conda-forge version| |Zenodo DOI| -|GitHub Actions Status: CI| |Code Coverage| |Code style: black| +|GitHub Actions Status: CI| |Code Coverage| |Binder| @@ -410,7 +410,7 @@ Getting started: experiment-specific modules -------------------------------------------- -Experiment-specific submodules are welcome if they tie in nicely with the functionality of the package while prodiving +Experiment-specific submodules are welcome if they tie in nicely with the functionality of the package while providing add-ons of particular relevance to experiments. LHCb-specific module @@ -489,8 +489,5 @@ .. |Code Coverage| image:: https://codecov.io/gh/scikit-hep/particle/graph/badge.svg?branch=master :target: https://codecov.io/gh/scikit-hep/particle?branch=master -.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - .. |Binder| image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gh/scikit-hep/particle/master?urlpath=lab/tree/notebooks/ParticleDemo.ipynb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/admin/dump_pdgid_to_corsika7.py new/particle-0.23.1/admin/dump_pdgid_to_corsika7.py --- old/particle-0.23.0/admin/dump_pdgid_to_corsika7.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/admin/dump_pdgid_to_corsika7.py 2020-02-02 01:00:00.000000000 +0100 @@ -157,7 +157,7 @@ """ # Loop over all thinkable values and only add them if the PDG ID exists for a in range(2, 56 + 1): - for z in range(0, a + 1): + for z in range(a + 1): corsikaid = a * 100 + z with contextlib.suppress(ParticleNotFound): corsica_pdg_id.append( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/docs/CHANGELOG.md new/particle-0.23.1/docs/CHANGELOG.md --- old/particle-0.23.0/docs/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/docs/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,16 @@ Changelog ========= +Version 0.23.1 +-------------- + +December 1st, 2023 + +- Miscellaneous: + - Modernisation of Ruff configuration in pyproject.toml. +- CI and tests: + - Updates to pre-commit hooks and CI YAML files. + Version 0.23.0 -------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/pyproject.toml new/particle-0.23.1/pyproject.toml --- old/particle-0.23.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 @@ -43,8 +43,7 @@ "attrs>=19.2", "hepunits>=2.0.0", "importlib-resources>=2.0;python_version<\"3.9\"", - "typing-extensions;python_version<\"3.8\"", - "deprecated" + "typing-extensions>=4.5;python_version<\"3.13\"", ] dynamic = ["version"] @@ -78,7 +77,6 @@ python_version = "3.9" files = "src" strict = true -show_error_codes = true warn_unreachable = true enable_error_code = [ "ignore-without-code", @@ -99,6 +97,7 @@ testpaths = ["tests"] junit_family = "xunit2" log_cli_level = "info" +xfail_strict = true addopts = [ "--benchmark-disable", "-ra", @@ -144,9 +143,11 @@ [tool.ruff] -select = [ - "E", "F", "W", # flake8 - "B", "B904", # flake8-bugbear +src = ["src"] + +[tool.ruff.lint] +extend-select = [ + "B", # flake8-bugbear "I", # isort "ARG", # flake8-unused-arguments "C4", # flake8-comprehensions @@ -164,23 +165,23 @@ "YTT", # flake8-2020 ] ignore = [ - "B905", - "E402", - "E501", - "RUF001", # Ambiguous unicode - "RUF002", # Ambiguous unicode docstring - "PLR", # Design related pylint codes - "PT013", # Importing approx from pytest is fine -] -src = ["src"] -unfixable = [ - "T20", # Removes print statements - "F841", # Removes unused variables + "RUF001", # Ambiguous unicode + "RUF002", # Ambiguous unicode docstring + "PLR2004", # Magic value used in comparison + "PLR09", # Too many X + "ISC001", # Conflicts with the formatter + "E741", # Ambiguous variable name ] isort.required-imports = ["from __future__ import annotations"] +mccabe.max-complexity = 24 -[tool.ruff.mccabe] -max-complexity = 24 - -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "src/particle/__main__.py" = ["T20"] +"tests/**.py" = [ + "PT013", # Importing approx from pytest is fine + "E402", # Module level import not at top of file (doesn't recognise pytest.importorskip) +] + + +[tool.repo-review] +ignore = ["RTD"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/__init__.py new/particle-0.23.1/src/particle/__init__.py --- old/particle-0.23.0/src/particle/__init__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/__init__.py 2020-02-02 01:00:00.000000000 +0100 @@ -13,7 +13,17 @@ # Direct access to Particle literals # Direct access to Particle (the CSV file is not read until a particle is accessed) -from .particle import InvalidParticle, Particle, ParticleNotFound, literals +# Direct access to handy LaTeX to HTML particle name conversions +# Direct access to kinematics functions +from .particle import ( + InvalidParticle, + Particle, + ParticleNotFound, + latex_to_html_name, + lifetime_to_width, + literals, + width_to_lifetime, +) from .particle.enums import Charge, Inv, Parity, SpinType, Status # Direct access to PDGID and other ID classes @@ -23,12 +33,9 @@ # Convenient access to the version number from .version import version as __version__ +# Literals direct access sys.modules["particle.literals"] = literals -# Direct access to handy LaTeX to HTML particle name conversions -# Direct access to kinematics functions -from .particle import latex_to_html_name, lifetime_to_width, width_to_lifetime - __all__ = ( "Charge", "Corsika7ID", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/_compat/typing.py new/particle-0.23.1/src/particle/_compat/typing.py --- old/particle-0.23.0/src/particle/_compat/typing.py 1970-01-01 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/_compat/typing.py 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,28 @@ +# Copyright (c) 2018-2023, Eduardo Rodrigues and Henry Schreiner. +# +# Distributed under the 3-clause BSD license, see accompanying file LICENSE +# or https://github.com/scikit-hep/particle for details. + + +from __future__ import annotations + +import sys + +if sys.version_info < (3, 8): + from typing_extensions import Protocol, runtime_checkable +else: + from typing import Protocol, runtime_checkable + +if sys.version_info < (3, 9): + from importlib_resources.abc import Traversable +elif sys.version_info < (3, 11): + from importlib.abc import Traversable +else: + from importlib.resources.abc import Traversable + + +__all__ = ( + "Protocol", + "runtime_checkable", + "Traversable", +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/_compat/warnings.py new/particle-0.23.1/src/particle/_compat/warnings.py --- old/particle-0.23.0/src/particle/_compat/warnings.py 1970-01-01 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/_compat/warnings.py 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,10 @@ +from __future__ import annotations + +import sys + +if sys.version_info < (3, 13): + from typing_extensions import deprecated +else: + from warnings import deprecated + +__all__ = ["deprecated"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/particle/convert.py new/particle-0.23.1/src/particle/particle/convert.py --- old/particle-0.23.0/src/particle/particle/convert.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/particle/convert.py 2020-02-02 01:00:00.000000000 +0100 @@ -63,8 +63,9 @@ import pandas as pd from .. import data +from .._compat.typing import Traversable from ..pdgid import PDGID, is_baryon -from ..typing import StringOrIO, Traversable +from ..typing import StringOrIO from .enums import ( Charge, Charge_mapping, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/particle/particle.py new/particle-0.23.1/src/particle/particle/particle.py --- old/particle-0.23.0/src/particle/particle/particle.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/particle/particle.py 2020-02-02 01:00:00.000000000 +0100 @@ -15,14 +15,15 @@ # External dependencies import attr -from deprecated import deprecated from hepunits.constants import c_light from .. import data +from .._compat.typing import Traversable +from .._compat.warnings import deprecated from ..converters.evtgen import EvtGenName2PDGIDBiMap from ..pdgid import PDGID, is_valid from ..pdgid.functions import Location, _digit -from ..typing import HasOpen, HasRead, StringOrIO, Traversable +from ..typing import HasOpen, HasRead, StringOrIO from .enums import ( Charge, Charge_mapping, @@ -193,7 +194,7 @@ minus_one, converter=_none_or_positive_converter ) _three_charge: Charge | None = attr.ib(Charge.u, converter=Charge) # charge * 3 - I: float | None = attr.ib(none_float, converter=_isospin_converter) # noqa: E741 + I: float | None = attr.ib(none_float, converter=_isospin_converter) # J = attr.ib(None) # Total angular momentum G = attr.ib(Parity.u, converter=Parity) # Parity: '', +, -, or ? P = attr.ib(Parity.u, converter=Parity) # Space parity @@ -1240,8 +1241,7 @@ @classmethod @deprecated( - version="0.22", - reason="This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead.", + "This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead.", ) def from_string(cls: type[Self], name: str) -> Self: "Get a particle from a PDG style name - returns the best match." @@ -1252,8 +1252,7 @@ @classmethod @deprecated( - version="0.22", - reason="This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead.", + "This method is deprecated and will be removed from version 0.23.0. Use finditer or findall instead.", ) def from_string_list(cls: type[Self], name: str) -> list[Self]: "Get a list of particles from a PDG style name." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/typing.py new/particle-0.23.1/src/particle/typing.py --- old/particle-0.23.0/src/particle/typing.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/typing.py 2020-02-02 01:00:00.000000000 +0100 @@ -6,24 +6,11 @@ from __future__ import annotations -import sys from typing import Any, TextIO, Union -if sys.version_info < (3, 8): - from typing_extensions import Protocol, runtime_checkable -else: - from typing import Protocol, runtime_checkable - -if sys.version_info < (3, 9): - from importlib_resources.abc import Traversable -else: - from importlib.abc import Traversable - +from ._compat.typing import Protocol, Traversable, runtime_checkable __all__ = ( - "Protocol", - "runtime_checkable", - "Traversable", "StringOrIO", "HasOpen", "HasRead", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/src/particle/version.py new/particle-0.23.1/src/particle/version.py --- old/particle-0.23.0/src/particle/version.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/src/particle/version.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,4 +1,16 @@ # file generated by setuptools_scm # don't change, don't track in version control -__version__ = version = '0.23.0' -__version_tuple__ = version_tuple = (0, 23, 0) +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple, Union + VERSION_TUPLE = Tuple[Union[int, str], ...] +else: + VERSION_TUPLE = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE + +__version__ = version = '0.23.1' +__version_tuple__ = version_tuple = (0, 23, 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/particle-0.23.0/tests/pdgid/test_functions.py new/particle-0.23.1/tests/pdgid/test_functions.py --- old/particle-0.23.0/tests/pdgid/test_functions.py 2020-02-02 01:00:00.000000000 +0100 +++ new/particle-0.23.1/tests/pdgid/test_functions.py 2020-02-02 01:00:00.000000000 +0100 @@ -849,7 +849,7 @@ PDGIDs.HydrogenNucleus: 1, PDGIDs.Carbon12: 12, } - _non_nuclei = [pid for pid in PDGIDs if pid not in _nuclei.keys()] + _non_nuclei = [pid for pid in PDGIDs if pid not in _nuclei] for pid, a in _nuclei.items(): assert A(pid) == a for pid in _non_nuclei: @@ -863,7 +863,7 @@ PDGIDs.HydrogenNucleus: 1, PDGIDs.Carbon12: 6, } - _non_nuclei = [pid for pid in PDGIDs if pid not in _nuclei.keys()] + _non_nuclei = [pid for pid in PDGIDs if pid not in _nuclei] for pid, z in _nuclei.items(): assert Z(pid) == z for pid in _non_nuclei: