-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
59 lines (46 loc) · 1.11 KB
/
justfile
File metadata and controls
59 lines (46 loc) · 1.11 KB
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
# List all commands.
default:
@just --list
# Build docs.
docs:
rm -rf docs/build docs/source/_autosummary
uv run make -C docs html
echo Docs are in $PWD/docs/build/html/index.html
# Do a dev install.
setup:
uv sync --all-extras --dev
# Run code checks.
check:
#!/usr/bin/env bash
error=0
trap error=1 ERR
echo
(set -x; uv run ruff check src/ tests/ docs/source/ examples/ )
test $? = 0
echo
( set -x; uv run ruff format --check src/ tests/ docs/source/ examples/ )
test $? = 0
echo
( set -x; uv run mypy src/ tests/ docs/source/ examples/ )
test $? = 0
echo
( set -x; uv run pytest )
test $? = 0
echo
( set -x; rm -rf docs/build docs/source/_autosummary; uv run make -C docs doctest )
test $? = 0
test $error = 0
# Auto-fix code issues.
fix:
uv run ruff format src/ tests/ docs/source/ examples/
uv run ruff check --fix src/ tests/ docs/source/ examples/
# Build a release.
build:
uv build
# Initialize the repo.
init repo-name:
for FILE in $(rg --files-with-matches millie); \
do \
sd millie {{repo-name}} $FILE; \
done
mv src/millie src/{{repo-name}}