systemtests: fix Python bindings version + robustness (fixes #584)#748
Open
PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
Open
systemtests: fix Python bindings version + robustness (fixes #584)#748PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
PranjalManhgaye wants to merge 1 commit intoprecice:developfrom
Conversation
) - Activate /home/precice/venv at runtime via ENV VIRTUAL_ENV and PATH in python_bindings, fenics_adapter, nutils_adapter Docker stages - Set PRECICE_TUTORIALS_NO_VENV=1 in component templates so run scripts skip creating .venv and use the Docker image's version - Add sanity check: fail fast with clear error if precice not importable when PRECICE_TUTORIALS_NO_VENV is set - Changelog: note that ubuntu_2204 is fixed by template change alone (uses pip install --user, no venv) 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
Tutorial run.sh scripts create their own .venv and install from requirements.txt (e.g. pyprecice~=3.0), silently overwriting the specific PYTHON_BINDINGS_REF version installed by the Docker image. This means the version argument passed to system tests was completely ignored.
Root cause
The Docker image installs the correct version into /home/precice/venv but never permanently activates it. At container runtime the venv isn't on PATH, so the run script sees no active venv and creates its own. PRECICE_TUTORIALS_NO_VENV (added in #680) was never set in the component templates, so the escape hatch was never triggered.
Fix
Fixes #584