Skip to content

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

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

Depend on fastfields-helpers for enums and argument normalisation#29
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/numpy/__init__.py: from fastfields.dlpack import Bound, Splinefrom fastfields.helpers import Bound, Spline.
  • fastfields/numpy/_util.py: as_bound/as_spline re-exports now come from fastfields.helpers.
  • fastfields/numpy/_resample.py: anchor_scale_shift/infer_ndim/resolve_out_spatial now come from fastfields.helpers; docstring cross-reference updated.
  • tests/test_numpy.py: the two anchor_scale_shift imports now read from fastfields.helpers.
  • CLAUDE.md: "Depends only on fastfields-dlpack + numpy" corrected to name both.

Every import fastfields.dlpack as _ff (the compiled-binding usage in _dt.py/_sym.py/_reg.py/_pushpull.py/_resample.py) is untouched — only the pure-Python symbol imports moved.

Verification

Against a real build: installed fastfields-helpers, reinstalled this tree (pip install .), confirmed fastfields.numpy.Bound.__module__ == "fastfields.helpers" and that fastfields.dlpack.dt_euclidean (an actual compiled binding) is still reachable and untouched. Ran the full suite out-of-tree: 170 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 (removes the helpers this PR stops using) and the equivalent PRs on -torch/-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/anchor_scale_shift/
infer_ndim/resolve_out_spatial normalisers have moved out of
fastfields-dlpack into the new, dependency-free fastfields-helpers package
(fastfields/fastfields-helpers#1 in this migration). Switch this wrapper's
imports accordingly.
- pyproject.toml: add "fastfields-helpers==0.*" to dependencies, same
bare-wildcard-no-floor convention as fastfields-dlpack.
- fastfields/numpy/__init__.py: `from fastfields.dlpack import Bound, Spline`
-> `from fastfields.helpers import Bound, Spline`.
- fastfields/numpy/_util.py: as_bound/as_spline re-exports now come from
fastfields.helpers; comment updated.
- fastfields/numpy/_resample.py: anchor_scale_shift/infer_ndim/
resolve_out_spatial now come from fastfields.helpers; docstring reference
updated. `import fastfields.dlpack as _ff` (the compiled resample/
restriction/spline_coeff bindings) is untouched.
- tests/test_numpy.py: the two `from fastfields.dlpack import
anchor_scale_shift` imports now read from fastfields.helpers.
- CLAUDE.md: "Depends only on fastfields-dlpack + numpy" corrected to name
both dependencies.
Every `import fastfields.dlpack as _ff` (compiled-binding usage, in _dt.py/
_sym.py/_reg.py/_pushpull.py/_resample.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.numpy.Bound.__module__ ==
"fastfields.helpers"` and that `fastfields.dlpack.dt_euclidean` (an actual
compiled binding) is still reachable and untouched, then ran the full suite
out-of-tree: 170 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 d538939 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