-
Notifications
You must be signed in to change notification settings - Fork 20
/
justfile
64 lines (50 loc) · 1.74 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
# List available commands
list:
@just --list
# Run typecheck
typecheck:
uv run mypy . --implicit-optional
# Run formatter
format:
uv run ruff check --select I --fix
uv run ruff check . --fix
# Run formatter - no fix
format-check:
uv run ruff check --select I
uv run ruff check .
# Run unit and CLI tests, fail on first test failure
# REVIEW: We should refactor the tests so we can use -nauto here
test:
uv run pytest -x --ignore=tests/integration/ --ignore=tests/zksync/
# Run the last failed test
test-lf:
uv run pytest --lf --ignore=tests/integration/ --ignore=tests/zksync/
# Run integration tests, read the README.md in the tests/integration directory for more information
test-i:
uv run pytest tests/integration -x --ignore=tests/zksync/
# Run zksync tests
test-z:
uv run pytest tests/zksync -nauto --ignore=tests/integration/
# Run both unit and integration tests
test-all:
@just test
@just test-i
@just test-z
# Run tests, fail on first test failure, enter debugger on failure
test-pdb:
uv run pytest -x -s --ignore=tests/integration/ --ignore=tests/zksync/ --pdb
# For when you want to run the same anvil chain as what's used in the tests
anvil:
anvil --load-state tests/data/anvil_data/state.json
# Build documentation
docs:
rm -rf built_docs
uv sync --extra docs
uv run python docs/source/_generate_vars.py
uv run sphinx-build -M html docs/source built_docs -v
@echo "\nDocumentation link:"
@echo "http://127.0.0.1:5500/built_docs/html/index.html"
docs-watch:
watchmedo shell-command --patterns="*.rst" --recursive --command='uv run sphinx-build -M html docs/source built_docs' docs/source
build-requirements:
uv pip compile pyproject.toml -o requirements.txt