♻️ Streamline ROMEO kernels and ship MIT notice with binaries#22
Merged
Conversation
Refactor calculate_weights_romeo_impl into a single (k, j, i) pass over voxels: skip boundary edges by construction (i+1<nx, j+1<ny, k+1<nz) instead of computing then zeroing them, drop the masked_mag full-volume copy in favor of an inline mag_at lambda, and remove the dead maxmag block left over for unported flags 5-6. Per-edge FP arithmetic is unchanged so the ROMEO goldens remain bit-exact. Fuse the four full-volume passes in voxel_quality (forward sum + three backward axis sweeps + divide-by-6) into a single (k, j, i) loop with the same left-to-right associativity as the original. 207 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The ROMEO C++ port under include/romeo/ is a derivative of MIT-licensed code, so the notice has to travel with binary distributions, not just the source tree. - pyproject.toml: declare license-files = [LICENSE, include/romeo/LICENSE] (PEP 639). Verified via `uv build --sdist` that PKG-INFO emits both files as License-File entries, so wheels also carry them under *.dist-info/licenses/. - packaging/pyinstaller/build_bundle.py: drop both files into a LICENSES/ directory inside each standalone bundle. - bundle_README.md: point users at LICENSES/. The Dockerfile already copies the full source tree (ADD . /opt/warpkit) so both notices ship in the image untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR modernizes the ROMEO C++ port by reducing redundant full-volume passes in the weight/voxel-quality kernels, and ensures ROMEO’s upstream MIT notice is included in binary distributions (wheels + PyInstaller bundles) alongside warpkit’s license.
Changes:
- Add PEP 639
license-filesmetadata so wheels include bothLICENSEandinclude/romeo/LICENSE. - Add bundling of both license notices into standalone PyInstaller bundles under
LICENSES/and document their location. - Refactor ROMEO
weightsandvoxel_qualitykernels to fuse/streamline passes while preserving intended boundary behavior via loop guards.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds PEP 639 license-files to ship ROMEO + warpkit license texts in wheels/sdists. |
| packaging/pyinstaller/build_bundle.py | Copies both license files into LICENSES/ within standalone bundles. |
| packaging/pyinstaller/bundle_README.md | Documents where bundled licenses live for end users. |
| include/romeo/weights.h | Rewrites weight computation into a single voxel-order pass and removes shadow buffers/trailing boundary zeroing. |
| include/romeo/voxel_quality.h | Fuses multiple sweeps into a single pass computing forward+backward contributions per voxel. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
=======================================
Coverage 95.42% 95.42%
=======================================
Files 15 15
Lines 1071 1071
=======================================
Hits 1022 1022
Misses 49 49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related but distinct cleanups on the ROMEO port. Split into separate commits so either can be reverted in isolation.
:recycle:Streamline weight + voxel_quality kernelsweights.h—calculate_weights_romeo_implrewritten as a single(k, j, i)pass over voxels. Boundary edges are skipped by construction (i+1<nx,j+1<ny,k+1<nz) instead of being computed then zeroed in a trailing pass. Themasked_magfull-volume copy is replaced by an inlinemag_atlambda — no shadow buffer. The deadmaxmagblock left over for unported flags 5-6 is gone.voxel_quality.h— the four full-volume passes (forward sum + three backward axis sweeps + divide-by-6) are fused into one(k, j, i)loop with the same left-to-right associativity as the original.Per-edge FP arithmetic is unchanged, so the ROMEO goldens remain bit-exact. All 207 tests pass.
:wrench:Ship ROMEO MIT notice with binary distributionsinclude/romeo/is a port of MIT-licensed code, so the notice has to travel with anything binary, not just the source tree. Today it travels with the headers (sdist / git checkout fine) but not with wheels or the standalonewk-*bundles.pyproject.toml: declarelicense-files = ["LICENSE", "include/romeo/LICENSE"](PEP 639). Verified viauv build --sdist— PKG-INFO emits both files asLicense-File:entries, so wheels also carry them under*.dist-info/licenses/.packaging/pyinstaller/build_bundle.py: drop both LICENSE files into aLICENSES/directory inside each standalone bundle.bundle_README.md: point users atLICENSES/.Dockerfile is unchanged —
ADD . /opt/warpkitalready ships both notices in the image.Test plan
uv sync --group dev --reinstall-package warpkit— clean rebuilduv run pytest -q— 207/207 passuv build --sdist— sdist builds,License-File:metadata for both files present in PKG-INFO*.dist-info/licenses/include/romeo/LICENSELICENSES/warpkit.LICENSEandLICENSES/ROMEO.LICENSEland inside the bundle zip🤖 Generated with Claude Code