scikit-hep / cabinetry

design and steer profile likelihood fits
https://cabinetry.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

feat: add Python 3.12 support #477

Closed matthewfeickert closed 2 months ago

matthewfeickert commented 2 months ago

Resolves #446

* docs: Add Python 3.12 PyPI trove classifier
* ci: Add Python 3.12 to CI
* ci: Add workflow dispatch trigger to CI
* ci: List installed Python packages
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (891fdb0) to head (15104b7).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #477 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 22 22 Lines 2093 2093 Branches 346 346 ========================================= Hits 2093 2093 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

matthewfeickert commented 2 months ago

The Python 3.12-only error that is currently being seen from iminuit

Error: ```pytb $ python utils/create_ntuples.py File "/home/runner/work/cabinetry/cabinetry/example.py", line 3, in import cabinetry File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/cabinetry/__init__.py", line 7, in import cabinetry.fit as fit # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/cabinetry/fit/__init__.py", line 6, in import iminuit File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/iminuit/__init__.py", line 24, in from iminuit.minuit import Minuit File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/iminuit/minuit.py", line 6, in from iminuit import util as mutil File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/iminuit/util.py", line 11, in from iminuit import _repr_html, _repr_text, _deprecated File "/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/iminuit/_deprecated.py", line 2, in from numpy import VisibleDeprecationWarning ImportError: cannot import name 'VisibleDeprecationWarning' from 'numpy' (/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/numpy/__init__.py) ```

is due to https://github.com/scikit-hep/iminuit/pull/977#issuecomment-2136430074, but is getting caused by the pre-release of numpy being picked up from https://github.com/scikit-hep/hist/issues/570. So this is a compound issue that would be fixed by a new hist release, but also shows that a new iminuit release would be nice.

matthewfeickert commented 2 months ago

@alexander-held this should be ready for review now given that hist v2.7.3 is released now.