Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
75 lines (59 loc) · 2.44 KB
/
Copy pathjustfile
File metadata and controls
75 lines (59 loc) · 2.44 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
# Default: list available commands
default:
@just --list
# Run tests
test *args:
uv run pytest {{ args }}
# Run tests with coverage and open HTML report
coverage:
uv run coverage run --source pyphi -m pytest
uv run coverage html
open htmlcov/index.html
# Build documentation (warnings are errors, matching CI)
# Serial like the Read the Docs build: sphinx-tippy writes every page's hover
# tooltips from the whole site's data, which parallel writing loses.
docs:
uv run --all-extras --group docs sphinx-build -W --keep-going -b html docs docs/_build/html
# Serve documentation locally
serve-docs port="1337": docs
cd docs/_build/html && uv run python -m http.server {{ port }}
# Serve docs with live reload: rebuilds on save (serial, like `docs`; executed pages come from the cache)
watch-docs port="1337":
uv run --all-extras --group docs sphinx-autobuild -W --keep-going -b html --port {{ port }} docs docs/_build/html
# Run the benchmark suite once locally (current env, quick mode)
bench *args:
cd benchmarks && uv run asv run --quick --python=same {{ args }}
# Build the ASV HTML dashboard and serve it locally (readable, left-aligned)
bench-dashboard:
cd benchmarks && uv run asv publish && uv run asv preview
# Compare HEAD against the previous commit on one runner (builds both — slower)
bench-compare:
cd benchmarks && uv run asv continuous --python=same HEAD~1 HEAD
# Run the deterministic perf-counter gate (the PR-blocking check)
perf-gate:
uv run pytest test/integration/test_perf_counters.py
# Regenerate the pinned perf call counts (review the diff like a golden)
perf-pins:
uv run python scripts/gen_perf_counts.py
# Render the unreleased changelog from changelog.d/ fragments (no files changed)
changelog-draft:
uv run towncrier build --version 2.0.0 --draft
# Build and upload to PyPI
dist: clean-dist
uv build
uv run twine check dist/*
uv run twine upload dist/*
# Build and upload to Test PyPI
test-dist: clean-dist
uv build
uv run twine check dist/*
uv run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# Clean build artifacts
clean:
rm -rf dist __pycache__ **/__pycache__ **/pyphi.log htmlcov .coverage
[private]
clean-dist:
rm -rf dist
# Re-execute the demo notebook and store its outputs (about 15 minutes)
notebook-outputs:
PYPHI_WELCOME_OFF=1 PYPHI_AGENT_NOTE_OFF=1 uv run python scripts/execute_notebook.py docs/examples/IIT_4.0_demo.ipynb