-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathjustfile
52 lines (40 loc) · 1.2 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export UV_PYTHON := env("UV_PYTHON", `cat .python-version`)
repository := "pypi"
publish-url := if repository == "pypi" {
"https://upload.pypi.org/legacy/"
} else if repository == "testpypi" {
"https://test.pypi.org/legacy/"
} else {
error("Unrecognized repository")
}
default: test
test: format lint typecheck unit-test docs packaging
format:
uv run ruff format
lint:
uv run ruff check --fix --exit-non-zero-on-fix
typecheck:
uv run pyright
unit-test *ARGS:
uv run pytest test/unit_tests {{ARGS}}
coverage:
for python in "3.9" "3.10" "3.11" "3.12" "3.13"; do \
uv run --python "$python" coverage run -m pytest test/unit_tests; \
done
uv run coverage combine
uv run coverage report
uv run coverage xml --fail-under 0
docs:
uv run sphinx-build -T -W -E --keep-going --color -b html docs docs/build/html
uv run sphinx-build -T -W -E --keep-going --color -b doctest docs docs/build/doctest
packaging:
uv build --no-sources
uv run check-wheel-contents dist
uv run twine check dist/*
draft:
uv run scripts/draft_release.py
publish: packaging
uv publish --publish-url {{publish-url}}
notebooks:
-docker compose up
docker compose down