-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use lower and upper to match scipy terms
Split warning for readability Add test for rtol warning Remove tmpdir fixture as not needed for these tests given no writing of output Add check for return_results More verbose fix: Correct concatenate lists instead of adding float to all list elements Test bounds expansion test: Update test_plot_results_no_axis baseline image (#2009) * matplotlib v3.6.0 results in a slightly different baseline image than matplotlib v3.5.x, so regenerate the baseline image using matplotlib v3.6.0 with `pytest --mpl-generate-path=tests/contrib/baseline tests/contrib/test_viz.py`. * Mark the test_plot_results_no_axis test as xfail for Python 3.7 as matplotlib v3.6.0 is Python 3.8+ and so the image is guaranteed to be different as Python 3.7 runtimes will install matplotlib v3.5.x. Add upperlimit_fixed_scan to API docs Add return_results test move to test_upperlimit_with_kwargs Move the pop out before evaluation to make everything very clean and clear Note what scan Rename to auto_scan docs: fix link Provide better coverage and use np.allclose docs: Add Beojan Stanislaus to contributor list change auto_scan to toms748_scan rename fixed_scan to linear_grid_scan Make intervals module and change API to upper_limit Rename to pyhf.infer.intervals.upper_limits get upper_limits.upper_limit working Also bring along old API limit to just upper_limit by default Rearrange feat: Add internal API to warn of deprecation and future removal * Add internal API pyhf.exceptions._deprecated_api_warning to alert users to API deprecation by raising a subclass of DeprecationWarning and future removal. * Add test for pyhf.exceptions._deprecated_api_warning to ensure it gets picked up as DeprecationWarning. Note deprecated API Seperate into condifence intervals section fix: Use function scope to avoid altering hypotest_args fixture Make test name explicit Use deprecated Sphinx note Add versionadded directives feat: Add internal API to warn of deprecation and future removal (#2012) * Add internal API pyhf.exceptions._deprecated_api_warning to alert users to API deprecation by raising a subclass of DeprecationWarning and future removal. * Add test for pyhf.exceptions._deprecated_api_warning to ensure it gets picked up as DeprecationWarning. Update lower bound on scipy as toms748 added in scipy v1.2.0
- Loading branch information
1 parent
19a2ee1
commit dffb458
Showing
15 changed files
with
258 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,4 @@ Contributors include: | |
- Aryan Roy | ||
- Jerry Ling | ||
- Nathan Simpson | ||
- Beojan Stanislaus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""Interval estimation""" | ||
import pyhf.infer.intervals.upper_limits | ||
|
||
__all__ = ["upper_limits.upper_limit"] | ||
|
||
|
||
def __dir__(): | ||
return __all__ | ||
|
||
|
||
def upperlimit( | ||
data, model, scan=None, level=0.05, return_results=False, **hypotest_kwargs | ||
): | ||
""" | ||
.. deprecated:: 0.7.0 | ||
Use :func:`~pyhf.infer.intervals.upper_limits.upper_limit` instead. | ||
.. warning:: :func:`~pyhf.infer.intervals.upperlimit` will be removed in | ||
``pyhf`` ``v0.9.0``. | ||
""" | ||
from pyhf.exceptions import _deprecated_api_warning | ||
|
||
_deprecated_api_warning( | ||
"pyhf.infer.intervals.upperlimit", | ||
"pyhf.infer.intervals.upper_limits.upper_limit", | ||
"0.7.0", | ||
"0.9.0", | ||
) | ||
return pyhf.infer.intervals.upper_limits.upper_limit( | ||
data, model, scan, level, return_results, **hypotest_kwargs | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.