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

[pre-commit.ci] pre-commit autoupdate #163

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=1000' ]
Expand All @@ -26,7 +26,7 @@ repos:
args: [ --update, --no-build-isolation ]
additional_dependencies: [ setuptools-scm, setuptools-scm-git-archive ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.2
hooks:
- id: mypy
files: src
Expand All @@ -46,7 +46,7 @@ repos:
- id: rst-directive-colons

- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: [ --py38-plus ]
Expand All @@ -59,7 +59,7 @@ repos:

# Notebook formatting
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.8.7
hooks:

- id: nbqa-pyupgrade
Expand All @@ -85,7 +85,7 @@ repos:
- id: rm-unneeded-f-str

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
rev: 0.29.3
hooks:
- id: check-github-workflows
- id: check-github-actions
Expand All @@ -98,7 +98,7 @@ repos:
- id: auto-walrus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.0"
rev: "v0.6.9"
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
Expand Down
5 changes: 3 additions & 2 deletions notebooks/hypotests/FC_interval_asy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from zfit.loss import UnbinnedNLL\n",
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import ConfidenceInterval\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.exceptions import POIRangeError\n",
"from hepstats.hypotests.parameters import POIarray\n",
"from zfit.loss import UnbinnedNLL\n",
"from zfit.minimize import Minuit\n",
"\n",
"zfit.settings.set_seed(10)"
]
Expand Down
5 changes: 3 additions & 2 deletions notebooks/hypotests/FC_interval_freq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from zfit.loss import UnbinnedNLL\n",
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import ConfidenceInterval\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.exceptions import POIRangeError\n",
"from hepstats.hypotests.parameters import POIarray\n",
"from zfit.loss import UnbinnedNLL\n",
"from zfit.minimize import Minuit\n",
"\n",
"zfit.settings.set_seed(10)"
]
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/confidenceinterval_asy_zfit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import ConfidenceInterval\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.parameters import POIarray\n",
"from utils import one_minus_cl_plot, plotfitresult, pltdist\n",
"from zfit.loss import ExtendedUnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import ConfidenceInterval\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.parameters import POIarray"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/confidenceinterval_freq_zfit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import ConfidenceInterval\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POIarray\n",
"from utils import one_minus_cl_plot, plotfitresult, pltdist\n",
"from zfit.loss import ExtendedUnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import ConfidenceInterval\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POIarray"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/counting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import Discovery, UpperLimit\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator, FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POI, POIarray\n",
"from utils import plotlimit\n",
"from zfit.loss import UnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import Discovery, UpperLimit\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator, FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POI, POIarray"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/discovery_asy_zfit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import Discovery\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.parameters import POI\n",
"from utils import plotfitresult, pltdist\n",
"from zfit.loss import ExtendedUnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import Discovery\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.parameters import POI"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/discovery_freq_zfit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import Discovery\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POI\n",
"from utils import plotfitresult, pltdist\n",
"from zfit.loss import ExtendedUnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import Discovery\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POI"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/upperlimit_asy_zfit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import UpperLimit\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.parameters import POI, POIarray\n",
"from utils import plotfitresult, plotlimit, pltdist\n",
"from zfit.loss import ExtendedUnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import UpperLimit\n",
"from hepstats.hypotests.calculators import AsymptoticCalculator\n",
"from hepstats.hypotests.parameters import POI, POIarray"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions notebooks/hypotests/upperlimit_freq_zfit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import zfit\n",
"from hepstats.hypotests import UpperLimit\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POI, POIarray\n",
"from utils import plotfitresult, plotlimit, pltdist\n",
"from zfit.loss import ExtendedUnbinnedNLL\n",
"from zfit.minimize import Minuit"
"from zfit.minimize import Minuit\n",
"\n",
"from hepstats.hypotests import UpperLimit\n",
"from hepstats.hypotests.calculators import FrequentistCalculator\n",
"from hepstats.hypotests.parameters import POI, POIarray"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions notebooks/modeling/bayesian_blocks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"from hepstats.modeling import bayesian_blocks\n",
"\n",
"%matplotlib inline"
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def pytest_addoption(parser):
)


@pytest.fixture()
@pytest.fixture
def cmdopt(request):
return request.config.getoption("--cmdopt")

Expand Down Expand Up @@ -91,6 +91,6 @@ def create_loss_func(npeak, nbins=None):
return loss, (Nsig, Nbkg, mean, sigma)


@pytest.fixture()
@pytest.fixture
def create_loss():
return create_loss_func
Loading