Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
71a0f59
COMP: Adopt pre-commit hygiene, formatting, and shell hooks
hjmjohnson Nov 21, 2026
22c774e
COMP: Adopt the Scientific Python pytest settings
hjmjohnson Nov 21, 2026
8e1b82d
COMP: Adopt the Scientific Python ruff rule list
hjmjohnson Nov 21, 2026
8049e5f
STYLE: Check spelling, reStructuredText, Markdown, and doc examples
hjmjohnson Nov 21, 2026
eb6ef7d
COMP: Add Dependabot for actions and the zizmor workflow audit
hjmjohnson Nov 21, 2026
fe75c18
COMP: Type-check scripts and tests with mypy in strict mode
hjmjohnson Nov 21, 2026
8749306
ENH: Add a nox task runner for lint, tests, and docs
hjmjohnson Nov 21, 2026
3c5e97d
ENH: Add target platform and architecture resolution
hjmjohnson Nov 21, 2026
6675138
ENH: Add remote module dependency and ITK version pinning
hjmjohnson Nov 21, 2026
f1eda14
ENH: Add the platform builder hierarchy and wheel packaging
hjmjohnson Nov 21, 2026
fe62860
ENH: Add the build_wheels.py driver and publishing scripts
hjmjohnson Nov 21, 2026
f62fbff
COMP: Add pixi environments, CMake support, and shell entry points
hjmjohnson Nov 21, 2026
5106193
ENH: Remove the superseded shell based build system
hjmjohnson Nov 21, 2026
af19c5e
DOC: Re-platform the documentation for the pixi build
hjmjohnson Nov 21, 2026
c5af701
ENH: Build the ITK modules ingested from remote modules into the wheels
hjmjohnson Nov 21, 2026
7cfabde
ENH: Add release-wheels, one command for each release build machine
hjmjohnson Nov 21, 2026
78e826c
ENH: Discard unreferenced code from Linux and macOS Python modules
hjmjohnson Nov 21, 2026
6cd88ce
ENH: Compile through sccache on Windows and ccache elsewhere
hjmjohnson Nov 21, 2026
d0c2b39
ENH: Pass CONTAINER_DNS to the manylinux build container as --dns
hjmjohnson Nov 21, 2026
9948f31
ENH: Make the wheels reproducible from the ITK commit
hjmjohnson Nov 21, 2026
84f0cd4
ENH: Reuse the build tree until the build inputs change
hjmjohnson Nov 21, 2026
168be24
DOC: Describe building, uploading, and testing every PyPI wheel
hjmjohnson Nov 22, 2026
a83ff71
ENH: Give the ITK wheels a PyPI description of their own
hjmjohnson Nov 22, 2026
7fcbb11
ENH: Hash compiler cache paths relative to the build directories
hjmjohnson Nov 22, 2026
6661e56
ENH: Trim the build directories from MSVC's __FILE__
hjmjohnson Nov 22, 2026
a6b0c1b
ENH: Pass CFLAGS, CXXFLAGS, and LDFLAGS to CMake as definitions
hjmjohnson Nov 22, 2026
52cac3d
BUG: Repair only the module wheels this build produced
hjmjohnson Nov 22, 2026
0f028ce
BUG: Retry the build archive download
hjmjohnson Nov 22, 2026
7f11e16
ENH: Limit concurrent link steps with a Ninja job pool
hjmjohnson Nov 23, 2026
8f78392
ENH: Stream build command output instead of printing it when done
dzenanz Nov 23, 2026
33759ad
BUG: Fail a release-wheels target that leaves no wheels
dzenanz Nov 23, 2026
ed14331
COMP: Provide bibtex so Doxygen resolves citations in wrapping docstr…
dzenanz Nov 23, 2026
0ca33d3
COMP: Provide Perl so Doxygen can run bibtex in manylinux builds
dzenanz Nov 23, 2026
35db748
ENH: Choose the wheel layout from the ITK major version
hjmjohnson Nov 23, 2026
be8d54c
BUG: Parse the Linux module script's options without GNU getopt
hjmjohnson Nov 23, 2026
f5f0cc2
BUG: Pass CMAKE_OPTIONS to the x64 module container intact
hjmjohnson Nov 23, 2026
42c9b82
BUG: Honor CONTAINER_DNS in the Linux module build
hjmjohnson Nov 23, 2026
1b11d77
BUG: Extract a symlinked build cache archive
hjmjohnson Nov 23, 2026
50789e1
BUG: Find 7-Zip on PATH when it is not in Program Files
hjmjohnson Nov 23, 2026
f477471
ENH: Name the rewritten module pyproject so *.whl cannot match it
hjmjohnson Nov 23, 2026
871aa39
BUG: Write MSVC trim prefixes with forward slashes
hjmjohnson Nov 23, 2026
a98d831
BUG: Keep Windows module wheels from replacing itk/__init__.py
hjmjohnson Nov 24, 2026
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ assignees: ""

## Steps to Reproduce


## Expected Behavior

<!-- What should happen. -->
Expand All @@ -28,6 +27,7 @@ assignees: ""
<summary>Log output</summary>

```

```

</details>
Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
cooldown:
default-days: 7
groups:
actions:
patterns:
- "*"
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Summary

<!-- One or two sentences describing what this PR does and why. -->

## Type of Change

- [ ] Bug fix
- [ ] New feature / enhancement
- [ ] Refactor / cleanup
- [ ] Docs / CI only

## Checklist

- [ ] Pre-commit hooks pass locally (`pre-commit run --all-files`)
- [ ] Tested wheel build on affected platform(s) (Linux / macOS / Windows)
- [ ] Docs updated if behavior changed (`docs/`)
- [ ] Commit messages use ITK prefixes (`BUG:`, `COMP:`, `DOC:`, `ENH:`, `PERF:`, `STYLE:`)

## Platform(s) Tested

<!-- Check all that apply, or note "untested" where applicable. -->

- [ ] Linux x86_64 (manylinux)
- [ ] Linux aarch64 (manylinux)
- [ ] macOS arm64
- [ ] Windows x86_64

## Related Issues

<!-- Closes #... -->
41 changes: 41 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: docs

on:
workflow_dispatch:
pull_request:
paths:
- "docs/**"
- ".readthedocs.yml"
push:
branches: [main]
paths:
- "docs/**"
- ".readthedocs.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11"
- name: Install dependencies
run: pip install -r docs/requirements-docs.txt
- name: Build docs
run: sphinx-build -W --keep-going -b html docs docs/_build/html
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: docs-html
path: docs/_build/html
retention-days: 7
26 changes: 26 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: pre-commit

on:
workflow_dispatch:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
36 changes: 36 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: tests

on:
workflow_dispatch:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --group dev
- name: Run tests
run: python -m pytest
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ lib
lib64
MANIFEST
oneTBB-prefix/
pyproject.toml

# Installer logs
pip-log.txt
Expand All @@ -54,6 +53,9 @@ pip-log.txt
.tox
coverage.xml
htmlcov
.pytest_cache/
.hypothesis/
__pycache__/

# Translations
*.mo
Expand All @@ -73,3 +75,15 @@ docs/_build
# IDE junk
.idea/*
*.swp
/itkVersion.py
# PyPI credentials
.pypirc

# pixi environments
.pixi/*
!.pixi/config.toml

# pixi installer that the Windows entry-point scripts fetch into the
# working directory (make_windows_zip.ps1,
# windows-download-cache-and-build-module-wheels.ps1)
install-pixi.ps1
122 changes: 122 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,121 @@
# Pre-commit configuration for ITKPythonPackage
# Run `pre-commit install` to install git hooks locally
# Run `pre-commit run --all-files` to check all files
# Run `pre-commit autoupdate` to update hook versions

# Exclude generated/vendored directories from all hooks
exclude: ^(\.pixi/|build/|docs/data/|pixi\.lock$)

repos:
# General file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
stages: [pre-commit]
- id: end-of-file-fixer
stages: [pre-commit]
- id: check-yaml
stages: [pre-commit]
- id: check-toml
stages: [pre-commit]
- id: check-merge-conflict
stages: [pre-commit]
- id: check-added-large-files
args: [--maxkb=500]
stages: [pre-commit]
# Enforce LF line endings everywhere except Windows PowerShell scripts
- id: mixed-line-ending
args: [--fix=lf]
exclude: \.ps1$
stages: [pre-commit]

# Python: linting, import sorting, and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.6
hooks:
- id: ruff-check
exclude: ^docs/
args: [--fix, --show-fixes]
stages: [pre-commit]
- id: ruff-format
exclude: ^docs/
stages: [pre-commit]

# Python: type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.4.1
hooks:
- id: mypy
pass_filenames: false
additional_dependencies: [pytest, hypothesis]
stages: [pre-commit]

# Spelling
- repo: https://github.com/codespell-project/codespell
rev: v2.4.3
hooks:
- id: codespell
stages: [pre-commit]

# reStructuredText and Python pattern checks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
stages: [pre-commit]
- id: rst-directive-colons
stages: [pre-commit]
- id: rst-inline-touching-normal
stages: [pre-commit]

# Python code blocks in the reStructuredText docs; ruff formats the rest
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.20.0
hooks:
- id: blacken-docs
files: ^docs/.*\.rst$
additional_dependencies: [black==24.10.0]
stages: [pre-commit]

# Markdown: formatting
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.10.1
hooks:
- id: prettier
types_or: [markdown]
stages: [pre-commit]

# GitHub Actions: security audit
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.32.0
hooks:
- id: zizmor
stages: [pre-commit]

# Shell: linting
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
stages: [pre-commit]

# Shell: formatting
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.12.0-2
hooks:
- id: shfmt
args: [-i, "2", -w]
stages: [pre-commit]

# TOML: formatting
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
stages: [pre-commit]

# ITK commit message hooks (matching ITK/Utilities/Hooks/)
- repo: local
hooks:
- id: local-prepare-commit-msg
Expand All @@ -11,3 +128,8 @@ repos:
entry: 'python3 Utilities/Hooks/kw-commit-msg.py'
language: system
stages: [commit-msg]

ci:
autoupdate_commit_msg: "COMP: Update pre-commit hooks"
autofix_commit_msg: "STYLE: Apply pre-commit fixes"
autoupdate_schedule: monthly
23 changes: 23 additions & 0 deletions .pypirc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .pypirc.example -- DO NOT commit real credentials
# Copy to ~/.pypirc and fill in your token.
#
# Generate a token at: https://pypi.org/manage/account/token/
# For TestPyPI: https://test.pypi.org/manage/account/token/
#
# Alternatively, set environment variables:
# TWINE_USERNAME=__token__
# TWINE_PASSWORD=pypi-<your-token>

[distutils]
index-servers =
pypi
testpypi

[pypi]
username = __token__
password = pypi-YOUR-TOKEN-HERE

[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-YOUR-TOKEN-HERE
13 changes: 13 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements-docs.txt
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

Loading
Loading