From f8491c7db4ea3ff9d715e3185a52a4dd5d3c7fd4 Mon Sep 17 00:00:00 2001
From: Gabriel Pelouze <gabriel@pelouze.net>
Date: Thu, 18 Apr 2024 15:46:04 +0200
Subject: [PATCH 1/5] rename lter-life-wadden-py to lter-life-wadden

---
 .../environment.yaml                                          | 2 +-
 .../flavor_config.yaml                                        | 2 +-
 .../naavre-cell-build.Dockerfile                              | 0
 .../naavre-jupyter.Dockerfile                                 | 4 ++--
 .../tests/test_acolite.py                                     | 0
 .../{lter-life-wadden-py => lter-life-wadden}/tests/tests.sh  | 0
 6 files changed, 4 insertions(+), 4 deletions(-)
 rename flavors/{lter-life-wadden-py => lter-life-wadden}/environment.yaml (75%)
 rename flavors/{lter-life-wadden-py => lter-life-wadden}/flavor_config.yaml (56%)
 rename flavors/{lter-life-wadden-py => lter-life-wadden}/naavre-cell-build.Dockerfile (100%)
 rename flavors/{lter-life-wadden-py => lter-life-wadden}/naavre-jupyter.Dockerfile (69%)
 rename flavors/{lter-life-wadden-py => lter-life-wadden}/tests/test_acolite.py (100%)
 rename flavors/{lter-life-wadden-py => lter-life-wadden}/tests/tests.sh (100%)

diff --git a/flavors/lter-life-wadden-py/environment.yaml b/flavors/lter-life-wadden/environment.yaml
similarity index 75%
rename from flavors/lter-life-wadden-py/environment.yaml
rename to flavors/lter-life-wadden/environment.yaml
index 6e85d70..c4e4eba 100644
--- a/flavors/lter-life-wadden-py/environment.yaml
+++ b/flavors/lter-life-wadden/environment.yaml
@@ -1,4 +1,4 @@
-name: lter-life-wadden-py
+name: lter-life-wadden
 channels:
   - conda-forge
 dependencies:
diff --git a/flavors/lter-life-wadden-py/flavor_config.yaml b/flavors/lter-life-wadden/flavor_config.yaml
similarity index 56%
rename from flavors/lter-life-wadden-py/flavor_config.yaml
rename to flavors/lter-life-wadden/flavor_config.yaml
index 7135c61..d8014b2 100644
--- a/flavors/lter-life-wadden-py/flavor_config.yaml
+++ b/flavors/lter-life-wadden/flavor_config.yaml
@@ -1,3 +1,3 @@
-flavor_name: lter-life-wadden-py
+flavor_name: lter-life-wadden
 build_jupyter: True
 free_disk_space: False
diff --git a/flavors/lter-life-wadden-py/naavre-cell-build.Dockerfile b/flavors/lter-life-wadden/naavre-cell-build.Dockerfile
similarity index 100%
rename from flavors/lter-life-wadden-py/naavre-cell-build.Dockerfile
rename to flavors/lter-life-wadden/naavre-cell-build.Dockerfile
diff --git a/flavors/lter-life-wadden-py/naavre-jupyter.Dockerfile b/flavors/lter-life-wadden/naavre-jupyter.Dockerfile
similarity index 69%
rename from flavors/lter-life-wadden-py/naavre-jupyter.Dockerfile
rename to flavors/lter-life-wadden/naavre-jupyter.Dockerfile
index 008dfb3..dcd25e1 100644
--- a/flavors/lter-life-wadden-py/naavre-jupyter.Dockerfile
+++ b/flavors/lter-life-wadden/naavre-jupyter.Dockerfile
@@ -10,8 +10,8 @@ RUN \
     git clone --depth 1 https://github.com/acolite/acolite.git && \
     # Acolite doesn't run on Python 3.12 yet
     sed -i 's/- python=3$/- python<=3.11/' acolite/environment.yml && \
-    mamba env update --name lter-life-wadden-py --file ./acolite/environment.yml && \
-    site_package_dir="$(/opt/conda/envs/lter-life-wadden-py/bin/python -c  "import site; print(''.join(site.getsitepackages()))")" && \
+    mamba env update --name lter-life-wadden --file ./acolite/environment.yml && \
+    site_package_dir="$(/opt/conda/envs/lter-life-wadden/bin/python -c  "import site; print(''.join(site.getsitepackages()))")" && \
     cp ./acolite/acolite -r "$site_package_dir" && \
     cp ./acolite/config -r "$site_package_dir" && \
     cp ./acolite/data -r "$site_package_dir"
diff --git a/flavors/lter-life-wadden-py/tests/test_acolite.py b/flavors/lter-life-wadden/tests/test_acolite.py
similarity index 100%
rename from flavors/lter-life-wadden-py/tests/test_acolite.py
rename to flavors/lter-life-wadden/tests/test_acolite.py
diff --git a/flavors/lter-life-wadden-py/tests/tests.sh b/flavors/lter-life-wadden/tests/tests.sh
similarity index 100%
rename from flavors/lter-life-wadden-py/tests/tests.sh
rename to flavors/lter-life-wadden/tests/tests.sh

From bbea50fd7d74df90a9a6ff1b7abcc959014e099f Mon Sep 17 00:00:00 2001
From: Gabriel Pelouze <gabriel@pelouze.net>
Date: Thu, 18 Apr 2024 16:33:38 +0200
Subject: [PATCH 2/5] add r dependencies

---
 flavors/lter-life-wadden/environment.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/flavors/lter-life-wadden/environment.yaml b/flavors/lter-life-wadden/environment.yaml
index c4e4eba..89f18fd 100644
--- a/flavors/lter-life-wadden/environment.yaml
+++ b/flavors/lter-life-wadden/environment.yaml
@@ -5,3 +5,12 @@ dependencies:
   - ipykernel
   - minio
   - webdavclient3
+  - r-irkernel
+  - r-jsonlite
+  - r-optparse
+  - r-fme
+  - r-desolve
+  - r-plot3d
+  - r-sf
+  - r-ncdf4
+  - r-tidyverse
\ No newline at end of file

From 36376538a669e2949330e8aae7a464a3ccd595f9 Mon Sep 17 00:00:00 2001
From: Gabriel Pelouze <gabriel@pelouze.net>
Date: Thu, 18 Apr 2024 16:48:41 +0200
Subject: [PATCH 3/5] add tests

---
 flavors/lter-life-wadden/tests/test_import.R | 9 +++++++++
 flavors/lter-life-wadden/tests/tests.sh      | 1 +
 2 files changed, 10 insertions(+)
 create mode 100644 flavors/lter-life-wadden/tests/test_import.R

diff --git a/flavors/lter-life-wadden/tests/test_import.R b/flavors/lter-life-wadden/tests/test_import.R
new file mode 100644
index 0000000..af07c66
--- /dev/null
+++ b/flavors/lter-life-wadden/tests/test_import.R
@@ -0,0 +1,9 @@
+library(optparse)
+library(jsonlite)
+
+library(fme)
+library(desolve)
+library(plot3d)
+library(sf)
+library(ncdf4)
+library(tidyverse)
diff --git a/flavors/lter-life-wadden/tests/tests.sh b/flavors/lter-life-wadden/tests/tests.sh
index 48cc709..9feb2ed 100644
--- a/flavors/lter-life-wadden/tests/tests.sh
+++ b/flavors/lter-life-wadden/tests/tests.sh
@@ -3,3 +3,4 @@ set -e
 source /venv/bin/activate
 dir="${0%/*}"
 find "$dir" -name "*.py" -print0 | xargs --null -I "{}" python "{}"
+find "$dir" -name "*.R" -print0 | xargs --null -I "{}" Rscript "{}"

From 217b42b82a5630d8e6d7094404da3161776fc316 Mon Sep 17 00:00:00 2001
From: Gabriel Pelouze <gabriel@pelouze.net>
Date: Thu, 18 Apr 2024 17:55:11 +0200
Subject: [PATCH 4/5] fix test

---
 flavors/lter-life-wadden/tests/test_import.R | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/flavors/lter-life-wadden/tests/test_import.R b/flavors/lter-life-wadden/tests/test_import.R
index af07c66..166d13d 100644
--- a/flavors/lter-life-wadden/tests/test_import.R
+++ b/flavors/lter-life-wadden/tests/test_import.R
@@ -1,9 +1,9 @@
 library(optparse)
 library(jsonlite)
 
-library(fme)
-library(desolve)
-library(plot3d)
+library(FME)
+library(deSolve)
+library(plot3D)
 library(sf)
 library(ncdf4)
 library(tidyverse)

From 525c2a244c8576feaa59f278f1e13e1106e922b7 Mon Sep 17 00:00:00 2001
From: Gabriel Pelouze <gabriel@pelouze.net>
Date: Fri, 19 Apr 2024 14:34:41 +0200
Subject: [PATCH 5/5] free disk space when building lter-life-wadden

---
 flavors/lter-life-wadden/flavor_config.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flavors/lter-life-wadden/flavor_config.yaml b/flavors/lter-life-wadden/flavor_config.yaml
index d8014b2..2b9242c 100644
--- a/flavors/lter-life-wadden/flavor_config.yaml
+++ b/flavors/lter-life-wadden/flavor_config.yaml
@@ -1,3 +1,3 @@
 flavor_name: lter-life-wadden
 build_jupyter: True
-free_disk_space: False
+free_disk_space: True