Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
67 lines (52 loc) · 1.47 KB
/
Copy pathjustfile
File metadata and controls
67 lines (52 loc) · 1.47 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
packages := "grader,desktop"
project_content := "grader desktop tests pygrader.py"
init:
python3 -m venv .venv
venv
pip install -r requirements.txt
# Linting
lint:
uv run ruff check {{project_content}} --fix
uv run ruff format {{project_content}}
uv run mypy {{project_content}}
uv run complexipy .
# Tests
test: unit_tests functional_tests
unit_tests:
uv run pytest tests/unit -v
functional_tests:
uv run pytest tests/functional
coverage:
uv run coverage run --source={{packages}} -m pytest tests/unit
uv run coverage lcov -o lcov.info
uv run coverage report -m --fail-under 85 --sort=cover
docs:
uv run sphinx-apidoc -o docs/source grader
uv run sphinx-build -b html docs/source docs/build
# Cleaning
clean: clean_logs
rm -rf .coverage
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf docs/build
rm -f lcov.info
rm -rf "pygrader-sample-project"
rm -rf __pycache__
rm -rf .complexipy_cache
rm -rf pygrader.egg-info
clean_logs:
rm -rf *.log.*
rm -rf *.log
clean_venv:
rm -rf .venv
# Sample project
setup_sample_project: clean_sample_project
git clone https://github.com/fmipython/pygrader-sample-project
clean_sample_project:
if [ -d "pygrader-sample-project" ]; then rm -rf "pygrader-sample-project"; fi
build_diagrams:
java -jar ~/plantuml-1.2025.4.jar ./docs/diagrams/*.puml -o out
build_docker:
uv sync
uv lock
docker build -f Dockerfile -t pygrader:latest .