Skip to content

Depend on fastfields-helpers for enums and argument normalisation - #34

Merged
balbasty merged 1 commit into
mainfrom
use-fastfields-helpers
Aug 18, 2026
Merged

Depend on fastfields-helpers for enums and argument normalisation#34
balbasty merged 1 commit into
mainfrom
use-fastfields-helpers

Conversation

@balbasty

Copy link
Copy Markdown
Contributor

What

Switches this wrapper from fastfields.dlpack's (now-removed) pure-Python helpers to the new, dependency-free fastfields-helpers package.

  • 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 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: "enums re-exported from fastfields.dlpack" corrected to fastfields.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 .), confirmed fastfields.torch.Bound.__module__ == "fastfields.helpers" and Requires: fastfields-dlpack, fastfields-helpers, numpy, torch. Ran the full suite out-of-tree: 243 passed (0 failed — the 11 pre-existing dt_mesh failures in this migration's baseline cleared after a clean fastfields-dlpack reinstall, unrelated to this change's scope). ruff check + ruff format --check clean.

Sequencing

Companion to fastfields-dlpack#31 and 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

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
@balbasty
balbasty merged commit f8fffea into mainAug 18, 2026
1 of 7 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@balbasty@claude