Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Update lower bound of pyhf to v0.7.0 #367

Merged
merged 5 commits into from
Sep 25, 2022

Conversation

matthewfeickert
Copy link
Member

Following the release of pyhf v0.7.0, update to the latest API and update the lower bounds.

* Update lower bound of pyhf to v0.7.0
* Update all usage of `.par_names()` to `par_names`

@matthewfeickert matthewfeickert added the enhancement New feature or request label Sep 24, 2022
@matthewfeickert matthewfeickert self-assigned this Sep 24, 2022
@matthewfeickert
Copy link
Member Author

I can fix this later (unless Alex beats me to it).

@alexander-held
Copy link
Member

Thanks! #366 is needed first for CI to pass, I'll get that resolved and then we can get this in too.

setup.cfg Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 25, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (4ec9480) compared to base (278d088).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #367   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2023      2023           
  Branches       331       331           
=========================================
  Hits          2023      2023           
Impacted Files Coverage Δ
src/cabinetry/fit/__init__.py 100.00% <100.00%> (ø)
src/cabinetry/model_utils.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-held
Copy link
Member

alexander-held commented Sep 25, 2022

There is also an unrelated new issue in the 3.7 CI when building the documentation (which should work in principle):

Theme error:
An error happened in rendering the page advanced.
Reason: ValueError('too many values to unpack (expected 3)')

I'll have a look at that.

edit: This is readthedocs/sphinx_rtd_theme#1343, I'll fix that too in #366.

@alexander-held
Copy link
Member

For completeness, the related API change for .par_names is scikit-hep/pyhf#2027.

setup.cfg Outdated Show resolved Hide resolved
Copy link
Member

@alexander-held alexander-held left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! The pre-commit CI failed once with a strange mypy report related to numpy, but that must have been some glitch as re-running fixes it and I have no idea what could have broken there anyway:

mypy with Python 3.7.....................................................Failed
- hook id: mypy
- exit code: 2

src/cabinetry/templates/postprocessor.py:8: note: In module imported here:
/home/runner/.cache/pre-commit/repoqtujrd41/py_env-python3.10/lib/python3.10/site-packages/numpy/__init__.pyi:636: error:
Positional-only parameters are only supported in Python 3.8 and greater 
[syntax]
        def seek(self, offset: int, whence: int, /) -> object: ...
                                                   ^
Found 1 error in 1 file (errors prevented further checking)

mypy with Python 3.10....................................................Failed
- hook id: mypy
- exit code: 2

src/cabinetry/templates/postprocessor.py:8: note: In module imported here:
/home/runner/.cache/pre-commit/repoqtujrd41/py_env-python3.10/lib/python3.10/site-packages/numpy/__init__.pyi:636: error:
Positional-only parameters are only supported in Python 3.8 and greater 
[syntax]
        def seek(self, offset: int, whence: int, /) -> object: ...
                                                   ^
Found 1 error in 1 file (errors prevented further checking)

This PR also undoes the temporary pyhf pinning introduced in #366 to make CI pass.

* Update lower bound of pyhf to v0.7.0
* Update model.config.par_names() to model.config.par_names due to pyhf API change

@alexander-held alexander-held merged commit 6f15371 into master Sep 25, 2022
@alexander-held alexander-held deleted the feat/update-to-pyhf-v0.7.0 branch September 25, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants