Skip to content

build: upgrade to itkwasm-downsample 2.0.1 - #638

Merged
thewtex merged 5 commits into
fideus-labs:mainfrom
vboussot:chore/itkwasm-downsample-2.0.1
Aug 12, 2026
Merged

build: upgrade to itkwasm-downsample 2.0.1#638
thewtex merged 5 commits into
fideus-labs:mainfrom
vboussot:chore/itkwasm-downsample-2.0.1

Conversation

@vboussot

@vboussot vboussot commented Aug 12, 2026

Copy link
Copy Markdown
Member

Follow-up from #626 (comment).

  • Require itkwasm-downsample 2.0.1 in both ports and refresh the lockfiles.
  • 2.0.1 fixes the pipeline abort while reconstructing B-spline transforms, so itk_transform_resample_bounding_box now takes an itk.BSplineTransform (and the affine + B-spline composite a registration returns) directly; covered by two new tests and the limitation note is removed from the docs.
  • The downsampled pixels are bit-for-bit unchanged; only the multiscales metadata's recorded downsampler version moves to 2.0.1. That provenance field is now excluded from the baseline metadata comparison so future upgrades stop forcing baseline-archive rebuilds.

Full py bounding-box/downsampling suites and the TS suite (484 tests) pass locally against 2.0.1.

Summary by CodeRabbit

  • Bug Fixes

    • Improved metadata comparisons so expected version-related differences no longer cause failures.
    • Updated downsampling integration to use the latest compatible release.
  • Tests

    • Added coverage for B-spline and combined affine/B-spline transform bounding boxes.
    • Added regression coverage to ensure only expected provenance differences are ignored.
  • Documentation

    • Simplified ITK transformation documentation by removing outdated failure notes and parameterization details.

2.0.1 fixes the pipeline abort while reconstructing B-spline
transforms; the downsampled pixels are unchanged.
itkwasm-downsample 2.0.1 reconstructs BSplineTransform instead of
aborting; cover the bare transform and the affine + B-spline composite
a registration returns.

The multiscales metadata block records the downsampler's version, which
changes on every upgrade while the pixels stay identical. Exclude that
provenance field from the baseline metadata comparison so upgrades stop
forcing baseline-archive rebuilds.
itkwasm-downsample 2.0.1 reconstructs B-spline transforms, so the
upstream defect the note described is fixed.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3fd5632e-2003-4302-9976-1631dca333a9

📥 Commits

Reviewing files that changed from the base of the PR and between c159863 and 4c59a5f.

📒 Files selected for processing (2)
  • py/test/_data.py
  • py/test/test_baseline_guard.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • py/test/_data.py

📝 Walkthrough

Walkthrough

The change requires itkwasm-downsample 2.0.1, adds B-spline bounding-box tests, narrows metadata comparison exclusions, and removes an outdated ITK documentation note.

Changes

Resampling and metadata validation

Layer / File(s) Summary
Downsample 2.0.1 and B-spline coverage
py/pyproject.toml, ts/deno.json, docs/itk.md, py/test/test_itk_transform_resample_bounding_box.py
Python and Deno now require itkwasm-downsample 2.0.1. Tests cover direct identity B-spline transforms and affine-plus-B-spline composites. The outdated ITK limitation note is removed.
Metadata version comparison
py/test/_data.py, py/test/test_baseline_guard.py
Metadata comparison ignores multiscales version fields at supported paths. Regression tests verify that nested look-alike paths remain significant.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: thewtex

Poem

A rabbit bounds through splines bright,
With boxes measured left and right.
Downsample wears a newer tag,
Metadata guards each flag.
Old notes fade; new tests glow—
Clean paths guide the code to go.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the primary change: upgrading itkwasm-downsample to version 2.0.1.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@py/test/_data.py`:
- Around line 272-276: Update the exclude_regex_paths configuration in the test
data to match only the supported root .zattrs paths: direct root metadata and
consolidated metadata under ['metadata']['.zattrs']; anchor each alternative so
DeepDiff’s re.search() cannot match nested paths. Add pytest coverage verifying
allowed provenance changes in those paths and rejecting equivalent nested
metadata changes.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9b24aac9-147d-4be1-a3be-f5e3e08f358e

📥 Commits

Reviewing files that changed from the base of the PR and between 86e3e69 and c159863.

⛔ Files ignored due to path filters (2)
  • py/pixi.lock is excluded by !**/*.lock
  • ts/deno.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • docs/itk.md
  • py/pyproject.toml
  • py/test/_data.py
  • py/test/test_itk_transform_resample_bounding_box.py
  • ts/deno.json
💤 Files with no reviewable changes (1)
  • docs/itk.md

Comment thread py/test/_data.py
DeepDiff applies exclude_regex_paths with re.search, so the suffix-only
pattern would also ignore a version field on a look-alike path nested
anywhere in the metadata. Anchor the exclusion to the root .zattrs
object and the consolidated .zmetadata copy, and cover both the allowed
in-place drift and the rejected nested change.
The 0.5 layout keeps the attributes under zarr.json's "ome" key, a
third path shape for the recorded downsampler version. Anchor it like
the .zattrs forms, extend the guard test to the 0.5 layout, and apply
ruff's formatting to the guard test.
@thewtex
thewtex merged commit 302deee into fideus-labs:main Aug 12, 2026
50 checks passed
@vboussot
vboussot deleted the chore/itkwasm-downsample-2.0.1 branch August 25, 2026 07:25
Sign up for free to 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