-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
98 lines (74 loc) · 2.91 KB
/
Copy pathMakefile
File metadata and controls
98 lines (74 loc) · 2.91 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Native extension: always release unless you opt into develop-debug.
# Bare `maturin develop` (no -r) is DEBUG and will poison benches/tests.
all:
cat Makefile
build:
# wheel → release
maturin build --release
develop:
# editable install → release (~9x faster than debug; see PERF_2026-07-17.md)
maturin develop --uv --release
develop-debug:
maturin develop --uv
# Force release extension into the active env (idempotent enough for make).
ensure-release: develop
.PHONY: all build develop develop-debug ensure-release \
test test-basic test-xmltodict test-performance test-fast test-comparators \
install-test-deps install-bench-deps \
benchmark benchmark-real benchmark-firds benchmark-all \
readme-benchmarks show-benchmarks \
release-patch release-minor release-push clean
install-test-deps: ensure-release
# pure-Python extras only after release extension is in place
uv pip install -e ".[test]"
# editable reinstall can rebuild; re-assert release
maturin develop --uv --release
test: ensure-release
pytest
test-basic: ensure-release
pytest tests/test_basic.py
test-xmltodict: ensure-release
pytest tests/test_xmltodict.py
test-performance: ensure-release
pytest tests/test_performance.py
test-comparators: ensure-release
pytest tests/test_comparators.py
test-fast: ensure-release
pytest -m "not slow"
# Bench deps (xmltodict + lxml) then release extension
install-bench-deps: ensure-release
uv pip install -e ".[bench]"
maturin develop --uv --release
# Synthetic: dict + all stream backends → JSON + README tables
benchmark: install-bench-deps
python benchmark.py
# Real-world SwissProt / FIRDS (same stream backends, same JSON schema)
benchmark-real: install-bench-deps
python benchmark_real_world.py --dataset swissprot
benchmark-firds: install-bench-deps
python benchmark_real_world.py --dataset firds
benchmark-all: install-bench-deps
python benchmark_real_world.py --dataset both
$(MAKE) readme-benchmarks
# Rewrite README tables from benchmark_data/benchmark_results.json (no re-run)
readme-benchmarks:
python scripts/update_readme_benchmarks.py
# Pretty-print last results (no rebuild; no deps beyond stdlib for default mode)
show-benchmarks:
python scripts/print_benchmarks.py
# Release helpers (version is only in Cargo.toml; tag must match or PyPI gets wrong wheel)
# make release-patch # bump patch, commit, tag (no push)
# make release-push BUMP=patch # bump + commit + tag + push (triggers CI → PyPI)
# make release-push BUMP=0.3.0
# python scripts/release.py patch -m "note" --push --gh-release
BUMP ?= patch
release-patch:
python scripts/release.py patch
release-minor:
python scripts/release.py minor
release-push:
python scripts/release.py $(BUMP) --push
clean:
cargo clean
find . -path ./.venv -prune -o -path ./target -prune -o -name '*.so' -print | xargs -r rm -v
find . -path ./.venv -prune -o -path ./target -prune -o -name '*.pyc' -print | xargs -r rm -v