Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (48 loc) · 1.53 KB
/
Copy pathMakefile
File metadata and controls
62 lines (48 loc) · 1.53 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
# Package
name ?= dualeai
python_version ?= 3.10
version_full ?= $(shell $(MAKE) --silent version-full)
version_small ?= $(shell $(MAKE) --silent version)
version:
@bash ./cicd/version.sh -g . -c
version-full:
@bash ./cicd/version.sh -g . -c -m
version-pypi:
@bash ./cicd/version.sh -g .
install:
uv venv --python $(python_version) --allow-existing
$(MAKE) install-deps
install-deps:
uv sync --extra dev
upgrade:
uv lock --upgrade --refresh
test:
$(MAKE) test-static
$(MAKE) test-func
# `uv lock --check` proves uv.lock still matches pyproject.toml. CI syncs with
# `uv sync --frozen`, which skips that check, so drift lands silently.
test-static:
uv lock --check
uv run ruff format --check .
uv run ruff check .
uv run ty check .
uv run -m vulture src tests examples vulture_whitelist.py
test-func:
$(MAKE) test-unit
$(MAKE) test-int
# `not integration` rather than `unit`: an unmarked test then runs here instead of
# being dropped by both passes. `--ignore=tests/benchmarks` keeps benchmarks out,
# and `test-bench` selects that directory rather than the `benchmark` marker.
test-unit:
uv run pytest tests/ -v -n auto -m "not integration" --ignore=tests/benchmarks
test-int:
uv run pytest tests/ -v -n 0 -m "integration" --ignore=tests/benchmarks --no-cov
test-bench:
uv run pytest tests/benchmarks/ --codspeed -v --no-cov -p no:xdist -o "addopts="
lint:
uv run ruff format .
uv run ruff check --fix .
uv run ty check .
uv run -m vulture src tests examples vulture_whitelist.py
dev:
@echo "Dev runner not implemented yet."