Skip to content

Commit b9dcbfc

Browse files
committed
fix: use separate tooling env for settings-doc
1 parent 6782e05 commit b9dcbfc

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ repos:
8989
hooks:
9090
- id: settings-doc-check
9191
name: Generate settings documentation
92-
entry: pixi run -e default python scripts/generate_settings_docs.py
92+
entry: pixi run -e settings-doc python scripts/generate_settings_docs.py
9393
language: system
9494
pass_filenames: false
9595
files: ^(diracx-.*/src/diracx/.*/settings\.py|docs/.*\.j2|docs/templates/.*\.jinja|scripts/generate_settings_docs\.py)$

pixi.toml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ diracx-logic = { path = "diracx-logic", editable = true, extras = ["testing"] }
3030
[feature.diracx-routers.pypi-dependencies]
3131
diracx-routers = { path = "diracx-routers", editable = true, extras = ["testing"] }
3232

33-
# Settings documentation feature
34-
[feature.settings-doc.pypi-dependencies]
35-
settings-doc = "*"
36-
3733
# DiracX features for providing tasks. This is needed to make it so that running
3834
# "pixi run pytest-diracx-core -vvv --pdb" passes the arguments as expected.
3935
# See: https://github.com/prefix-dev/pixi/issues/1519#issuecomment-2651078457
@@ -61,12 +57,7 @@ description = "Run the tests for diracx-logic"
6157
cmd = "cd diracx-routers/ && pytest"
6258
description = "Run the tests for diracx-routers"
6359

64-
# Settings documentation task
65-
[feature.settings-doc.tasks.generate-settings-doc]
66-
cmd = "python scripts/generate_settings_docs.py"
67-
description = "Auto-discover and generate settings documentation with validation"
68-
69-
# Gubbins features for providing dependencies
60+
# Features for generating the documentation
7061
[feature.gubbins.pypi-dependencies]
7162
gubbins = { path = "extensions/gubbins", editable = true, extras = ["testing"] }
7263
[feature.gubbins-core.pypi-dependencies]
@@ -133,6 +124,13 @@ pre-commit = "*"
133124
pre-commit = "pre-commit"
134125
description = "Run pre-commit hooks"
135126

127+
# Features for settings documentation generation
128+
[feature.settings-doc.pypi-dependencies]
129+
settings-doc = "*"
130+
[feature.settings-doc.tasks]
131+
generate-settings-doc = "python scripts/generate_settings_docs.py"
132+
description = "Auto-discover and generate settings documentation with validation"
133+
136134
# Features for generating the clients
137135
[feature.client-gen.dependencies]
138136
nodejs = ">=10.9.2"
@@ -151,7 +149,7 @@ description = "Run shellcheck on all shell scripts"
151149

152150
[environments]
153151
# DiracX environments
154-
default = {features = ["task-diracx", "diracx", "diracx-core", "diracx-api", "diracx-cli", "diracx-client", "diracx-db", "diracx-logic", "diracx-routers", "settings-doc"], solve-group = "diracx"}
152+
default = {features = ["task-diracx", "diracx", "diracx-core", "diracx-api", "diracx-cli", "diracx-client", "diracx-db", "diracx-logic", "diracx-routers"], solve-group = "diracx"}
155153
diracx-core = {features = ["task-diracx-core", "diracx-core"], solve-group = "diracx"}
156154
diracx-api = {features = ["task-diracx-api", "diracx-api", "diracx-client", "diracx-core"], solve-group = "diracx"}
157155
diracx-cli = {features = ["task-diracx-cli", "diracx-cli", "diracx-api", "diracx-client", "diracx-core"], solve-group = "diracx"}
@@ -177,6 +175,7 @@ gubbins-generate-client = {features = ["client-gen", "diracx-client", "gubbins-c
177175
mkdocs = {features = ["mkdocs"], no-default-feature = true}
178176
shellcheck = {features = ["shellcheck"], no-default-feature = true}
179177
pre-commit = {features = ["pre-commit"], no-default-feature = true}
178+
settings-doc = {features = ["settings-doc"], no-default-feature = true}
180179

181180
# Meta-tasks for running many tests at once
182181
[tasks.pytest-diracx-all-one-by-one]

0 commit comments

Comments
 (0)