Repository navigation
Chore/pin versions - #188
Merged
Merged
Conversation
requirements.txt test for pinned hashed dependencies
IvanARashid
approved these changes
Nov 4, 2026
IvanARashid
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, thanks!
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.
Summary
requirements.txtis now a fully pinned (==), hash-verified lock file compiled from thepyproject.toml. The version ranges (what the project supports) live inpyproject.toml; the exact versions and hashes (what was tested) live inrequirements.txt. Added ranges where a break is plausible or already enforced by a dependency:numpy>=2,<3(nloptrequires numpy 2.x),scipy>=1.13(cvxpy),torch>=2.2,<3,torchio>=1.2,<2,dipy>=1.12.1,<2,pandas>=2.2,<4. Added apreprocextra (nipype,itk,pyyaml), which the preprocessing code imports, and included it inall.requirements.txtis generated frompyproject.tomlwith:--extra allcovers the runtime dependencies plus thetest,docs,plotandpreprocextras.--generate-hashespins every package (direct and transitive) withsha256hashes. Installing with pip enables hash checking automatically.--universalresolves for all platforms in one pass. Platform-specific packages carry environment markers, e.g.coloramaandwin32-setctimearesys_platform == 'win32', and thenvidia-*/tritonCUDA stack issys_platform == 'linux'.--python-version 3.11matches therequires-python = ">=3.11"floor inpyproject.toml.Installing necessary packages like before:
CI changes (
.github/workflows/unit_test.yml)build(unchanged matrix): installs frompyproject.toml, so it tests the version ranges.lock(new, Ubuntu + Python 3.11): installs fromrequirements.txtand runs the same tests, to check the pinned, hash-locked file installs and passes.Downsides
pip install .frompyproject.tomlpyproject.tomlforces a re-compilation of the requirements.txt