-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathjustfile
More file actions
69 lines (56 loc) · 1.95 KB
/
justfile
File metadata and controls
69 lines (56 loc) · 1.95 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
python := "3.13"
python_nodot := replace(python, ".", "")
# Print this help documentation
help:
just --list
# Sync requirements
sync:
pixi run true
# Run linting
lint:
pixi run ruff format --check
pixi run ruff check
# Run formatting
format:
pixi run ruff format
pixi run ruff check --fix
# Run static typechecking
typecheck:
pixi run -e typecheck \
mypy erdantic --install-types --non-interactive
# Run the tests
test *args:
pixi run -e test-py{{python_nodot}} python -I -m pytest {{args}}
# Run all tests with Python version matrix
test-all *args:
for python in 3.9 3.10 3.11 3.12 3.13; do \
just python=$python test {{args}}; \
done
# Generate static test and documentation assets
generate-static-assets: generate-static-docs-assets generate-static-test-assets
[private]
generate-static-docs-assets:
pixi run python docs/generate_images.py
pixi run python docs/generate_pydantic_with_default_column_diagram.py
[private]
generate-static-test-assets:
pixi run -e test-py313 python tests/scripts/generate_static_assets.py py_lt_314
pixi run -e test-py313 python tests/scripts/generate_pydantic_with_defaults_assets.py py_lt_314
pixi run -e test-py314 python tests/scripts/generate_static_assets.py py_gte_314
pixi run -e test-py314 python tests/scripts/generate_pydantic_with_defaults_assets.py py_gte_314
# Run example documents
run-notebooks:
mkdir -p docs/docs/examples
for notebook in docs/notebooks/examples/*.ipynb; do \
pixi run jupyter execute --output ../../docs/examples/$(basename $notebook) $notebook; \
done
mkdir -p docs/docs/output-formats
for notebook in docs/notebooks/output-formats/*.ipynb; do \
pixi run jupyter execute --output ../../docs/output-formats/$(basename $notebook) $notebook; \
done
# Generate docs
docs: run-notebooks
(cd docs && pixi run mkdocs build)
# Serve docs
docs-serve: run-notebooks
(cd docs && pixi run mkdocs serve)