-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (57 loc) · 1.71 KB
/
Makefile
File metadata and controls
72 lines (57 loc) · 1.71 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
68
69
70
71
72
UV ?= uv
SRC_FILES := sphinx_rst_table tests
DOCS_DIR := docs
DOCS_BUILD_DIR := $(DOCS_DIR)/_build
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null \
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
| sort \
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
.PHONY: sync
sync:
$(UV) sync --all-groups
.PHONY: lock
lock:
$(UV) lock
.PHONY: lint
lint:
$(UV) run --only-group lint ruff check $(SRC_FILES)
$(UV) run --only-group lint ruff format --check $(SRC_FILES)
.PHONY: format
format:
$(UV) run --only-group lint ruff format $(SRC_FILES)
$(UV) run --only-group lint ruff check --fix $(SRC_FILES)
.PHONY: test
test:
$(UV) run --group test python -m pytest -n auto tests/
.PHONY: test-short
test-short:
$(UV) run --group test python -m pytest -n auto --ignore-glob="*official*" tests/
.PHONY: test-matrix
test-matrix:
$(UV) run --with tox --with tox-uv tox
.PHONY: docs-html
docs-html:
$(UV) run --group docs sphinx-build -a -E -j auto -b html $(DOCS_DIR)/ $(DOCS_BUILD_DIR)/html
.PHONY: docs-html-fast
docs-html-fast:
$(UV) run --group docs sphinx-build -j auto -b html $(DOCS_DIR)/ $(DOCS_BUILD_DIR)/html
.PHONY: docs-linkcheck
docs-linkcheck:
$(UV) run --group docs sphinx-build -j auto -b linkcheck $(DOCS_DIR)/ $(DOCS_BUILD_DIR)/linkcheck
.PHONY: docs-pdf
docs-pdf:
$(UV) run --group docs sphinx-build -b latex $(DOCS_DIR)/ $(DOCS_BUILD_DIR)/latex
$(MAKE) -C $(DOCS_BUILD_DIR)/latex all-pdf
.PHONY: build
build:
rm -rf dist/
$(UV) build
.PHONY: publish
publish: build
$(UV) publish
.PHONY: clean
clean:
rm -rf .pytest_cache .ruff_cache .tox .venv dist build $(DOCS_BUILD_DIR)
find . -type d -name __pycache__ -prune -exec rm -rf {} +