@@ -33,6 +33,34 @@ 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,<2.0" ,
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 .pypi-dependencies ]
59
+ mkdocstrings-python-xref = { path = " ." , editable = true }
60
+
61
+ [tool .pixi .environments ]
62
+ default = {features = [" dev" ]}
63
+
36
64
[tool .hatch .version ]
37
65
path = " src/mkdocstrings_handlers/python_xref/VERSION"
38
66
pattern = " \\ s*(?P<version>[\\ w.]*)"
@@ -174,3 +202,46 @@ disable = [
174
202
" wrong-spelling-in-comment" ,
175
203
" wrong-spelling-in-docstring" ,
176
204
]
205
+
206
+ [tool .pixi .tasks ]
207
+ # linting tasks
208
+ mypy = " mypy"
209
+ ruff = " ruff check src/mkdocstrings_handlers tests"
210
+ lint = {depends-on = [" ruff" , " mypy" ]}
211
+
212
+ # testing tasks
213
+ pytest = " pytest -sv -ra tests"
214
+ test = {depends-on = [" pytest" , " lint" ]}
215
+ coverage = " pytest -ra --cov --cov-report=html --cov-report=term -- tests"
216
+ coverage-show = " python -m webbrowser file://$PIXI_PROJECT_ROOT/htmlcov/index.html"
217
+
218
+ # doc tasks
219
+
220
+ # cleanup tasks
221
+ clean-build = " rm -rf build dist"
222
+ clean-coverage = " rm -rf .coverage .coverage.* htmlcov"
223
+ clean-docs = " rm -rf site"
224
+ clean-test = " rm -rf .pytest_cache .mypy_cache .ruff_cache"
225
+ clean = {depends-on = [" clean-build" , " clean-coverage" , " clean-test" ]}
226
+
227
+ # build tasks
228
+ build = {depends-on = [" build-wheel" , " build-sdist" , " build-conda" ]}
229
+
230
+ [tool .pixi .tasks .build-wheel ]
231
+ env = {VERSION = " $(cat src/mkdocstrings_handlers/python_xref/VERSION)" }
232
+ cmd = " pip wheel . --no-deps --no-build-isolation -w dist"
233
+ inputs = [" pyproject.toml" , " LICENSE.md" , " src/**/*" ]
234
+ outputs = [" dist/mkdocstrings_python_xref-$VERSION-py3-none-any.whl" ]
235
+
236
+ [tool .pixi .tasks .build-sdist ]
237
+ env = {VERSION = " $(cat src/mkdocstrings_handlers/python_xref/VERSION)" }
238
+ cmd = " python -m build --sdist --no-isolation --outdir dist"
239
+ inputs = [" pyproject.toml" , " LICENSE.md" , " src/**/*" ]
240
+ outputs = [" dist/mkdocstrings_python_xref-$VERSION.tar.gz" ]
241
+
242
+ [tool .pixi .tasks .build-conda ]
243
+ # env = {VERSION = "$(cat src/mkdocstrings_handlers/python_xref/VERSION)"}
244
+ cmd = " whl2conda convert dist/*.whl -w dist --overwrite"
245
+ depends-on = [" build-wheel" ]
246
+ inputs = [" dist/mkdocstrings_python_xref-$VERSION-py3-none-any.whl" ]
247
+
0 commit comments