From 5710d0570050b7ba6023e3fb64c638e57e63b04b Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 2 Nov 2026 08:07:32 -0600 Subject: [PATCH 1/5] COMP: Move the macOS CI jobs to macos-15 and macos-15-intel GitHub retired the macos-13 runner image and retires macos-14 on November 2, 2026 (actions/runner-images#13518). Use macos-15-intel and macos-15 with Xcode 16.2, matching ITKRemoteModuleBuildTestPackageAction; the Xcode 14.3.1 and 15.0.1 selections do not exist on those images. Xcode 16 reports new ranlib and ld warnings for the bundled third-party libraries, and the dashboard script fails on any warning, so add them to the warning exceptions. --- .github/workflows/build-test-package.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index acb12e6..f03b058 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -16,7 +16,7 @@ jobs: strategy: max-parallel: 3 matrix: - os: [ubuntu-22.04, windows-2022, macos-13, macos-14] + os: [ubuntu-22.04, windows-2022, macos-15-intel, macos-15] include: - os: ubuntu-22.04 c-compiler: "gcc" @@ -26,11 +26,11 @@ jobs: c-compiler: "cl.exe" cxx-compiler: "cl.exe" cmake-build-type: "Release" - - os: macos-13 + - os: macos-15-intel c-compiler: "clang" cxx-compiler: "clang++" cmake-build-type: "MinSizeRel" - - os: macos-14 + - os: macos-15 c-compiler: "clang" cxx-compiler: "clang++" cmake-build-type: "MinSizeRel" @@ -56,14 +56,9 @@ jobs: uses: lukka/get-cmake@v3.29.6 - name: 'Specific XCode version' - if: matrix.os == 'macos-13' + if: startsWith(matrix.os, 'macos') run: | - sudo xcode-select -s "/Applications/Xcode_14.3.1.app" - - - name: 'Specific XCode version' - if: matrix.os == 'macos-14' - run: | - sudo xcode-select -s "/Applications/Xcode_15.0.1.app" + sudo xcode-select -s "/Applications/Xcode_16.2.app" - name: Download ITK run: | @@ -126,6 +121,8 @@ jobs: "ld: warning: text-based stub file" "Wunused-result" "file: .+ has no symbols" + "ranlib: archive library: .+ the table of contents is empty" + "ld: warning: no platform load command found in" "Wpointer-bool-conversion" "note: prefix with the address-of operator to silence this warning" "warning C4722: 'riegeli::internal::UnreachableStream::~UnreachableStream': destructor never returns, potential memory leak" @@ -254,7 +251,7 @@ jobs: path: dist/*.whl build-macos-arm-py: - runs-on: macos-14 + runs-on: macos-15 strategy: max-parallel: 2 matrix: @@ -265,7 +262,7 @@ jobs: - name: 'Specific XCode version' run: | - sudo xcode-select -s "/Applications/Xcode_15.0.1.app" + sudo xcode-select -s "/Applications/Xcode_16.2.app" - name: Get specific version of CMake, Ninja uses: lukka/get-cmake@v3.29.6 From bdb6dd86b779e5eb1e16959aabd3259333033fa4 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Tue, 3 Nov 2026 14:34:42 -0600 Subject: [PATCH 2/5] COMP: Build and package against ITK 5.4.7 The prebuilt ITK 5.4.0 Python build that the macOS wheel jobs download was made on Xcode 15.0.1, and its build.ninja names that SDK's libiconv.tbd, which the macos-15 image does not have. The 5.4.7 build and ITKPythonPackage scripts exist, and later 5.4 releases build with Xcode 16.2 in ITKRemoteModuleBuildTestPackageAction, so move the ITK checkout, the wheel build, and the packaging scripts together. The 5.4.7 wheels cover Python 3.9 to 3.11 only, so drop 3.8 from the Linux and Windows wheel matrices, remove the macOS steps that skipped 3.8, and require Python 3.9. --- .github/workflows/build-test-package.yml | 15 +++++---------- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index f03b058..eb4b087 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -3,10 +3,9 @@ name: Build, test, package on: [push,pull_request] env: - itk-git-tag: "v5.4.0" - itk-wheel-tag: "v5.4.0" - # v5.4.0 + fixes - itk-python-package-tag: "c9bb40bcb9f99938d071435e46f44d3d2b389482" + itk-git-tag: "v5.4.7" + itk-wheel-tag: "v5.4.7" + itk-python-package-tag: "v5.4.7" itk-python-package-org: "InsightSoftwareConsortium" ctest-options: "" @@ -172,7 +171,7 @@ jobs: strategy: max-parallel: 2 matrix: - python3-minor-version: ["8", "9", "10", "11"] + python3-minor-version: ["9", "10", "11"] manylinux-platform: ["_2_28-x64"] steps: @@ -271,7 +270,6 @@ jobs: - uses: ilammy/setup-nasm@v1 - name: 'Fetch build script' - if: matrix.python3-minor-version != '8' run: | IPP_DOWNLOAD_GIT_TAG=${{ env.itk-python-package-tag }} IPP_DOWNLOAD_ORG=${{ env.itk-python-package-org }} @@ -279,7 +277,6 @@ jobs: chmod u+x macpython-download-cache-and-build-module-wheels.sh - name: 'Build 🐍 Python 📦 package' - if: matrix.python3-minor-version != '8' shell: bash run: | rm -rf dist @@ -298,7 +295,6 @@ jobs: python-version: "3.11" - name: Validate build output - if: matrix.python3-minor-version != '8' shell: bash run: | python -m pip install twine @@ -316,7 +312,6 @@ jobs: python -m twine check ${WHEEL_PATTERN} - name: Publish Python package as GitHub Artifact - if: matrix.python3-minor-version != '8' uses: actions/upload-artifact@v4 with: name: MacOSArmWheel3${{ matrix.python3-minor-version }} @@ -327,7 +322,7 @@ jobs: strategy: max-parallel: 2 matrix: - python3-minor-version: ["8", "9", "10", "11"] + python3-minor-version: ["9", "10", "11"] steps: - name: Get specific version of CMake, Ninja diff --git a/pyproject.toml b/pyproject.toml index 9e4fc8e..273a838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Medical Science Apps.", "Topic :: Software Development :: Libraries", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "itk == 5.4.*", ] From 39b4c641fec7d9a34d2ab625b696c987463f32e4 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Tue, 3 Nov 2026 15:51:13 -0600 Subject: [PATCH 3/5] COMP: Update the GitHub Actions to their current major versions GitHub is forcing the Node 20 actions onto Node 24. Use the versions that ITKRemoteModuleBuildTestPackageAction uses for checkout, setup-python, get-cmake, upload-artifact, and download-artifact. --- .github/workflows/build-test-package.yml | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index eb4b087..03b6a95 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -35,7 +35,7 @@ jobs: cmake-build-type: "MinSizeRel" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Free Disk Space (Ubuntu) if: matrix.os == 'ubuntu-22.04' @@ -44,7 +44,7 @@ jobs: large-packages: false - name: Set up Python 3.11 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" @@ -52,7 +52,7 @@ jobs: - uses: ilammy/setup-nasm@v1 - name: Get specific version of CMake, Ninja - uses: lukka/get-cmake@v3.29.6 + uses: lukka/get-cmake@v4.4.2 - name: 'Specific XCode version' if: startsWith(matrix.os, 'macos') @@ -175,10 +175,10 @@ jobs: manylinux-platform: ["_2_28-x64"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Get specific version of CMake, Ninja - uses: lukka/get-cmake@v3.29.6 + uses: lukka/get-cmake@v4.4.2 - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@v1.3.1 @@ -216,7 +216,7 @@ jobs: ./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp3${{ matrix.python3-minor-version }} $CMAKE_OPTIONS - name: Set up Python 3.11 for Validation - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" @@ -238,13 +238,13 @@ jobs: python -m twine check ${WHEEL_PATTERN} - name: Publish Python package as GitHub Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: LinuxWheel3${{ matrix.python3-minor-version }}${{ matrix.manylinux-platform }} path: dist/*.whl - name: Publish Python package as GitHub Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: MacOSWheel3${{ matrix.python3-minor-version }} path: dist/*.whl @@ -257,14 +257,14 @@ jobs: python3-minor-version: ["9", "10", "11"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: 'Specific XCode version' run: | sudo xcode-select -s "/Applications/Xcode_16.2.app" - name: Get specific version of CMake, Ninja - uses: lukka/get-cmake@v3.29.6 + uses: lukka/get-cmake@v4.4.2 - uses: shogo82148/actions-setup-perl@v1 - uses: ilammy/setup-nasm@v1 @@ -290,7 +290,7 @@ jobs: ./macpython-download-cache-and-build-module-wheels.sh $CMAKE_OPTIONS "3.${{ matrix.python3-minor-version }}" - name: Set up Python 3.11 for Validation - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" @@ -312,7 +312,7 @@ jobs: python -m twine check ${WHEEL_PATTERN} - name: Publish Python package as GitHub Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: MacOSArmWheel3${{ matrix.python3-minor-version }} path: dist/*.whl @@ -326,9 +326,9 @@ jobs: steps: - name: Get specific version of CMake, Ninja - uses: lukka/get-cmake@v3.29.6 + uses: lukka/get-cmake@v4.4.2 - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: path: "im" @@ -371,7 +371,7 @@ jobs: cp 'dist\*.whl' '${{ github.workspace }}\dist' - name: Set up Python 3.11 for Validation - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" @@ -387,7 +387,7 @@ jobs: python -m twine check ${WHEEL_PATTERN} - name: Publish Python package as GitHub Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: WindowsWheel3${{ matrix.python3-minor-version }} path: dist/*.whl @@ -401,7 +401,7 @@ jobs: steps: - name: Download Python Packages - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 - name: Prepare packages for upload run: | From 337a23e0c3d427ce3d30215eadcd73ca9b2fbb75 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 20 Aug 2024 14:13:04 +0200 Subject: [PATCH 4/5] STYLE: Declare component type conversion functions constexpr Following Scott Meyers, Effective Modern C++, 2014, "Use `constexpr` whenever possible". --- src/itkOMEZarrNGFFImageIO.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/itkOMEZarrNGFFImageIO.cxx b/src/itkOMEZarrNGFFImageIO.cxx index 4062bdb..397de62 100644 --- a/src/itkOMEZarrNGFFImageIO.cxx +++ b/src/itkOMEZarrNGFFImageIO.cxx @@ -55,7 +55,7 @@ struct TypeList constexpr TypeList supportedPixelTypes{}; -IOComponentEnum +constexpr IOComponentEnum tensorstoreToITKComponentType(const tensorstore::DataType dtype) { switch (dtype.id()) @@ -97,7 +97,7 @@ tensorstoreToITKComponentType(const tensorstore::DataType dtype) } } -tensorstore::DataType +constexpr tensorstore::DataType itkToTensorstoreComponentType(const IOComponentEnum itkComponentType) { switch (itkComponentType) From 0828703e1e0ea4a7d4cc8b30fd94c1231b528883 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Tue, 3 Nov 2026 14:45:12 -0600 Subject: [PATCH 5/5] PERF: Call tensorstoreToITKComponentType at compile-time, by constexpr A variable template makes the compiler evaluate the conversion of each supported pixel type to an ITK component type at compile-time, instead of calling the function each time a read or write tries a pixel type. --- src/itkOMEZarrNGFFImageIO.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/itkOMEZarrNGFFImageIO.cxx b/src/itkOMEZarrNGFFImageIO.cxx index 397de62..3e857bc 100644 --- a/src/itkOMEZarrNGFFImageIO.cxx +++ b/src/itkOMEZarrNGFFImageIO.cxx @@ -172,6 +172,10 @@ MakePath(const int datasetIndex) return 's' + std::to_string(datasetIndex); } +// Variable template, ensuring that tensorstoreToITKComponentType is evaluated at compile-time. +template +constexpr IOComponentEnum toITKComponentType = tensorstoreToITKComponentType(tensorstore::dtype_v); + // Returns TensorStore KvStore driver name appropriate for this path. // Options are file, zip. TODO: http, gcs (GoogleCouldStorage), etc. std::string @@ -243,7 +247,7 @@ ReadFromStoreIfTypesMatch(const IOComponentEnum componentType, const ImageIORegion & storeIORegion, void * buffer) { - if (tensorstoreToITKComponentType(tensorstore::dtype_v) == componentType) + if (toITKComponentType == componentType) { ReadFromStore(store, storeIORegion, static_cast(buffer)); return true; @@ -274,7 +278,7 @@ WriteToStoreIfTypesMatch(const IOComponentEnum componentType, const std::vector & shape, const void * const buffer) { - if (tensorstoreToITKComponentType(tensorstore::dtype_v) == componentType) + if (toITKComponentType == componentType) { std::string dtype; // we prefer to write using our own endianness, so no conversion is necessary