From fc35d6b1dac41f9863606e4a569d88198b5ca36b Mon Sep 17 00:00:00 2001 From: NiklasV <139122850+NiklasVin@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:59:13 +0200 Subject: [PATCH] Add missing `requirements.txt` to oscillator and oscillator-overlap tutorial (#556) * Related to #547 * Add requirements to oscillator tutorial * Add requirements to oscillator-overlap tutorial * Update run.sh to use requirements.txt and create venv --------- Co-authored-by: Benjamin Rodenberg --- oscillator-overlap/mass-left-python/requirements.txt | 3 +++ oscillator-overlap/mass-left-python/run.sh | 4 ++++ oscillator-overlap/mass-right-python/requirements.txt | 3 +++ oscillator-overlap/mass-right-python/run.sh | 4 ++++ oscillator/mass-left-python/requirements.txt | 3 +++ oscillator/mass-left-python/run.sh | 4 ++++ oscillator/mass-right-python/requirements.txt | 3 +++ oscillator/mass-right-python/run.sh | 4 ++++ 8 files changed, 28 insertions(+) create mode 100644 oscillator-overlap/mass-left-python/requirements.txt create mode 100644 oscillator-overlap/mass-right-python/requirements.txt create mode 100644 oscillator/mass-left-python/requirements.txt create mode 100644 oscillator/mass-right-python/requirements.txt diff --git a/oscillator-overlap/mass-left-python/requirements.txt b/oscillator-overlap/mass-left-python/requirements.txt new file mode 100644 index 000000000..9dff131c5 --- /dev/null +++ b/oscillator-overlap/mass-left-python/requirements.txt @@ -0,0 +1,3 @@ +numpy >1, <2 +pyprecice~=3.0 +scipy diff --git a/oscillator-overlap/mass-left-python/run.sh b/oscillator-overlap/mass-left-python/run.sh index 2a3902739..f8949a10c 100755 --- a/oscillator-overlap/mass-left-python/run.sh +++ b/oscillator-overlap/mass-left-python/run.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -e -u +python3 -m venv .venv +. .venv/bin/activate +pip install -r requirements.txt + . ../../tools/log.sh exec > >(tee --append "$LOGFILE") 2>&1 diff --git a/oscillator-overlap/mass-right-python/requirements.txt b/oscillator-overlap/mass-right-python/requirements.txt new file mode 100644 index 000000000..9dff131c5 --- /dev/null +++ b/oscillator-overlap/mass-right-python/requirements.txt @@ -0,0 +1,3 @@ +numpy >1, <2 +pyprecice~=3.0 +scipy diff --git a/oscillator-overlap/mass-right-python/run.sh b/oscillator-overlap/mass-right-python/run.sh index e34e0aa8d..7fe22e7de 100755 --- a/oscillator-overlap/mass-right-python/run.sh +++ b/oscillator-overlap/mass-right-python/run.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -e -u +python3 -m venv .venv +. .venv/bin/activate +pip install -r requirements.txt + . ../../tools/log.sh exec > >(tee --append "$LOGFILE") 2>&1 diff --git a/oscillator/mass-left-python/requirements.txt b/oscillator/mass-left-python/requirements.txt new file mode 100644 index 000000000..9dff131c5 --- /dev/null +++ b/oscillator/mass-left-python/requirements.txt @@ -0,0 +1,3 @@ +numpy >1, <2 +pyprecice~=3.0 +scipy diff --git a/oscillator/mass-left-python/run.sh b/oscillator/mass-left-python/run.sh index 2a3902739..f8949a10c 100755 --- a/oscillator/mass-left-python/run.sh +++ b/oscillator/mass-left-python/run.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -e -u +python3 -m venv .venv +. .venv/bin/activate +pip install -r requirements.txt + . ../../tools/log.sh exec > >(tee --append "$LOGFILE") 2>&1 diff --git a/oscillator/mass-right-python/requirements.txt b/oscillator/mass-right-python/requirements.txt new file mode 100644 index 000000000..9dff131c5 --- /dev/null +++ b/oscillator/mass-right-python/requirements.txt @@ -0,0 +1,3 @@ +numpy >1, <2 +pyprecice~=3.0 +scipy diff --git a/oscillator/mass-right-python/run.sh b/oscillator/mass-right-python/run.sh index e34e0aa8d..7fe22e7de 100755 --- a/oscillator/mass-right-python/run.sh +++ b/oscillator/mass-right-python/run.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -e -u +python3 -m venv .venv +. .venv/bin/activate +pip install -r requirements.txt + . ../../tools/log.sh exec > >(tee --append "$LOGFILE") 2>&1