Add requirements-reference.txt for reproducible Python deps (fixes #610)#749
Open
PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
Open
Add requirements-reference.txt for reproducible Python deps (fixes #610)#749PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
Conversation
…ecice#610) - Add tools/tests/requirements-reference.txt with pinned versions - Add update_requirements_reference.py to regenerate from reference_versions.yaml - Add validate_requirements_reference.py to check pyprecice matches - Add GitHub Action check-requirements-reference.yml - Document in tools/tests/README.md and release PR template Made-with: Cursor
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.
Description
Problem
For each distribution release we need reproducible Python dependency versions, but pinning in every tutorial
requirements.txtwould require a lot of merge back-and-forth. There is also no explicit list of versions known to work for a given release.Approach
Introduce a separate
requirements-reference.txt(lockfile-style) with pinned versions, without changing the existing tutorialrequirements.txtor run scripts. The reference file is only a manifest of versions that are known to work for a distribution.What changed
tools/tests/requirements-reference.txtwith pinned versions (pyprecice, numpy, matplotlib, nutils, setuptools)update_requirements_reference.pyto regenerate it fromreference_versions.yaml(pyprecice from PYTHON_BINDINGS_REF)validate_requirements_reference.pyto ensure the pyprecice version matchesreference_versions.yamlcheck-requirements-reference.ymlto run this validation on PR/pushtools/tests/README.mdand add a reminder to the release PR templateHow to update at release
pip freezefrom the systemtest Docker image, thenpip freeze | python3 update_requirements_reference.py --from-freezepython3 update_requirements_reference.py(usesreference_versions.yamlfor pyprecice and script defaults for other packages)Fixes #610
Checklist:
changelog-entries/<PRnumber>.md.