diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c9847e..caa0aeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: ["3.8"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -38,13 +38,16 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v1 + id: cpu-cores - name: Install dependencies run: | python -m pip install --upgrade pip @@ -52,15 +55,15 @@ jobs: pip install -e .[dev] - name: Download test data run: python data/download_test_files.py > /dev/null - - name: Test with pytest + - name: Test with pytest (compiled) run: | PHASESPACE_EAGER=0 pytest --basetemp={envtmpdir} tests cd docs - PHASESPACE_EAGER=0 pytest --nbval-lax --ignore=.ipynb_checkpoints + PHASESPACE_EAGER=0 pytest --dist loadscope --nbval-lax --ignore=.ipynb_checkpoints -n${{ steps.cpu-cores.outputs.count }} cd .. - name: Test with pytest (eager mode) run: | PHASESPACE_EAGER=1 pytest --basetemp={envtmpdir} tests cd docs - PHASESPACE_EAGER=1 pytest --nbval-lax --ignore=.ipynb_checkpoints + PHASESPACE_EAGER=1 pytest --dist loadscope --nbval-lax --ignore=.ipynb_checkpoints -n${{ steps.cpu-cores.outputs.count }} cd .. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ee7ca8..fa4cb54 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: check-ast - repo: https://github.com/PyCQA/docformatter - rev: v1.7.3 + rev: v1.7.5 hooks: - id: docformatter args: @@ -52,10 +52,10 @@ repos: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.9.0 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] - repo: https://github.com/mgedmin/check-manifest rev: "0.49" @@ -70,12 +70,12 @@ repos: args: ["--futures=true"] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.9-for-vscode + rev: v3.0.0 hooks: - id: prettier diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 83609d9..4e6e4f2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,10 @@ Requirement changes Thanks ------ +1.9.0 (20 Jul 2023) +=================== + +Add support for Python 3.11, drop support for 3.7 1.8.0 (27 Jan 2023) =================== diff --git a/phasespace/__init__.py b/phasespace/__init__.py index cb74534..b24e664 100644 --- a/phasespace/__init__.py +++ b/phasespace/__init__.py @@ -1,10 +1,6 @@ """Top-level package for TensorFlow PhaseSpace.""" -import sys -if sys.version_info < (3, 8): - from importlib_metadata import PackageNotFoundError, version -else: - from importlib.metadata import PackageNotFoundError, version +from importlib.metadata import PackageNotFoundError, version try: __version__ = version("phasespace") diff --git a/phasespace/fromdecay/__init__.py b/phasespace/fromdecay/__init__.py index 2e2ab21..7bc4572 100644 --- a/phasespace/fromdecay/__init__.py +++ b/phasespace/fromdecay/__init__.py @@ -20,7 +20,6 @@ file=sys.stderr, ) from error - __all__ = ("GenMultiDecay",) diff --git a/setup.cfg b/setup.cfg index 53e6cea..cf33993 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,10 +19,10 @@ classifiers = Operating System :: Unix Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Scientific/Engineering :: Physics keywords = TensorFlow, phasespace, HEP @@ -31,9 +31,8 @@ packages = find: setup_requires = setuptools_scm install_requires = - tensorflow>=2.7 - tensorflow_probability>=0.15,<=0.18 - importlib-metadata; python_version <"3.8.0" + tensorflow>=2.11.0 + tensorflow_probability>=0.19.0 python_requires = >=3.7 include_package_data = True testpaths = tests @@ -47,8 +46,8 @@ tensorflow = %(tf)s fromdecay = particle >= 0.16.0 - zfit >=0.10.0 - zfit-physics >= 0.3 + zfit >=0.12.0 + zfit-physics >= 0.6 decaylanguage >= 0.12.0 # not required but everyone using this feature will likely use DecayLanguage test = %(fromdecay)s