Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.39 KB
/
Copy pathMakefile
File metadata and controls
54 lines (40 loc) · 1.39 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
# Use uv for all Python/package commands. Override with: make UV=python to use system Python.
UV = uv run
all: test
uninstall:
uv pip uninstall openfisca-tunisia -y 2>/dev/null || true
clean:
rm -rf build dist
find . -name '*.pyc' -exec rm \{\} \;
deps:
uv pip install build twine
install:
@# Install OpenFisca-Tunisia for development (editable).
uv sync --extra dev
build: clean deps
@# Build and install the package from wheel to test the distributed version.
uv build
uv pip uninstall openfisca-tunisia -y 2>/dev/null || true
find dist -name "*.whl" -exec uv pip install {}[dev] \;
check-syntax-errors:
$(UV) python -m compileall -q .
format-style:
$(UV) ruff format .
$(UV) ruff check --fix .
check-style:
$(UV) ruff check .
check-path-length:
$(UV) python openfisca_tunisia/scripts/check_path_length.py
check-yaml:
@# `uv run` fournit yamllint au script, qui appelle le binaire par son nom.
$(UV) .github/lint-changed-yaml-tests.sh
check-all-yaml:
$(UV) yamllint openfisca_tunisia/parameters
$(UV) yamllint tests
test: clean check-syntax-errors check-style check-yaml
@echo "> Yaml tests..."
$(UV) openfisca test --country-package openfisca_tunisia tests
# Le système des pensions exige l'extra [pension] (numba) : `uv sync --extra pension`.
test-pension:
@echo "> Tests du système des pensions..."
$(UV) openfisca test --country-package openfisca_tunisia_pension tests_pension