-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
84 lines (65 loc) · 2.16 KB
/
justfile
File metadata and controls
84 lines (65 loc) · 2.16 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -----------------------------------------------------------------------------
# 🧰 Python Project Template — Justfile
# -----------------------------------------------------------------------------
# Common developer commands for uv-based projects.
# Run `just <command>` (e.g., `just test`).
# -----------------------------------------------------------------------------
# Always use bash for consistency across OSes
set shell := ["bash", "-cu"]
# Default recipe (shown when running plain `just`)
default:
@just --list
# Install dependencies (create/update virtualenv)
install:
uv sync
# Update dependencies to latest allowed versions
update:
uv lock --upgrade
# Regenerate lock file
lock:
uv lock
# Lint (Ruff check)
lint:
uv run ruff check .
# Format (Ruff format)
format:
uv run ruff format .
# Type checking (Pyright)
type-check:
uv run pyright
# Run quick tests (exclude slow)
test:
uv run pytest -q -m "not slow" --doctest-modules --doctest-glob="*.py" --maxfail=1 --disable-warnings
# Run tests with verbose output (exclude slow)
test-vv:
uv run pytest -vv -m "not slow" --doctest-modules --doctest-glob="*.py" --maxfail=1 --disable-warnings
# Test notebooks
test-notebooks:
uv run pytest --nbmake notebooks/
# Run full test suite with coverage
coverage:
uv run pytest --cov --cov-report=term-missing
# Build docs (MkDocs strict)
docs-build:
uv run --group docs mkdocs build --strict
# Serve docs locally
docs-serve:
uv run --group docs mkdocs serve -a localhost:8000
# Install pre-commit hooks
pre-commit-install:
uv run pre-commit install \
&& uv run pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks \
&& uv run pre-commit install -t pre-push \
&& uv run pre-commit install --hook-type commit-msg
# Run all pre-commit hooks
pre-commit:
uv run pre-commit run --all-files --hook-stage push
# Clean generated artifacts
clean:
rm -rf .pytest_cache dist build .ruff_cache .mypy_cache site
# Build distribution (wheel + sdist)
build:
uv build
# Start Jupyter lab from inside a container
jupyter-devcontainer:
uv run jupyter lab --allow-root --ip 0.0.0.0 --no-browser