Skip to content

itk v5.4rc04 #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@ name: Build, test, package
on: [push,pull_request]

env:
itk-git-tag: "v5.3.0"
itk-wheel-tag: "v5.3.0"
itk-python-package-tag: "03391ad738438661fff40bfe37a7cfabd171b9b1"
itk-git-tag: "v5.4rc04"
itk-wheel-tag: "v5.4rc04"
itk-python-package-tag: "v5.4rc04"

jobs:
build-test-cxx:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [ubuntu-20.04, windows-2022, macos-11]
os: [ubuntu-22.04, windows-2022, macos-12]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
c-compiler: "gcc"
cxx-compiler: "g++"
cmake-build-type: "MinSizeRel"
- os: windows-2022
c-compiler: "cl.exe"
cxx-compiler: "cl.exe"
cmake-build-type: "Release"
- os: macos-11
- os: macos-12
c-compiler: "clang"
cxx-compiler: "clang++"
cmake-build-type: "MinSizeRel"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"

- name: Install build dependencies
run: |
Expand All @@ -43,7 +43,7 @@ jobs:
python -m pip install cookiecutter

- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.24.2
uses: lukka/get-cmake@v3.29.0

- name: Download ITK
run: |
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
shell: cmd

build-linux-python-packages:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
max-parallel: 2
matrix:
Expand All @@ -163,13 +163,13 @@ jobs:
sudo apt install zstd
unzstd --version

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"

- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.24.2
uses: lukka/get-cmake@v3.29.0

- name: Evaluate template
shell: bash
Expand Down Expand Up @@ -202,31 +202,31 @@ jobs:
path: Evaluated/ITKModuleTemplate/dist

build-macos-python-packages:
runs-on: macos-11
runs-on: macos-12
strategy:
max-parallel: 2
matrix:
python-version: ["38", "39", "310", "311"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: 'Specific XCode version'
run: |
sudo xcode-select -s "/Applications/Xcode_13.2.1.app"

- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.24.2
uses: lukka/get-cmake@v3.29.0

- name: 'Fetch build script'
run: |
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/${{ env.itk-python-package-tag }}/scripts/macpython-download-cache-and-build-module-wheels.sh -O
chmod u+x macpython-download-cache-and-build-module-wheels.sh

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"

- name: Evaluate template
shell: bash
Expand Down Expand Up @@ -270,12 +270,12 @@ jobs:
python-version: '3.x'

- name: Get specific version of CMake, Ninja
uses: lukka/get-cmake@v3.24.2
uses: lukka/get-cmake@v3.29.0

- name: Set up Python 3.8
uses: actions/setup-python@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.11"

- name: Evaluate template
shell: bash
Expand Down
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ documentation, and Python package documentation.</dd>

The output of the cookiecutter is a buildable ITK external module with
example classes. Remove or replace the classes with your new classes.
Push your new module to GitHub, and enable builds on
[CircleCI](https://circleci.com/), [TravisCI](https://travis-ci.org/),
and [AppVeyor](https://www.appveyor.com/).
Push your new module to GitHub. Cross-platform C++ testing and Python
packaging is provided via the [ITKRemoteModuleBuildTestPackageAction]
reusable GitHub Action.

Documentation on [how to populate the
module](https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch9.html#x50-1430009)
Expand Down Expand Up @@ -106,10 +106,21 @@ CI Testing and Python Packages

Continuous integration service configurations are included to build
and test the C++ core of packages across platforms and build binary
Python packages for Linux, macOS, and Windows. These packages can be
[downloaded](https://itkpythonpackage.readthedocs.io/en/master/Build_ITK_Module_Python_packages.html#github-automated-ci-package-builds)
and [uploaded to the Python Package Index
(PyPI)](https://itkpythonpackage.readthedocs.io/en/master/Build_ITK_Module_Python_packages.html#upload-the-packages-to-pypi).
Python packages for Linux, macOS, and Windows. For more information, see
the [ITKRemoteModuleBuildTestPackageAction] documentation.

pyproject.toml migration
------------------------

ITK 5.4 added support for [scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/),
an update to scikit-build classic that supports [PEP
517](https://peps.python.org/pep-0517/) and other modern Python packaging
standards configured in the declarative *pyproject.toml* file. While the
*setup.py* file is still supported in ITK 5.4, migration to *pyproject.toml*
is encouraged. One important advantage is the generation of Stable ABI wheels
for Python 3.11+; these packages work with Python 3.11, 3.12,
3.13, 3.14, etc. To migrate to scikit-build-core, use the pyproject.toml
template in this repository and remove the *setup.py* file.

ITKv4 Branch
------------
Expand All @@ -134,3 +145,5 @@ Authors
- Bradley Lowekamp
- Matt McCormick
- Jean-Baptiste VIMORT

[ITKRemoteModuleBuildTestPackageAction]: https://github.com/InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: [push,pull_request]

jobs:
cxx-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@246883ef3828fc00219145aeec9efa67b9889d0b
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@df1df6398389fa1a99d169b1264b9647d2164dd0

python-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@246883ef3828fc00219145aeec9efa67b9889d0b
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@df1df6398389fa1a99d169b1264b9647d2164dd0
secrets:
pypi_password: ${{ "{{" }} secrets.pypi_password {{ "}}" }}
108 changes: 108 additions & 0 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
[build-system]
requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"

[project]
name = "{{ cookiecutter.python_package_name }}"
version = "0.1.0"
description = "{{ cookiecutter.project_short_description }}"
readme = "README.rst"
license = {file = "LICENSE"}
authors = [
{ name = "{{ cookiecutter.full_name }}", email = "{{ cookiecutter.email }}" },
]
keywords = [
"itk",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: Android",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: C++",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Software Development :: Libraries",
]
requires-python = ">=3.8"
dependencies = [
"itk>=5.4rc4",
]

[project.urls]
Download = "{{ cookiecutter.download_url }}"
Homepage = "{{ cookiecutter.download_url }}"

[tool.scikit-build]
# The versions of CMake to allow. If CMake is not present on the system or does
# not pass this specifier, it will be downloaded via PyPI if possible. An empty
# string will disable this check.
cmake.version = ">=3.16.3"

# A list of args to pass to CMake when configuring the project. Setting this in
# config or envvar will override toml. See also ``cmake.define``.
cmake.args = []

# A table of defines to pass to CMake when configuring the project. Additive.
cmake.define = {}

# Verbose printout when building.
cmake.verbose = true

# The build type to use when building the project. Valid options are: "Debug",
# "Release", "RelWithDebInfo", "MinSizeRel", "", etc.
cmake.build-type = "Release"

# The source directory to use when building the project. Currently only affects
# the native builder (not the setuptools plugin).
cmake.source-dir = "."

# The versions of Ninja to allow. If Ninja is not present on the system or does
# not pass this specifier, it will be downloaded via PyPI if possible. An empty
# string will disable this check.
ninja.version = ">=1.11"

# The logging level to display, "DEBUG", "INFO", "WARNING", and "ERROR" are
# possible options.
logging.level = "INFO"

# Files to include in the SDist even if they are skipped by default. Supports
# gitignore syntax.
sdist.include = []

# Files to exclude from the SDist even if they are included by default. Supports
# gitignore syntax.
sdist.exclude = []

# A list of license files to include in the wheel. Supports glob patterns.
wheel.license-files = ["LICEN[CS]E*",]

# Target the platlib or the purelib. If not set, the default is to target the
# platlib if wheel.cmake is true, and the purelib otherwise.
wheel.platlib = "false"

# If CMake is less than this value, backport a copy of FindPython. Set to 0
# disable this, or the empty string.
backport.find-python = "3.26.1"

# Select the editable mode to use. Can be "redirect" (default) or "inplace".
editable.mode = "redirect"

# Rebuild the project when the package is imported. The build-directory must be
# set.
editable.rebuild = false

# If set, this will provide a method for scikit-build-core backward compatibility.
minimum-version = "0.8.2"

# The build directory. Defaults to a temporary directory, but can be set.
build-dir = "build/{wheel_tag}"
48 changes: 0 additions & 48 deletions {{cookiecutter.project_name}}/setup.py

This file was deleted.