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 #52

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
rev: 23.3.0
hooks:
- id: black-jupyter

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -19,7 +19,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
Expand All @@ -31,29 +31,29 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.0
rev: v3.8.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
rev: v2.4.0
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1
rev: v2.1.5
hooks:
- id: pycln
args: [--config=pyproject.toml]

- repo: https://github.com/asottile/yesqa
rev: v1.4.0
rev: v1.5.0
hooks:
- id: yesqa
exclude: docs/conf.py
Expand All @@ -62,20 +62,20 @@ repos:
- flake8-print

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
exclude: docs/conf.py
additional_dependencies: *flake8_dependencies

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v1.4.1
hooks:
- id: mypy
files: src

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
rev: v0.9.0.5
hooks:
- id: shellcheck

Expand All @@ -88,7 +88,7 @@ repos:
exclude: .pre-commit-config.yaml

- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
rev: "0.49"
hooks:
- id: check-manifest
stages: [manual]
3 changes: 3 additions & 0 deletions examples/binning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@
"num_bins = 5\n",
"pars = jnp.linspace(0, 8, num_bins + 1)\n",
"\n",
"\n",
"# differentiable significance pipeline\n",
"def asimov_pipe(bins, s, b, bandwidth=1e-2):\n",
" # restrict bin edges so they don't overlap during optimisation\n",
Expand Down Expand Up @@ -1394,6 +1395,7 @@
"\n",
"from copy import deepcopy\n",
"\n",
"\n",
"# specify the workspace for a simple model with a three-point background systematic\n",
"def correlated_background(signal, bkg, bkg_up, bkg_down):\n",
" spec = {\n",
Expand Down Expand Up @@ -1430,6 +1432,7 @@
"\n",
"from pyhf import interpolators\n",
"\n",
"\n",
"# pipeline to calculate the full CLs for the model, given a number of bins\n",
"def pipe(num_bins):\n",
" def cls_pipe(bins, s, b, bup, bdown, bandwidth=1e-2, skeleton_model=None):\n",
Expand Down
1 change: 1 addition & 0 deletions examples/cuts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@
"from jaxopt import OptaxSolver\n",
"from optax import adam\n",
"\n",
"\n",
"# define something to minimise (1/significance)\n",
"def loss(cut):\n",
" s_weights = relaxed.cut(sig, cut, slope) + 1e-4\n",
Expand Down
1 change: 0 additions & 1 deletion examples/neos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@
" scale_factors: dict[str, float],\n",
" include_bins: bool = True,\n",
") -> tuple[Array, dict[str, list]]:\n",
"\n",
" loss = partial(\n",
" pipeline,\n",
" nn=nn,\n",
Expand Down
1 change: 0 additions & 1 deletion examples/simple-analysis-optimisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@
"source": [
"# our analysis pipeline, from phi to p-value\n",
"def pipeline(phi, return_yields=False, uncertainty=True):\n",
"\n",
" # grab the yields at the value of phi we want\n",
" y = yields(phi, uncertainty=uncertainty)\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ author_email = n.s@cern.ch
maintainer = Nathan Simpson
maintainer_email = n.s@cern.ch
license = BSD-3-Clause
license_file = LICENSE
license_files = LICENSE
platforms =
Any
classifiers =
Expand All @@ -36,7 +36,7 @@ install_requires =
optax>=0.1.2 # deprecated jax.tree_multimap
pyhf>=0.6.3
typing-extensions>=3.7;python_version<'3.8'
python_requires = >=3.7
python_requires = >=3.8
include_package_data = True
package_dir =
=src
Expand Down