From 94459f11e4427722d0d09f36b4d6bc338210b10b Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 28 Aug 2024 14:36:49 +0200 Subject: [PATCH 1/2] build: Add pixi feature dependencies --- pyproject.toml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5ffccbd..cd6b5de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,11 +140,36 @@ treescope = "*" [tool.pixi.pypi-dependencies] evermore = { path = ".", editable = true } +[tool.pixi.feature.test.dependencies] +pytest = ">=6" +pytest-cov = ">=3" + +[tool.pixi.feature.dev.dependencies] +ipython = "*" +ruff = "*" +pre_commit = "*" +mypy = "*" +optax = "*" +jaxopt = ">=0.6" + +[tool.pixi.feature.docs.dependencies] +sphinx = "*" +myst-parser = "*" +myst-nb = "*" +sphinx-book-theme = "*" +sphinx-design = "*" +sphinx-togglebutton = "*" + +# osx-arm64 doesn't have conda-forge builds of these +[tool.pixi.feature.docs.pypi-dependencies] +sphinx_copybutton = "*" +sphinx_autodoc_typehints = "*" + [tool.pixi.environments] default = { solve-group = "default" } -dev = { features = ["docs", "test", "dev"], solve-group = "default" } -docs = { features = ["docs"], solve-group = "default" } -test = { features = ["test"], solve-group = "default" } +dev = ["docs", "test", "dev"] +docs = ["docs"] +test = ["test"] [tool.pixi.tasks] test = "pytest" From 7421a4f66fd30b87a0c5201888f28105b286dd13 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 28 Aug 2024 14:51:27 +0200 Subject: [PATCH 2/2] Split tasks out between features --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cd6b5de..ae3b8b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -171,8 +171,12 @@ dev = ["docs", "test", "dev"] docs = ["docs"] test = ["test"] -[tool.pixi.tasks] +[tool.pixi.feature.test.tasks] test = "pytest" + +[tool.pixi.feature.dev.tasks] lint = "ruff check . --fix --show-fixes" checkall = "pre-commit run --all-files" + +[tool.pixi.feature.docs.tasks] builddocs = "rm -rf build/ && sphinx-build -M html ./docs ./build -W --keep-going"