Skip to content

Document filter test image comparison and baseline data workflow - #2643

Merged
blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:docs/testing-baseline-images
Jul 20, 2026
Merged

blowekamp merged 1 commit into
SimpleITK:mainfrom
blowekamp:docs/testing-baseline-images

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Adds two subsections to CONTRIBUTING.md under Testing, aimed at contributors adding or updating filter tests.

Changes

  • "Comparing filter test output": documents the YAML tests: schema (tag/inputs/tolerance/md5hash), how it's expanded by jinja templates into C++ gtest tests vs. wrapped-language (Lua/Ruby/R/Java/Tcl/C#) CMake tests, and the sitk_add_test()/sitkCompareDriver IMAGE_COMPARE/IMAGE_MD5_COMPARE/TRANSFORM_COMPARE arguments.
  • "Testing data and baseline images": documents missing-baseline auto-generation (and the cp command it prints to accept it), the numeric-suffix convention for multiple valid baselines, ExternalData-backed storage of baselines as .sha512 content links, and the sitk-upload-binary-data skill for uploading new/updated data.
  • Adds cp and newbaseline to .github/workflows/additional_dictionary.txt (comment-spell-check dictionary) and rewords one sentence to avoid a false positive on "prepends".

Testing

  • Verified against the actual implementation: Testing/Unit/TestBase/sitkImageCompare.cxx, sitkCompareDriver.cxx, Testing/Unit/sitkImageFilterTestTemplate.cxx.jinja, Testing/Unit/ImageFilterCTestTemplate.cmake.jinja, CMake/sitkAddTest.cmake, CMake/sitkExternalData.cmake, ExpandTemplateGenerator/simpleitk_filter_description.schema.json, and an example filter YAML (Code/BasicFilters/yaml/AdaptiveHistogramEqualizationImageFilter.yaml).
  • Pre-commit hooks pass, including comment-spell-check.

Add two CONTRIBUTING.md subsections under Testing:
- "Comparing filter test output" documents the YAML tests: schema
  (tag/inputs/tolerance/md5hash), how it is expanded into C++ gtest
  and wrapped-language CMake tests, and the sitk_add_test()/
  sitkCompareDriver IMAGE_COMPARE/IMAGE_MD5_COMPARE/TRANSFORM_COMPARE
  arguments.
- "Testing data and baseline images" documents missing-baseline
  auto-generation, the numbered-suffix convention for multiple valid
  baselines, ExternalData-backed storage, and the
  sitk-upload-binary-data skill for uploading new/updated data.

Add 'cp' and 'newbaseline' to the comment-spell-check dictionary.
@blowekamp
blowekamp force-pushed the docs/testing-baseline-images branch from ba11c1f to 75ff760 Compare July 20, 2026 14:15
@blowekamp
blowekamp marked this pull request as ready for review July 20, 2026 14:15
@blowekamp
blowekamp requested review from dave3d and zivy July 20, 2026 14:15
Comment thread .github/CONTRIBUTING.md
@blowekamp
blowekamp merged commit 86511fc into SimpleITK:main Jul 20, 2026
3 checks passed
@blowekamp
blowekamp deleted the docs/testing-baseline-images branch September 9, 2026 12:55
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