-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathjustfile
More file actions
61 lines (50 loc) · 1.5 KB
/
justfile
File metadata and controls
61 lines (50 loc) · 1.5 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
set export
set dotenv-load
VENV_DIRNAME := ".venv"
@_default:
just --list
[private]
@check_uv:
if ! command -v uv &> /dev/null; then \
echo "uv could not be found. Exiting."; \
exit; \
fi
# setup development environment
@bootstrap: check_uv
if [ -x $VENV_DIRNAME ]; then \
echo "Already bootstraped. Exiting."; \
exit; \
fi
echo "Installing dependencies"
just upgrade
# upgrade/install all dependencies defined in pyproject.toml
@upgrade: check_uv
uv sync --all-extras --upgrade
# run pre-commit rules on all files
@lint: check_uv
uvx --with pre-commit-uv pre-commit run --all-files
# run test suite
@test: check_uv
uv run pytest --cov --cov-report=html --cov-report=term
# run test suite
@test-all: check_uv
uvx --with tox-uv tox
# serve docs during development
@serve-docs: check_uv
cd docs && uvx --from sphinx-autobuild --with sphinx --with myst-parser --with sphinx-copybutton --with furo sphinx-autobuild . _build/html
# clean up temporary files and directories
@clean:
echo "Cleaning up temporary files and directories..."
rm -rf htmlcov/
rm -rf .coverage
rm -rf .pytest_cache/
rm -rf site/
rm -rf docs/_build/
rm -rf dist/
rm -rf build/
rm -rf .tox/
rm -rf src/*.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type f -name "*.pyo" -delete 2>/dev/null || true
echo "Clean up complete!"