Commit a9e2ad8
committed
fix(release): ship Rust _diffctx in PyPI wheels via maturin (v1.6.1 prep)
The PyPI wheel for v1.6.0 silently lacked the compiled `_diffctx`
extension because the build backend was `setuptools.build_meta` and CD
ran plain `python -m build`. Every `pip install treemapper` got a
pure-Python wheel; `treemapper . --diff HEAD~1..HEAD` (the headline
feature documented in the README) crashed with `ModuleNotFoundError:
No module named '_diffctx'`. Token counting and language detection
silently degraded the same way.
Changes:
- Switch build backend to maturin (pinned >=1.10,<1.11 to avoid the
1.11 editable-install regression) and refactor `from _diffctx import
...` -> `from treemapper._diffctx import ...` in 7 modules so the
compiled extension ships inside the treemapper package.
- Rewrite CD to build ABI3 wheels via PyO3/maturin-action@v1 across
Linux (x86_64, aarch64), macOS (x86_64, arm64) and Windows
(x86_64), plus a maturin sdist. Drop the orphan PyInstaller path.
- Add post-publish smoke job: install the published wheel from PyPI
on a clean runner, exercise treemapper --version, tree mode, the
_diffctx import and an end-to-end treemapper diff against a
throwaway git repo across {Linux, macOS, Windows} x {3.10, 3.13}.
The release fails if smoke fails.
- Lower --max-file-bytes default from 10 MB to 256 KB and warn on
stderr when serialized output exceeds 10 MB (the previous default
produced ~133 MB of YAML on cpython).
- Drop three stale --ignore=tests/test_graph*.py flags from CI;
those test files don't exist.
- Move the Zenodo paper DOI from the top of the Diff Context Mode
section to a footnote so the CLI value prop reads first.
- Delete stale paper-track scaffolding: PAPER_DEVIATIONS.md, QA.md,
Dockerfile.bench, requirements-bench.{txt,lock}, treemapper.spec,
whitelist_vulture.py, sonar-project.properties.
- Drop unused optional-deps groups [embeddings] and [nlp] and trim
[dev] of paper-only deps (mistune, lxml, ruamel-yaml, pebble,
mutmut, rank-bm25, pyinstaller).
- Add CHANGELOG.md (Keep-a-Changelog 1.1.0).
Local verification (M4 Pro, Python 3.12): maturin develop --release
builds, pytest is 408 passed / 1 skipped, ruff/black/mypy/lint-imports
green; fresh-venv wheel install reproduces a working
treemapper . --diff HEAD~1..HEAD end-to-end.1 parent 526e57a commit a9e2ad8
27 files changed
Lines changed: 315 additions & 1044 deletions
File tree
- .github/workflows
- benchmarks
- diffctx
- python/_diffctx
- src/treemapper
- diffctx
- tests
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
159 | | - | |
| 158 | + | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
163 | | - | |
| 161 | + | |
164 | 162 | | |
165 | | - | |
| 163 | + | |
166 | 164 | | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
173 | 171 | | |
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | 175 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 176 | + | |
182 | 177 | | |
183 | 178 | | |
184 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
This file was deleted.
This file was deleted.
0 commit comments