systemtests: fix Python bindings version + robustness (fixes #584)#748
systemtests: fix Python bindings version + robustness (fixes #584)#748PranjalManhgaye 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
|
Same comment as in #755 (comment), reverse order: This PR is almost identical to #745 (which was opened first), without referring to it. This is very bad practice (if copied without reference: plagiarism, if both using the same GenAI tool without disclosure: futuristic plagiarism). I do not mind neither collaboration nor modern tools, but please disclose them. Copying from each other without attribution is not accepted. |
|
thanks @MakisH for pointing this out, and sorry for the confusion, |
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