Skip to content

Add requirements-reference.txt for reproducible Python deps (fixes #610)#749

Open
PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
PranjalManhgaye:fix-610-python-dependency-versions
Open

Add requirements-reference.txt for reproducible Python deps (fixes #610)#749
PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
PranjalManhgaye:fix-610-python-dependency-versions

Conversation

@PranjalManhgaye
Copy link
Contributor

Description

Problem
For each distribution release we need reproducible Python dependency versions, but pinning in every tutorial requirements.txt would 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 tutorial requirements.txt or run scripts. The reference file is only a manifest of versions that are known to work for a distribution.

What changed

  • Add tools/tests/requirements-reference.txt with pinned versions (pyprecice, numpy, matplotlib, nutils, setuptools)
  • Add update_requirements_reference.py to regenerate it from reference_versions.yaml (pyprecice from PYTHON_BINDINGS_REF)
  • Add validate_requirements_reference.py to ensure the pyprecice version matches reference_versions.yaml
  • Add GitHub Action check-requirements-reference.yml to run this validation on PR/push
  • Document the mechanism in tools/tests/README.md and add a reminder to the release PR template

How to update at release

  • Preferred: pip freeze from the systemtest Docker image, then pip freeze | python3 update_requirements_reference.py --from-freeze
  • Or: python3 update_requirements_reference.py (uses reference_versions.yaml for pyprecice and script defaults for other packages)

Fixes #610


Checklist:

  • I added a summary of any user-facing changes (compared to the last release) in the changelog-entries/<PRnumber>.md.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix versions of Python dependencies for each distribution

1 participant