-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
51 lines (39 loc) · 894 Bytes
/
justfile
File metadata and controls
51 lines (39 loc) · 894 Bytes
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
# List all commands.
default:
@just --list
# Build docs.
docs:
rm -rf docs/build docs/source/_autosummary
make -C docs html
echo Docs are in $PWD/docs/build/html/index.html
# Do a dev install.
dev:
pip install -e '.[dev]'
# Run code checks.
check:
#!/usr/bin/env bash
error=0
trap error=1 ERR
echo
(set -x; ruff check src/ tests/ docs/source/ examples/ )
test $? = 0
echo
( set -x; ruff format --check src/ tests/ docs/source/ examples/ )
test $? = 0
echo
( set -x; mypy src/ tests/ docs/source/ examples/ )
test $? = 0
echo
( set -x; pytest --cov=src --cov-report term-missing )
test $? = 0
echo
( set -x; make -C docs doctest )
test $? = 0
test $error = 0
# Auto-fix code issues.
fix:
ruff format src/ tests/ docs/source/ examples/
ruff check --fix src/ tests/ docs/source/ examples/
# Build a release.
build:
python -m build