From 50e0c542996f08fac09725e1fd71ae6654c0abf1 Mon Sep 17 00:00:00 2001 From: Panadestein Date: Tue, 6 Oct 2026 15:07:53 +0200 Subject: [PATCH] =?UTF-8?q?chore(deps):=20=F0=9F=94=A7=20move=20benchmark-?= =?UTF-8?q?only=20dependencies=20to=20a=20bench=20group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cyclopts is used only by the scripts under benches/, so it moves from dev to a new bench group, which also declares the quimb and scipy the scripts import. cmaes stays in the test group with a comment: quimb's cotengra warns without it, and filterwarnings = ["error"] turns that into a test failure. Closes #12 Assisted-by: pi:claude-opus-5.5 --- benches/README.md | 6 ++++++ pyproject.toml | 6 +++++- uv.lock | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/benches/README.md b/benches/README.md index ceaab47..61b79ce 100644 --- a/benches/README.md +++ b/benches/README.md @@ -10,3 +10,9 @@ different SRC variants. They are grouped by the kind of workload exercised: - [`stack/`](stack/) — One-shot SRC over stacks of trains against sequential pairwise application, by stack depth: accuracy against dense references and wall time. See [`stack/README.md`](stack/README.md). + +The scripts need the `bench` dependency group (included in `dev`): + +```bash +uv sync --group bench +``` diff --git a/pyproject.toml b/pyproject.toml index 317aae2..161c7c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,15 +64,19 @@ test = [ "pytest>=9.1.0,<10.0", "pytest-benchmark>=5.2.3", "quimb>=1.14.0,<2", + # Not imported directly: without it, cotengra (via quimb) warns when it plans a + # contraction, which `filterwarnings = ["error"]` turns into a failure. "cmaes>=0.12.0", ] +# Only the scripts under benches/ need these. +bench = ["cyclopts>=3.20", "quimb>=1.14.0,<2", "cmaes>=0.12.0", "scipy"] dev = [ "scalene", "prek>=0.2.6", "ruff==0.16.9", - "cyclopts>=3.20", "ty==0.0.82", { include-group = "test" }, + { include-group = "bench" }, ] interactive = [ "ipykernel>=7.2.0", diff --git a/uv.lock b/uv.lock index e35a1dd..cae5c32 100644 --- a/uv.lock +++ b/uv.lock @@ -2911,6 +2911,12 @@ gpu-rocm = [ ] [package.dev-dependencies] +bench = [ + { name = "cmaes" }, + { name = "cyclopts" }, + { name = "quimb" }, + { name = "scipy" }, +] dev = [ { name = "cmaes" }, { name = "cyclopts" }, @@ -2921,6 +2927,7 @@ dev = [ { name = "quimb" }, { name = "ruff" }, { name = "scalene" }, + { name = "scipy" }, { name = "ty" }, ] docs = [ @@ -2970,6 +2977,12 @@ requires-dist = [ provides-extras = ["gpu-nvidia", "gpu-rocm"] [package.metadata.requires-dev] +bench = [ + { name = "cmaes", specifier = ">=0.12.0" }, + { name = "cyclopts", specifier = ">=3.20" }, + { name = "quimb", specifier = ">=1.14.0,<2" }, + { name = "scipy" }, +] dev = [ { name = "cmaes", specifier = ">=0.12.0" }, { name = "cyclopts", specifier = ">=3.20" }, @@ -2980,6 +2993,7 @@ dev = [ { name = "quimb", specifier = ">=1.14.0,<2" }, { name = "ruff", specifier = "==0.16.9" }, { name = "scalene" }, + { name = "scipy" }, { name = "ty", specifier = "==0.0.82" }, ] docs = [