diff --git a/docs/api.rst b/docs/api.rst index 4ad8519cd5..73ba56f9fb 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -48,7 +48,6 @@ Making Models from PDFs ~patchset.Patch simplemodels.uncorrelated_background simplemodels.correlated_background - simplemodels.hepdata_like Backends -------- diff --git a/src/pyhf/simplemodels.py b/src/pyhf/simplemodels.py index b8c479b1c5..8ec2a6b433 100644 --- a/src/pyhf/simplemodels.py +++ b/src/pyhf/simplemodels.py @@ -151,20 +151,3 @@ def _deprecated_api_warning( DeprecationWarning, stacklevel=3, # Raise to user level ) - - -def hepdata_like(signal_data, bkg_data, bkg_uncerts, batch_size=None): - """ - .. note:: Deprecated API: Use :func:`~pyhf.simplemodels.uncorrelated_background` - instead. - - .. warning:: :func:`~pyhf.simplemodels.hepdata_like` will be removed in - ``pyhf`` ``v0.7.0``. - """ - _deprecated_api_warning( - "pyhf.simplemodels.hepdata_like", - "pyhf.simplemodels.uncorrelated_background", - "0.6.2", - "0.7.0", - ) - return uncorrelated_background(signal_data, bkg_data, bkg_uncerts, batch_size) diff --git a/tests/test_simplemodels.py b/tests/test_simplemodels.py index 51dfe60c47..3ff8b75beb 100644 --- a/tests/test_simplemodels.py +++ b/tests/test_simplemodels.py @@ -1,5 +1,3 @@ -import warnings - import pytest import pyhf @@ -76,17 +74,3 @@ def test_uncorrelated_background_default_backend(default_backend): 'uncorr_bkguncrt[1]', ] assert model.config.suggested_init() == [1.0, 1.0, 1.0] - - -# TODO: Remove when pyhf.simplemodels.hepdata_like is removed in pyhf v0.7.0 -def test_deprecated_apis(): - with warnings.catch_warnings(record=True) as _warning: - # Cause all warnings to always be triggered - warnings.simplefilter("always") - pyhf.simplemodels.hepdata_like([12.0, 11.0], [50.0, 52.0], [3.0, 7.0]) - assert len(_warning) == 1 - assert issubclass(_warning[-1].category, DeprecationWarning) - assert ( - "pyhf.simplemodels.hepdata_like is deprecated in favor of pyhf.simplemodels.uncorrelated_background" - in str(_warning[-1].message) - )