@@ -33,6 +33,51 @@ dependencies = [
33
33
Repository = " https://github.com/analog-garage/mkdocstrings-python-xref"
34
34
Documentation = " https://analog-garage.github.io/mkdocstrings-python-xref/"
35
35
36
+ [project .optional-dependencies ]
37
+ dev = [
38
+ " build >=1.0.0" , # python-build on conda
39
+ " hatchling >=1.21" ,
40
+ " coverage >=7.4.0" ,
41
+ " pytest >=8.2" ,
42
+ " pytest-cov >=5.0" ,
43
+ " mypy >=1.10" ,
44
+ " ruff >=0.4.10" ,
45
+ " beautifulsoup4 >=4.12" ,
46
+ " black >=23.12" ,
47
+ " mike >=1.1" ,
48
+ " mkdocs >=1.5.3,<2.0" ,
49
+ " mkdocs-material >=9.5.4" ,
50
+ " linkchecker >=10.4"
51
+ ]
52
+
53
+ [tool .pixi .workspace ]
54
+ name = " mkxref-dev"
55
+ channels = [" conda-forge" ]
56
+ platforms = [" osx-arm64" , " linux-64" , " win-64" ]
57
+
58
+ [tool .pixi .dependencies ]
59
+ # Use conda for these in pixi
60
+ mkdocstrings-python =" *"
61
+ griffe =" *"
62
+ hatchling = " *"
63
+ python-build = " *"
64
+ coverage =" *"
65
+ pytest =" *"
66
+ pytest-cov =" *"
67
+ mypy =" *"
68
+ ruff = " *"
69
+ black = " *"
70
+ mike = " *"
71
+ mkdocs = " *"
72
+ mkdocs-material = " *"
73
+ linkchecker = " *"
74
+
75
+ [tool .pixi .pypi-dependencies ]
76
+ mkdocstrings-python-xref = { path = " ." , editable = true }
77
+
78
+ [tool .pixi .environments ]
79
+ default = {features = [" dev" ]}
80
+
36
81
[tool .hatch .version ]
37
82
path = " src/mkdocstrings_handlers/python_xref/VERSION"
38
83
pattern = " \\ s*(?P<version>[\\ w.]*)"
@@ -174,3 +219,53 @@ disable = [
174
219
" wrong-spelling-in-comment" ,
175
220
" wrong-spelling-in-docstring" ,
176
221
]
222
+
223
+ [tool .pixi .tasks ]
224
+ # linting tasks
225
+ mypy = " mypy"
226
+ ruff = " ruff check src/mkdocstrings_handlers tests"
227
+ lint = {depends-on = [" ruff" , " mypy" ]}
228
+
229
+ # testing tasks
230
+ pytest = " pytest -sv -ra tests"
231
+ test = {depends-on = [" pytest" , " lint" ]}
232
+ coverage = " pytest -ra --cov --cov-report=html --cov-report=term -- tests"
233
+ coverage-show = " python -m webbrowser file://$PIXI_PROJECT_ROOT/htmlcov/index.html"
234
+
235
+ # doc tasks
236
+ docs = {depends-on = [" doc" ]}
237
+ show-doc = " mkdocs serve -f mkdocs.yml"
238
+ show-docs = {depends-on = [" show-doc" ]}
239
+
240
+ # cleanup tasks
241
+ clean-build = " rm -rf build dist"
242
+ clean-coverage = " rm -rf .coverage .coverage.* htmlcov"
243
+ clean-docs = " rm -rf site"
244
+ clean-test = " rm -rf .pytest_cache .mypy_cache .ruff_cache"
245
+ clean = {depends-on = [" clean-build" , " clean-coverage" , " clean-test" ]}
246
+
247
+ # build tasks
248
+ build = {depends-on = [" build-wheel" , " build-sdist" , " build-conda" ]}
249
+
250
+ [tool .pixi .tasks .build-wheel ]
251
+ env = {VERSION = " $(cat src/mkdocstrings_handlers/python_xref/VERSION)" }
252
+ cmd = " pip wheel . --no-deps --no-build-isolation -w dist"
253
+ inputs = [" pyproject.toml" , " LICENSE.md" , " src/**/*" ]
254
+ outputs = [" dist/mkdocstrings_python_xref-$VERSION-py3-none-any.whl" ]
255
+
256
+ [tool .pixi .tasks .build-sdist ]
257
+ env = {VERSION = " $(cat src/mkdocstrings_handlers/python_xref/VERSION)" }
258
+ cmd = " python -m build --sdist --no-isolation --outdir dist"
259
+ inputs = [" pyproject.toml" , " LICENSE.md" , " src/**/*" ]
260
+ outputs = [" dist/mkdocstrings_python_xref-$VERSION.tar.gz" ]
261
+
262
+ [tool .pixi .tasks .build-conda ]
263
+ # env = {VERSION = "$(cat src/mkdocstrings_handlers/python_xref/VERSION)"}
264
+ cmd = " whl2conda convert dist/*.whl -w dist --overwrite"
265
+ depends-on = [" build-wheel" ]
266
+ inputs = [" dist/mkdocstrings_python_xref-$VERSION-py3-none-any.whl" ]
267
+
268
+ [tool .pixi .tasks .doc ]
269
+ cmd = " mkdocs build -f mkdocs.yml"
270
+ inputs = [" docs/*.md" , " docs/*.svg" , " mkdocs.yml" ]
271
+ outputs = [" site/*.html" ]
0 commit comments