From 819164d00899d51c4274ee8383b8fe0afbb431ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 01:08:45 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.8.0 → 23.3.0](https://github.com/psf/black/compare/22.8.0...23.3.0) - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0) - [github.com/pre-commit/pygrep-hooks: v1.9.0 → v1.10.0](https://github.com/pre-commit/pygrep-hooks/compare/v1.9.0...v1.10.0) - [github.com/PyCQA/isort: 5.10.1 → 5.12.0](https://github.com/PyCQA/isort/compare/5.10.1...5.12.0) - [github.com/asottile/pyupgrade: v2.38.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v2.38.0...v3.8.0) - [github.com/asottile/setup-cfg-fmt: v2.0.0 → v2.4.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.0.0...v2.4.0) - [github.com/hadialqattan/pycln: v2.1.1 → v2.1.5](https://github.com/hadialqattan/pycln/compare/v2.1.1...v2.1.5) - [github.com/asottile/yesqa: v1.4.0 → v1.5.0](https://github.com/asottile/yesqa/compare/v1.4.0...v1.5.0) - [github.com/pycqa/flake8: 5.0.4 → 6.0.0](https://github.com/pycqa/flake8/compare/5.0.4...6.0.0) - [github.com/pre-commit/mirrors-mypy: v0.971 → v1.4.1](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v1.4.1) - [github.com/shellcheck-py/shellcheck-py: v0.8.0.4 → v0.9.0.5](https://github.com/shellcheck-py/shellcheck-py/compare/v0.8.0.4...v0.9.0.5) - [github.com/mgedmin/check-manifest: 0.48 → 0.49](https://github.com/mgedmin/check-manifest/compare/0.48...0.49) --- .pre-commit-config.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6111d2a..470c59e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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] From 9d08a5cc362c050ee2f84b4af4f285b3e6abdc12 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Jul 2023 01:10:21 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/binning.ipynb | 3 +++ examples/cuts.ipynb | 1 + examples/neos.ipynb | 1 - examples/simple-analysis-optimisation.ipynb | 1 - setup.cfg | 4 ++-- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/binning.ipynb b/examples/binning.ipynb index 4d84d4f..9414a5c 100644 --- a/examples/binning.ipynb +++ b/examples/binning.ipynb @@ -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", @@ -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", @@ -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", diff --git a/examples/cuts.ipynb b/examples/cuts.ipynb index 95d7ea2..9fe4bbc 100644 --- a/examples/cuts.ipynb +++ b/examples/cuts.ipynb @@ -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", diff --git a/examples/neos.ipynb b/examples/neos.ipynb index aadb07a..38d29bc 100644 --- a/examples/neos.ipynb +++ b/examples/neos.ipynb @@ -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", diff --git a/examples/simple-analysis-optimisation.ipynb b/examples/simple-analysis-optimisation.ipynb index 1472b9b..eec3c0c 100644 --- a/examples/simple-analysis-optimisation.ipynb +++ b/examples/simple-analysis-optimisation.ipynb @@ -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", diff --git a/setup.cfg b/setup.cfg index 802451b..20c99ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 = @@ -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