-
Notifications
You must be signed in to change notification settings - Fork 59
/
justfile
52 lines (39 loc) · 859 Bytes
/
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
# List all commands.
default:
@just --list
# Build docs.
docs:
rm -rf docs/_build docs/_autosummary
make -C docs html
echo Docs are in $PWD/docs/_build/html/index.html
# Do a dev install.
dev:
pip install -e '.[dev]'
conda env update --file environment.yml
# Do a dev install with GPU support.
dev-gpu:
pip install -e '.[dev-gpu]'
conda env update --file environment.yml
# Run code checks.
check:
#!/usr/bin/env bash
error=0
trap error=1 ERR
echo
(set -x; ruff check src/ tests/ docs/ )
echo
( set -x; ruff format --check src/ tests/ docs/ )
echo
( set -x; mypy src/ tests/ docs/ )
echo
( set -x; pytest )
echo
( set -x; make -C docs doctest )
test $error = 0
# Auto-fix code issues.
fix:
ruff format src/ tests/ docs/
ruff check --fix src/ tests/ docs/
# Build a release.
build:
python -m build