-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (51 loc) · 1.34 KB
/
Makefile
File metadata and controls
67 lines (51 loc) · 1.34 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
# Makefile for easy development workflows.
# Note GitHub Actions call uv directly, not this Makefile.
.DEFAULT_GOAL := default
.PHONY: default install lint test golden coverage-golden upgrade build clean docs-serve docs-build docs-check
default: install lint test
install:
uv sync --locked --all-extras --dev
lint:
uv run devtools/lint.py
test:
uv run pytest
golden:
uv run devtools/golden.py
coverage-golden:
uv run devtools/coverage_golden.py
upgrade:
uv lock --upgrade
uv sync --locked --all-extras --dev
build:
uv build
docs-serve:
DISABLE_MKDOCS_2_WARNING=true uv run --group docs mkdocs serve
docs-build:
DISABLE_MKDOCS_2_WARNING=true uv run --group docs mkdocs build --strict
docs-check: docs-build
# Improved Windows detection
ifeq ($(OS),Windows_NT)
WINDOWS := 1
else
ifeq ($(shell uname -s),Windows)
WINDOWS := 1
else
WINDOWS := 0
endif
endif
ifeq ($(WINDOWS),1)
# Windows commands
RM = powershell -Command "Remove-Item -Recurse -Force"
FIND_PYCACHE = powershell -Command "Get-ChildItem -Path . -Filter '__pycache__' -Recurse -Directory | Remove-Item -Recurse -Force"
else
# Unix commands
RM = rm -rf
FIND_PYCACHE = find . -type d -name "__pycache__" -exec rm -rf {} +
endif
clean:
$(RM) dist/
$(RM) *.egg-info/
$(RM) .pytest_cache/
$(RM) .mypy_cache/
$(RM) .venv/
$(FIND_PYCACHE)