-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (48 loc) · 1.52 KB
/
Copy pathMakefile
File metadata and controls
60 lines (48 loc) · 1.52 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
.ONESHELL:
UV_VERSION ?= 0.11.21
PIP_AUDIT_VERSION ?= 2.10.0
.PHONY: all install update test lint audit clean builddocs servedocs cleandocs
all: install
install:
python -m venv ./venv
venv/bin/python --version
venv/bin/python -m pip install --upgrade pip
venv/bin/pip install uv==$(UV_VERSION)
@. venv/bin/activate && \
uv lock && \
uv sync --active --locked --extra dev --extra docs && \
pre-commit install
update:
@. venv/bin/activate && \
python -m pip install --upgrade pip && \
pip install --upgrade uv==$(UV_VERSION) && \
uv lock --upgrade && \
uv sync --active --locked --extra dev --extra docs
test:
pytest
lint:
ruff check . --fix --exit-non-zero-on-fix
ruff format
mypy .
audit:
@. venv/bin/activate && \
uv lock --check && \
uv export --locked --extra dev --no-emit-project -o requirements-audit.txt && \
uvx pip-audit==$(PIP_AUDIT_VERSION) -r requirements-audit.txt && \
rm -f requirements-audit.txt
clean:
@. venv/bin/activate && \
pre-commit uninstall && \
rm -rf venv
builddocs:
@echo "📚 Building documentation..."
cd docs && sphinx-build -b html source build/html
@echo "✅ Documentation built in docs/build/html/"
servedocs:
@echo "📚 Starting live documentation server..."
cd docs && sphinx-autobuild source build/html --host 127.0.0.1 --port 8000 --re-ignore ".*\..*"
@echo "🌐 Documentation server running at http://127.0.0.1:8000"
cleandocs:
@echo "🧹 Cleaning documentation artifacts..."
rm -rf docs/build/ docs/source/api/generated/
@echo "✅ Documentation artifacts cleaned"