Skip to content

COMP: Build against ITK main; repair ExternalData, baselines, and docs CI#456

Merged
hjmjohnson merged 10 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:fix/ci-itk-pin-and-deps
Jun 12, 2026
Merged

COMP: Build against ITK main; repair ExternalData, baselines, and docs CI#456
hjmjohnson merged 10 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:fix/ci-itk-pin-and-deps

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Jun 11, 2026

Copy link
Copy Markdown
Member

Builds the examples against ITK main (was v5.4.2), recreates 20 lost Core/Common visuals, and repairs everything that surfaced once the stricter toolchain and dashboard actually ran: ExternalData staging, Python baseline skew, ITK 6 deprecations, the warning gate, and the docs environment. All 13 CI checks are green.

Change inventory (10 commits)
Commit What
COMP: Build against ITK main; sync ExternalData config Superbuild ITK_TAGmain; pip itk>=5.4.6, zarr>=3; URL templates mirror ITK; zarr2 compat shim for itkwidgets in the docs venv; drops the imported ExternalData_BINARY_ROOT that mis-staged fixtures
ENH: ComputeFFTInOneDimension sha512 → cid Legacy links converted; objects republished
DOC: Recreate lost Core/Common example visuals 20 figures from #440 were unrecoverable (ITKTestingData #63/#66 hold the new blobs)
COMP: Tolerate one intensity level in six baseline comparisons itk 5.4.6 wheels vs ITK main round one gray-level apart at quantization boundaries
STYLE: Replace deprecated iterator GetIndex and RNG Initialize calls Tree-wide sweep to *WithIndex iterators and SetSeed() (ITK 6 deprecations; GCC flags more sites than AppleClang)
COMP: Exempt benign lines from the warning gate UseITK.cmake deprecation (~350 configure lines), pip cache notice, example/file names containing "Warning", missing-doxygen-class lookups
COMP: Configure CTestCustom into the superbuild dir, COPYONLY The dashboard ctest runs at the superbuild root and never loaded the exceptions; configure_file without COPYONLY also substituted away the list's self-references
COMP: Add ITK-style pre-commit configuration clang-format v19.1.7 (tracks ITK's pin), black 25.12.0 (matches super-linter), pyupgrade, standard hygiene hooks
STYLE: Apply pre-commit mechanical fixes EOF/whitespace normalization, exec bits, black/pyupgrade output (117 files)
DOC: Store executed outputs in ConvertNumPyArrayToitkImage notebook + Sphinx warning fixes nbsphinx now skips executing it (itkwidgets view() is zarr-2-only); title underline + literal-block lexing fixes
Known follow-ups
  • Migrate ~350 example CMakeLists from include(${ITK_USE_FILE}) to imported targets (UseITK deprecation currently exempted).
  • Nightly InsightDoxygen XML is missing itk::AddImageFilter and itk::Statistics::SampleToHistogramFilter (lookups exempted; needs an upstream ITK doxygen-artifact fix).
  • Five .ipynb files contain invalid JSON (adjacent-string concatenation); excluded from the JSON hook until repaired.
  • itkwidgets zarr 3 incompatibility tracked upstream; the venv shim and stored notebook outputs decouple this PR from it.

@github-actions github-actions Bot added area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Data Changes to example data (usually displayed images) labels Jun 11, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review June 11, 2026 01:08
@hjmjohnson

Copy link
Copy Markdown
Member Author

Finding from #455's re-run: the sha512→cid conversion here is required, not cosmetic — the top-level CMakeLists.txt data-staging glob matches *.cid only, so the 6 .sha512 content links were never staged into the binary tree (MouseLiverRF.mha does not exist), and the baseline-comparison macro's string(REPLACE .cid "") likewise passes literal .mha.sha512 paths as baselines. The FFT tests have been structurally unable to run since those links were added.

@hjmjohnson

Copy link
Copy Markdown
Member Author

Folded the visual-cid fix from #455 (closed) into this PR as f759c48 — with ITKTestingData#63/#64/#65 all merged, every content link this PR's CI needs is now published. Remaining known blocker: the ITKReview/zlib link regression on ITK main hits the superbuild jobs (fix validated locally; ITK PR pending).

@hjmjohnson

Copy link
Copy Markdown
Member Author

Fixed the 277-test failure from the previous run: the ExternalData config sync imported ITK's ExternalData_BINARY_ROOT=${PROJECT_BINARY_DIR}/ExternalData, but this project's test macros reference staged fixtures at ${CMAKE_CURRENT_BINARY_DIR}/<Example>/<file>, which requires the default binary root. Dropped the line (fixup into the config-sync commit). Verified locally: previously-failing GetImageSize/ReadAPointSet/ReadWriteVectorImage/Iterate* tests all pass.

@github-actions github-actions Bot added area:Segmentation Issues affecting the Segmentation module language:C++ Changes to C++ examples labels Jun 12, 2026
@hjmjohnson hjmjohnson force-pushed the fix/ci-itk-pin-and-deps branch 2 times, most recently from 6585d6f to 3be442b Compare June 12, 2026 01:34
@github-actions github-actions Bot added area:IO Issues affecting the IO module area:Remotes Issues affecting the Remote module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module area:Bridge Issues affecting the Bridge module area:Nonunit Issues affecting the Nonunit module language:Python Changes to Python examples labels Jun 12, 2026
@hjmjohnson hjmjohnson force-pushed the fix/ci-itk-pin-and-deps branch 5 times, most recently from 53fc455 to a8eb989 Compare June 12, 2026 03:58
@hjmjohnson hjmjohnson force-pushed the fix/ci-itk-pin-and-deps branch 5 times, most recently from 7cc9ccd to 3411ef0 Compare June 12, 2026 07:30
Superbuild ITK_TAG v5.4.2 -> main, matching the C++ CI jobs and
picking up post-5.4.2 fixes behind the Python baseline mismatches.
pip itk pins -> >=5.4.6; zarr>=3.0.0 satisfies ngff-zarr OME-Zarr 0.5
(nbsphinx notebook execution failed without it).

ExternalData URL templates and module now mirror ITK main: adds the
Girder hashsum mirror (sole host of some legacy sha512 objects, e.g.
ComputeFFTInOneDimension), filebase and pinata public gateways, and
the WASI symlink guard; drops dead estuary.tech/w3s.link and the
released-root-CID gateways. The project-specific gin.g-node.org
mirror and ExternalData_LINK_CONTENT=CID are retained.
Last remaining hash-based links in the repository; blobs published
under CID in ITKTestingData#64.
The 20 PNGs referenced since InsightSoftwareConsortium#440 were never published to
ITKTestingData and are unrecoverable from any public source; every
build of Module_SphinxExamples fails 20 ExternalData fetches. Point
the .cid files at recreated diagrams (ITKTestingData#63) and fix the
Operator.png/Operation.png reference mismatch.
The pip itk 5.4.6 wheels and ITK main round differently at quantization
boundaries, leaving pixels one gray-level apart (plus sub-integer FFT
float noise) between Python and C++ example outputs compared against
shared baselines.
ITK main deprecates ImageConstIterator::GetIndex in favor of the
WithIndex iterator variants, and MersenneTwister Initialize() in favor
of SetSeed(). The zero-warning dashboard gate fails on these once the
superbuild targets ITK main.
Every example includes ${ITK_USE_FILE}, which ITK main deprecates;
migrating ~350 example CMakeLists to imported targets is follow-up
work.
Standard hygiene hooks plus clang-format v19.1.7 (must track ITK
main's pin; the lint CI job resolves it from ITK at run time), black,
and pyupgrade for Python.
end-of-file/trailing-whitespace normalization, exec bits on shebang
scripts, black and pyupgrade modernization of utility and example
Python.
@hjmjohnson hjmjohnson force-pushed the fix/ci-itk-pin-and-deps branch from 3411ef0 to 7658627 Compare June 12, 2026 07:57
nbsphinx (execute=auto) skips notebooks with stored outputs, matching
the other five notebooks; executing this one in the docs environment
fails because itkwidgets view() requires the zarr 2 API.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions Bot added the type:Python Notebook Changes to Python Notebook examples label Jun 12, 2026
Lengthen a short title underline, lex the FFT output block as text,
and exempt doxygenclass lookups for classes absent from the current
nightly InsightDoxygen XML.

@thewtex thewtex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazing, Hans!!

@hjmjohnson

Copy link
Copy Markdown
Member Author

@greptileai review

@hjmjohnson hjmjohnson changed the title COMP: Build against ITK main; sync ExternalData config; fix docs env COMP: Build against ITK main; repair ExternalData, baselines, and docs CI Jun 12, 2026

@dzenanz dzenanz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly looks good.

Comment thread .pre-commit-config.yaml
@@ -0,0 +1,53 @@
# Mirrors ITK's .pre-commit-config.yaml style gates for C++ and Python.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these file mode changes intentional? Why make these ~30 .py files executable? All of them should have the same file mode.

@hjmjohnson hjmjohnson left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a stable starting point.

@hjmjohnson hjmjohnson merged commit c9be6b0 into InsightSoftwareConsortium:main Jun 12, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Bridge Issues affecting the Bridge module area:Core Issues affecting the Core module area:Documentation Issues affecting the Documentation module area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Nonunit Issues affecting the Nonunit module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module area:Remotes Issues affecting the Remote module area:Segmentation Issues affecting the Segmentation module language:C++ Changes to C++ examples language:Python Changes to Python examples type:Compiler Compiler support or related warnings type:Data Changes to example data (usually displayed images) type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Python Notebook Changes to Python Notebook examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants