From 4bd543b12a304500c8fd9969048b6427626e693d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 22:03:27 +0000 Subject: [PATCH 1/2] MAINT: upgrade lock files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/ComPWA/policy: 0.8.10 → 0.8.13](https://github.com/ComPWA/policy/compare/0.8.10...0.8.13) - [github.com/astral-sh/ruff-pre-commit: v0.15.12 → v0.15.20](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.12...v0.15.20) - [github.com/python-jsonschema/check-jsonschema: 0.37.2 → 0.37.4](https://github.com/python-jsonschema/check-jsonschema/compare/0.37.2...0.37.4) - [github.com/streetsidesoftware/cspell-cli: v10.0.0 → v10.0.1](https://github.com/streetsidesoftware/cspell-cli/compare/v10.0.0...v10.0.1) - [github.com/astral-sh/uv-pre-commit: 0.11.13 → 0.11.26](https://github.com/astral-sh/uv-pre-commit/compare/0.11.13...0.11.26) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6abe86f1..8fc7a9f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: check-useless-excludes - repo: https://github.com/ComPWA/policy - rev: 0.8.10 + rev: 0.8.13 hooks: - id: check-dev-files args: @@ -61,7 +61,7 @@ repos: metadata.vscode - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.12 + rev: v0.15.20 hooks: - id: ruff-check args: [--fix] @@ -114,7 +114,7 @@ repos: - --in-place - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.37.2 + rev: 0.37.4 hooks: - id: check-jsonschema name: Check CITATION.cff @@ -127,7 +127,7 @@ repos: pass_filenames: false - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v10.0.0 + rev: v10.0.1 hooks: - id: cspell language_version: 25.9.0 @@ -154,6 +154,6 @@ repos: types_or: [python, pyi, jupyter] - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.11.13 + rev: 0.11.26 hooks: - id: uv-lock From f22db449ce6ee5f0274f6ce75b8d0ef5763bd67f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 22:07:01 +0000 Subject: [PATCH 2/2] MAINT: implement pre-commit autofixes --- pyproject.toml | 182 ++++++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 86 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 762ed193..904721ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -182,48 +182,10 @@ isolated = true no-group = "dev" type = "uv" -[tool.poe.tasks.all] -help = "Run all continuous integration (CI) tasks locally" -ignore_fail = "return_non_zero" -sequence = [ - "benchmark", - "cov", - "docnb-force", - "linkcheck", - "style", - "test-all", -] - -[tool.poe.tasks.benchmark] -cmd = """ -pytest benchmarks \ - --benchmark-autosave \ - --benchmark-json benchmarks/output.json \ - --durations=0 \ - -k benchmark -""" -executor = {extra = ["jax", "numba", "pwa"], group = "test"} -help = "Run benchmark tests and visualize performance" +[tool.poe.groups.doc] +heading = "Documentation" -[tool.poe.tasks.cov] -cmd = """ -pytest \ - --cov=tensorwaves \ - --cov-fail-under=85 \ - --cov-report=html \ - --cov-report=xml \ - ${paths} -""" -executor = {extra = ["jax", "numba", "pwa"], group = "test"} -help = "Compute how much of the source code is covered by tests" - -[[tool.poe.tasks.cov.args]] -default = "" -multiple = true -name = "paths" -positional = true - -[tool.poe.tasks.doc] +[tool.poe.groups.doc.tasks.doc] cmd = """ sphinx-build \ --builder=html \ @@ -237,7 +199,7 @@ env = {PYTHONWARNINGS = ""} executor = {group = "doc"} help = "Build documentation and API" -[tool.poe.tasks.doclive] +[tool.poe.groups.doc.tasks.doclive] cmd = """ sphinx-autobuild \ --builder=html \ @@ -275,45 +237,17 @@ sphinx-autobuild \ executor = {group = "doc", with = "sphinx-autobuild"} help = "Set up a server to directly preview changes to the HTML pages" -[tool.poe.tasks.docnb] +[tool.poe.groups.doc.tasks.docnb] env = {EXECUTE_NB = "yes"} help = "Build documentation and API with cached notebook execution" sequence = ["doc"] -[tool.poe.tasks.docnb-force] -env = {FORCE_EXECUTE_NB = "yes"} -help = "Build documentation and API with notebook execution (no cache)" -sequence = ["doc"] - -[tool.poe.tasks.docnblive] +[tool.poe.groups.doc.tasks.docnblive] env = {EXECUTE_NB = "yes"} help = "Set up a server to directly preview changes to the HTML pages with cached notebook execution" sequence = ["doclive"] -[tool.poe.tasks.jax] -cmd = """ -pytest \ - -k 'benchmark or not benchmark' \ - -k 'not (ampform or four_momenta or numba or tensorflow or tf)' \ - --benchmark-disable \ - ${paths} -""" -executor = {extra = "jax", group = "test"} -help = "Run tests with JAX only" - -[[tool.poe.tasks.jax.args]] -default = "src tests" -multiple = true -name = "paths" -positional = true - -[tool.poe.tasks.lab] -args = [{name = "paths", default = "", positional = true}] -cmd = "jupyter lab ${paths}" -executor = {group = "jupyter"} -help = "Launch Jupyter Lab" - -[tool.poe.tasks.linkcheck] +[tool.poe.groups.doc.tasks.linkcheck] cmd = """ sphinx-build \ --builder=linkcheck \ @@ -325,29 +259,54 @@ env = {PYTHONWARNINGS = ""} executor = {group = "doc"} help = "Check external links in the documentation (requires internet connection)" -[tool.poe.tasks.nb] +[tool.poe.groups.notebook] +heading = "Notebooks" + +[tool.poe.groups.notebook.tasks.lab] +args = [{name = "paths", default = "", positional = true}] +cmd = "jupyter lab ${paths}" +executor = {group = "jupyter"} +help = "Launch Jupyter Lab" + +[tool.poe.groups.notebook.tasks.nb] args = [{name = "paths", default = "docs", multiple = true, positional = true}] cmd = "pytest --nbmake --nbmake-timeout=0 ${paths}" executor = {group = "notebooks", with = "nbmake"} help = "Run all notebooks" -[tool.poe.tasks.style] -cmd = "pre-commit run --all-files" -executor = {group = "style"} -help = "Perform all linting, formatting, and spelling checks" +[tool.poe.groups.test] +heading = "Testing" + +[tool.poe.groups.test.tasks.cov] +cmd = """ +pytest \ + --cov=tensorwaves \ + --cov-fail-under=85 \ + --cov-report=html \ + --cov-report=xml \ + ${paths} +""" +executor = {extra = ["jax", "numba", "pwa"], group = "test"} +help = "Compute how much of the source code is covered by tests" -[tool.poe.tasks.test] +[[tool.poe.groups.test.tasks.cov.args]] +default = "" +multiple = true +name = "paths" +positional = true + +[tool.poe.groups.test.tasks.test] cmd = "pytest --benchmark-disable -m 'slow or not slow' ${paths}" executor = {extra = ["jax", "numba", "pwa"], group = "test"} help = "Run all unit tests" -[[tool.poe.tasks.test.args]] +[[tool.poe.groups.test.tasks.test.args]] default = "src tests" multiple = true name = "paths" positional = true -[tool.poe.tasks.test-all] +[tool.poe.groups.test.tasks.test-all] help = "Run all tests on each supported Python version" sequence = [ {ref = "test-py310 ${paths}"}, @@ -356,30 +315,81 @@ sequence = [ {ref = "test-py313 ${paths}"}, ] -[[tool.poe.tasks.test-all.args]] +[[tool.poe.groups.test.tasks.test-all.args]] default = "" multiple = true name = "paths" positional = true -[tool.poe.tasks.test-py310] +[tool.poe.groups.test.tasks.test-py310] env = {UV_PYTHON = "3.10"} ref = "test" -[tool.poe.tasks.test-py311] +[tool.poe.groups.test.tasks.test-py311] env = {UV_PYTHON = "3.11"} ref = "test" -[tool.poe.tasks.test-py312] +[tool.poe.groups.test.tasks.test-py312] env = {UV_PYTHON = "3.12"} ref = "test" -[tool.poe.tasks.test-py313] +[tool.poe.groups.test.tasks.test-py313] env = {UV_PYTHON = "3.13"} ref = "test" +[tool.poe.tasks.all] +help = "Run all continuous integration (CI) tasks locally" +ignore_fail = "return_non_zero" +sequence = [ + "benchmark", + "cov", + "docnb-force", + "linkcheck", + "style", + "test-all", +] + +[tool.poe.tasks.benchmark] +cmd = """ +pytest benchmarks \ + --benchmark-autosave \ + --benchmark-json benchmarks/output.json \ + --durations=0 \ + -k benchmark +""" +executor = {extra = ["jax", "numba", "pwa"], group = "test"} +help = "Run benchmark tests and visualize performance" + +[tool.poe.tasks.docnb-force] +env = {FORCE_EXECUTE_NB = "yes"} +help = "Build documentation and API with notebook execution (no cache)" +sequence = ["doc"] + +[tool.poe.tasks.jax] +cmd = """ +pytest \ + -k 'benchmark or not benchmark' \ + -k 'not (ampform or four_momenta or numba or tensorflow or tf)' \ + --benchmark-disable \ + ${paths} +""" +executor = {extra = "jax", group = "test"} +help = "Run tests with JAX only" + +[[tool.poe.tasks.jax.args]] +default = "src tests" +multiple = true +name = "paths" +positional = true + +[tool.poe.tasks.style] +cmd = "pre-commit run --all-files" +executor = {group = "style"} +help = "Perform all linting, formatting, and spelling checks" + [tool.poe.tasks.upgrade] executor = {type = "simple"} +help = "Upgrade lock files" parallel = [ {cmd = "pre-commit autoupdate -j8"}, {cmd = "uv lock --upgrade"},