-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
45 lines (36 loc) · 1.27 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
@_default:
just --list --unsorted
# Run all build-related recipes in the justfile
run-all: install-deps format-python check-python test-python check-commits build-website
# Install Python package dependencies
install-deps:
poetry install
# Generate SVG images from all PlantUML files
generate-puml-all:
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/*.puml"
# Generate SVG image from specific PlantUML file
generate-puml name:
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/{{name}}.puml"
# Run the Python tests
test-python:
poetry run pytest
# Check Python code with the linter for any errors that need manual attention
check-python:
poetry run ruff check .
# Reformat Python code to match coding style and general structure
format-python:
poetry run ruff check --fix .
poetry run ruff format .
# Build the documentation website using Quarto
build-website:
# To let Quarto know where python is.
export QUARTO_PYTHON=.venv/bin/python3
poetry run quartodoc build
poetry run quarto render --execute
# Run checks on commits with non-main branches
check-commits:
#!/bin/zsh
if [[ $(git rev-parse --abbrev-ref HEAD) != "main" ]]
then
poetry run cz check --rev-range main..HEAD
fi