Skip to content

Commit

Permalink
Merge pull request #92 from zfit/py311
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle authored Jul 20, 2023
2 parents 0056233 + 75ce44b commit 81e06e4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -38,29 +38,32 @@ 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
sudo apt-get install graphviz -y
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 ..
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand All @@ -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

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
===================
Expand Down
6 changes: 1 addition & 5 deletions phasespace/__init__.py
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
1 change: 0 additions & 1 deletion phasespace/fromdecay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
file=sys.stderr,
) from error


__all__ = ("GenMultiDecay",)


Expand Down
11 changes: 5 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 81e06e4

Please sign in to comment.