ENH: Build/tooling housecleaning ahead of FEM removal and ITKv6 content updates#236
Open
hjmjohnson wants to merge 8 commits into
Open
Conversation
Provide a conda-forge-backed pixi workspace so the books and tooling build from a single locked environment. 'pixi run build' runs the SuperBuild configure and build in one step; 'pixi run -e pre-commit ...' drives the hooks. A full TeX distribution on conda-forge exists only as the linux-only texlive-core, so macOS/Windows builds rely on a system TeX (MacTeX/MiKTeX) on PATH.
Add whitespace/EOF/large-file/merge-conflict content hooks, an advisory per-file chktex LaTeX lint carrying the ignore-code policy from latex_linter.sh, and a commit-msg-stage check reusing the authoritative Utilities/Hooks/commit-msg prefix rule.
The interpreter line read /usr/bin/evn bash, so invoking the script directly failed to exec.
- Use https for external git clones; remove the USE_GIT_PROTOCOL option (the git:// protocol was retired by GitHub) and its now-dead -D flag from the pixi configure task and CI. - Fix CMAKE_CX_FLAGS -> CMAKE_CXX_FLAGS typo so the HDF5 -fopenmp strip actually applies to the ITK C++ flags. - Remove dead guards: CMAKE_VERSION VERSION_LESS 2.8.9 and the DARWIN_MAJOR_VERSION < 9 (Mac OSX 10.5) platform checks, both unreachable under the 3.22.1 minimum.
Unify the ITK requirement on major version 6 across the SuperBuild and
Phase II (was a mix of 4, 5, and 6 while the SuperBuild builds v6.0b02),
and update the CreateAModule book example to match. Remove the legacy
include(${ITK_USE_FILE}) from the system-ITK fallback; modern ITK is
consumed via imported targets after find_package, so the use-file global
include/flag injection is unnecessary. Use the COMPONENTS keyword for the
ITKReview request.
- Drop redundant cmake_policy(VERSION) calls that duplicate the version
already set by cmake_minimum_required.
- Replace the deprecated FindPythonInterp module (PYTHON_EXECUTABLE,
PYTHONINTERP_FOUND) with FindPython3 (Python3_EXECUTABLE) for the
example-running and LaTeX-extraction scripts.
- Bump Cover/Source minimum to 3.22.1 and link via the standard
${ITK_LIBRARIES} instead of the non-standard ${ITK_INTERFACE_LIBRARIES}.
Resolve ImageMagick with find_program(NAMES magick REQUIRED) (ImageMagick 7 only; drop IM6) and invoke EPS conversion through the 'magick convert' subcommand. IM7's bare 'magick' parser rejects image operators placed before the input (e.g. -flip), whereas the 'convert' subcommand accepts the existing operator-before-input ordering used by the figure-conversion commands.
Replace the apt-installed toolchain (texlive, ghostscript, ImageMagick 6 plus the policy.xml read|write workaround) with 'pixi run build', so CI uses the same conda-forge environment as local builds: ImageMagick 7, ghostscript, Pygments, and a Linux texlive. Removes the IM6-specific policy hack and the manual dependency list.
Member
Author
|
Motivated by : InsightSoftwareConsortium/ITK#6524 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preparatory build/tooling housecleaning ahead of two follow-up efforts: removing the FEM references from the Software Guide, and updating the guide content for ITKv6. This PR changes no book prose; it modernizes how the guide is built, tested, and rendered so that the content work lands on a clean, reproducible foundation.
No reviewer action is required beyond a normal review — there are no behavioral changes to the published books (both PDFs render byte-for-byte as before).
What's included (8 commits)
pixiworkspace;pixi run buildruns the SuperBuild end to end (ITK + tooling + both PDFs). ccache is instrumented (CMAKE_*_COMPILER_LAUNCHER=ccache,CCACHE_BASE_DIR=$PWD/build) for fast rebuilds.chktexLaTeX lint (ignore-policy carried over fromUtilities/latex_linter.sh), and theDOC:/ENH:/BUG:/…commit-prefix gate reusing the existingUtilities/Hooks/commit-msg.git://protocol option (usehttps), fix aCMAKE_CX_FLAGS→CMAKE_CXX_FLAGStypo, remove deadCMAKE_VERSION < 2.8.9/DARWIN_MAJOR_VERSION < 9guards.v6.0b02); drop the deprecatedinclude(${ITK_USE_FILE}).cmake_policy(VERSION)calls, migrateFindPythonInterp→FindPython3, fix Cover/Source to link${ITK_LIBRARIES}.magickviafind_programand convert via themagick convertsubcommand (drops the IM6 dependency).ubuntu-latest—setup-pixifor ImageMagick 7 / ghostscript / Pygments / cmake / ninja, plus apttexlive-latex-extrafor a real LaTeX, replacing the old IM6 +policy.xmlworkaround.Verification
pixi run buildis green; both PDFs render at the expected sizes. ccache hot-rebuild measured at ~99.98% hit rate.texlive-coreis engine-only (no LaTeX packages), which all macOS builds had masked via system MacTeX. The fix (system TeX + pixi for IM7/Pygments) was verified on a Linux host:pdflatexresolves to the system,magick/pygmentizeto the pixi env, and aminteddocument compiles to PDF.setup-pixiflow onubuntu-latestis exercised for the first time by this PR's CI run.Scope notes
pre-commit run --all-files; the repository has never had pre-commit, so a full sweep would reformat the entire legacy guide and bury the tooling changes. Only the files touched here are hook-clean. A separate mass-format pass can follow.setup-pixiis pinned to thev0.9.6release tag (a SHA pin was considered; the tag was chosen for readability).