Uh oh!
There was an error while loading. Please reload this page.
Depend on fastfields-helpers for enums and argument normalisation - #34
Merged
Conversation
The Spline/Bound enums and the as_spline/as_bound/check_ndim/infer_ndim/ resolve_out_spatial/anchor_scale_shift normalisers have moved out of fastfields-dlpack into the new, dependency-free fastfields-helpers package. Switch this wrapper's imports accordingly. - pyproject.toml: add "fastfields-helpers==0.*" to dependencies, same bare-wildcard-no-floor convention as fastfields-dlpack. - fastfields/torch/__init__.py: Bound/Spline now from fastfields.helpers. - fastfields/torch/_reg.py, _pushpull.py: as_bound/as_spline now from fastfields.helpers. - fastfields/torch/_resample.py: the combined Bound/anchor_scale_shift/as_bound/as_spline/check_ndim/infer_ndim/ resolve_out_spatial import now reads from fastfields.helpers; the anchor_scale_shift docstring cross-reference updated. The docstring lines citing fastfields.dlpack.resample/restriction/spline_coeff are untouched -- those are the actual compiled bindings, which never moved. - tests/test_torch.py: the anchor_scale_shift import now reads from fastfields.helpers. - README.md / CLAUDE.md: "Spline/Bound ... re-exported from fastfields.dlpack" corrected to fastfields.helpers; the build-deps line now names both packages. Every `import fastfields.dlpack as _fb` (compiled-binding usage, in _dt.py/ _sym.py/_reg.py/_pushpull.py/_resample.py/tests/test_reg_family_routing.py) is untouched -- only the pure-Python symbol imports moved. Verified against a real build: installed fastfields-helpers, reinstalled this tree (pip install .), confirmed `fastfields.torch.Bound.__module__ == "fastfields.helpers"` and `Requires: fastfields-dlpack, fastfields-helpers, numpy, torch`, then ran the full suite out-of-tree: 243 passed (0 failed -- the pre-existing dt_mesh failures from this migration's baseline cleared after a clean dlpack reinstall, unrelated to this change's scope). ruff check + ruff format --check clean on every changed file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016AjQcY78NgbagPSbPJRr6Z
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
What
Switches this wrapper from
fastfields.dlpack's (now-removed) pure-Python helpers to the new, dependency-freefastfields-helperspackage.pyproject.toml: add"fastfields-helpers==0.*"to dependencies, same bare-wildcard-no-floor convention asfastfields-dlpack.fastfields/torch/__init__.py:Bound/Splinenow fromfastfields.helpers.fastfields/torch/_reg.py,_pushpull.py:as_bound/as_splinenow fromfastfields.helpers.fastfields/torch/_resample.py: the combinedBound/anchor_scale_shift/as_bound/as_spline/check_ndim/infer_ndim/resolve_out_spatialimport now reads fromfastfields.helpers; theanchor_scale_shiftdocstring cross-reference updated. The lines citingfastfields.dlpack.resample/restriction/spline_coeffare untouched — those are the actual compiled bindings, which never moved.tests/test_torch.py: theanchor_scale_shiftimport now reads fromfastfields.helpers.README.md/CLAUDE.md: "enums re-exported from fastfields.dlpack" corrected tofastfields.helpers; build-deps line names both packages.Every
import fastfields.dlpack as _fb(compiled-binding usage) is untouched — only the pure-Python symbol imports moved.Verification
Against a real build: installed
fastfields-helpers, reinstalled this tree (pip install .), confirmedfastfields.torch.Bound.__module__ == "fastfields.helpers"andRequires: fastfields-dlpack, fastfields-helpers, numpy, torch. Ran the full suite out-of-tree: 243 passed (0 failed — the 11 pre-existingdt_meshfailures in this migration's baseline cleared after a cleanfastfields-dlpackreinstall, unrelated to this change's scope).ruff check+ruff format --checkclean.Sequencing
Companion to
fastfields-dlpack#31and the equivalent PRs on-numpy/-cupy/fastfields, merged together to keep the broken-dependency window short.🤖 Generated with Claude Code
https://claude.ai/code/session_016AjQcY78NgbagPSbPJRr6Z
Generated by Claude Code