-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
89 lines (69 loc) · 2.15 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
set windows-shell := ['powershell.exe', '-NoProfile', '-Command']
alias ta := test-all
alias tl := test-lowest-versions
alias th := test-highest-versions
alias tt := test-nogil
alias t := test
alias w := watch
alias d := docs
alias s := serve
alias r := recover-uvlock
alias f := fmt
alias c := clean
alias b := bump
@default:
just -u -l
watch *flags:
uv run --frozen -- watchmedo shell-command \
--patterns='*.py' \
--recursive \
--command='just test {{ flags }}' \
--verbose \
src/ tests/
# Disable warnings by adding `--disable-warnings`.
test *flags:
uv run --frozen -- \
pytest -s tests/ {{ if flags == "-dw" { "--disable-warnings" } else { "" } }}
test-all *flags:
just test-lowest-versions {{ flags }}
just test-highest-versions {{ flags }}
just test-nogil {{ flags }}
test-lowest-versions *flags:
uv run --resolution=lowest-direct --python=3.10 --isolated -- \
pytest -s {{ if flags == "-dw" { "--disable-warnings" } else { "" } }}
just recover-uvlock
test-highest-versions *flags:
uv run --resolution=highest --python=3.13 --isolated -- \
pytest -s {{ if flags == "-dw" { "--disable-warnings" } else { "" } }}
just recover-uvlock
test-nogil *flags:
uv run --resolution=highest --python=3.13t --isolated -- \
pytest -s {{ if flags == "-dw" { "--disable-warnings" } else { "" } }}
just recover-uvlock
sync:
uv sync --frozen
python:
uv run --frozen -- ipython --no-autoindent
docs:
rm -rf docs/*
uv run --frozen pdoc --math ./src/arianna -o ./docs --docformat numpy
serve:
# uv run --frozen python -m http.server -d ./docs 8000
uv run --frozen pdoc --docformat numpy --math -p 8000 ./src/arianna
fmt-self:
just --fmt --unstable
recover-uvlock:
git checkout uv.lock
uv sync --frozen
# uv run --resolution=lowest-direct --python=3.10 --isolated -- pytest -s
fmt-py:
ruff format
fmt: fmt-self fmt-py
lint:
ruff check --fix
clean:
rm -rf src/*.egg-info src/arianna/__pycache__ src/arianna/*/__pycache__
rm -rf dist
# Update git tag and push tag. GitHub Actions will then publish to PyPI.
bump kind:
uv run bump {{ kind }} -p