-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
43 lines (36 loc) Β· 1.24 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
install:
# Install the virtual environment and install the pre-commit hooks
echo "π Creating virtual environment using uv"
uv sync
uv run pre-commit install
check:
# Run code quality tools
echo "π Checking lock file consistency with 'pyproject.toml'"
uv lock --locked
echo "π Linting code: Running pre-commit"
uv run pre-commit run -a
echo "π Static type checking: Running mypy"
uv run mypy
echo "π Checking for obsolete dependencies: Running deptry"
uv run deptry .
test:
# Test the code with pytest
echo "π Testing code: Running pytest"
uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
build: clean-build
# Build wheel file
echo "π Creating wheel file"
uvx --from build pyproject-build --installer uv
clean-build:
# Clean build artifacts
echo "π Removing build artifacts"
uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
docs-test:
# Test if documentation can be built without warnings or errors
uv run mkdocs build -s
docs:
# Build and serve the documentation
uv run mkdocs serve
help:
# Display available recipes and descriptions
@just --list