-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjustfile
More file actions
61 lines (50 loc) · 1.86 KB
/
Copy pathjustfile
File metadata and controls
61 lines (50 loc) · 1.86 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
60
61
# List available targets.
default:
just --list
# Generate documentation, by default under `./doc/html`.
doc docdir='doc/html':
rm -rf {{docdir}}
uv run --group doc pdoc \
--output-directory {{docdir}} \
--no-include-undocumented \
--docformat numpy \
--search \
transformnd
mkdir -p {{docdir}}/examples
uv run --group examples marimo export html examples/tutorial.py -o {{docdir}}/examples/tutorial.html
uv run --group examples marimo export html examples/image.py -o {{docdir}}/examples/image.html
# Run linters and type checkers.
lint:
uv run --group lint ruff check src tests examples bench
uv run --group lint mypy src tests bench
uv run --group lint ruff format --check src tests examples bench
uv run --group examples marimo check --strict --ignore-scripts examples/*.py
uv run --group lint pydoclint src
# Auto-fix format and lints where possible.
fix:
uv run --group lint ruff check --fix src tests examples bench
uv run --group lint ruff format src tests examples bench
# Format python code.
format:
uv run --group lint ruff format src tests examples bench
# Run unit tests.
test:
uv run --all-groups --all-extras pytest -v
example-edit example:
uv run --group examples marimo edit examples/{{example}}.py
example-test:
uv run --group examples marimo export session examples --force-overwrite
# Run benchmarks.
bench:
uv run --group test pytest --benchmark-only
bump level:
test -z "$(git status --porcelain)" || ( git status && false )
uv version --bump {{level}}
changelog release "$(uv version --short)"
git add .
git commit -m "Bump to v$(uv version --short)"
git tag -a "v$(uv version --short)" -m "$(changelog entry latest)"
pre-commit:
uv run --group dev prek run --all-files
repl:
uv run --all-groups --all-extras --with ipython ipython