From b148f98321967db0ef2e0aa5e74a336a90a17fd4 Mon Sep 17 00:00:00 2001
From: Eleni Mathioulaki <emathioulaki@athenarc.gr>
Date: Mon, 12 May 2025 13:40:17 +0000
Subject: [PATCH 1/6] feat(py-biobb-gromacs): copy package from upstream

---
 packages/py-biobb-gromacs/package.py | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 packages/py-biobb-gromacs/package.py

diff --git a/packages/py-biobb-gromacs/package.py b/packages/py-biobb-gromacs/package.py
new file mode 100644
index 00000000..f0fe13ca
--- /dev/null
+++ b/packages/py-biobb-gromacs/package.py
@@ -0,0 +1,24 @@
+# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class PyBiobbGromacs(PythonPackage):
+    """Biobb_gromacs is the Biobb module collection to perform
+    molecular dynamics simulations using the GROMACS MD suite"""
+
+    pypi = "biobb_gromacs/biobb_gromacs-4.1.1.tar.gz"
+
+    maintainers("d-beltran")
+
+    # Versions
+    version("4.1.1", sha256="270cce747fc214471527438c8319bda0613be5b76da9f4684e6f138d1927d2f7")
+
+    # Dependencies
+    depends_on("py-setuptools", type="build")
+    depends_on("python@3.8:", type=("build", "run"))
+    depends_on("py-biobb-common@4.1.0", type=("build", "run"))
+    depends_on("gromacs", type=("run"))
-- 
GitLab


From 843715c87c642bec520d897d61c3ba7065573a15 Mon Sep 17 00:00:00 2001
From: Eleni Mathioulaki <emathioulaki@athenarc.gr>
Date: Mon, 12 May 2025 13:47:24 +0000
Subject: [PATCH 2/6] fix(py-biobb-gromacs): add +nosuffix for gromacs
 dependency

---
 packages/py-biobb-gromacs/package.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/py-biobb-gromacs/package.py b/packages/py-biobb-gromacs/package.py
index f0fe13ca..fea25390 100644
--- a/packages/py-biobb-gromacs/package.py
+++ b/packages/py-biobb-gromacs/package.py
@@ -21,4 +21,6 @@ class PyBiobbGromacs(PythonPackage):
     depends_on("py-setuptools", type="build")
     depends_on("python@3.8:", type=("build", "run"))
     depends_on("py-biobb-common@4.1.0", type=("build", "run"))
-    depends_on("gromacs", type=("run"))
+    # begin EBRAINS(modified): biobb-gromacs checks for a `gmx` binary, with no suffix
+    depends_on("gromacs+nosuffix", type=("run"))
+    # end EBRAINS
-- 
GitLab


From 3ddaaaeb8ba4ebd9829af744f134d456da79ffa7 Mon Sep 17 00:00:00 2001
From: Johannes Hjorth <hjorth@kth.se>
Date: Thu, 8 May 2025 14:52:46 +0200
Subject: [PATCH 3/6] feat(py-quantities): add version 0.16.2

---
 packages/py-quantities/package.py | 5 +++--
 spack.yaml                        | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/packages/py-quantities/package.py b/packages/py-quantities/package.py
index e5d14e95..623671aa 100644
--- a/packages/py-quantities/package.py
+++ b/packages/py-quantities/package.py
@@ -10,9 +10,10 @@ class PyQuantities(PythonPackage):
     """Support for physical quantities with units, based on numpy"""
 
     homepage = "https://python-quantities.readthedocs.org"
-    pypi = "quantities/quantities-0.16.0.tar.gz"
+    pypi = "quantities/quantities-0.16.2.tar.gz"
     maintainers = ['apdavison']
-    
+
+    version('0.16.2', sha256='1f7c24f10d9ff57ddf751a358ea2fdfa9914516722f06a788ef4a2924c77d21c')
     version('0.16.0', sha256='211cce2d268da7e202abab5c2533ce3200ff619dd8ac2a3cd98f861b8a57c6eb')
     version('0.15.0', sha256='9ea31e2a0d7517cf24d546b14146def9292639993a616cca61b875ef796b4b2b')
     version('0.14.1', sha256='efeafffc0c0364f891a9327239cd12496bccb55cd037a6d1bf44de706f722877')
diff --git a/spack.yaml b/spack.yaml
index 819bca79..f8426907 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -49,7 +49,7 @@ spack:
     - py-pynn@0.12.3 +mpi
     - py-pyunicore@1.1.1
     - py-quantities-scidash@0.12.4.3
-    - py-quantities@0.16.0
+    - py-quantities@0.16.2
     - py-siibra@1.0a9
     - py-snudda@2.1.11
     - py-spynnaker@7.3.0
-- 
GitLab


From c596dd0745e7b39ba68c980bf28923f98a8c89e8 Mon Sep 17 00:00:00 2001
From: Johannes Hjorth <hjorth@kth.se>
Date: Thu, 8 May 2025 14:52:46 +0200
Subject: [PATCH 4/6] feat(py-snudda): add versions 2.1.12-2.1.17

---
 packages/py-snudda/package.py | 6 ++++++
 spack.yaml                    | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/py-snudda/package.py b/packages/py-snudda/package.py
index 092e410b..0bf79d53 100644
--- a/packages/py-snudda/package.py
+++ b/packages/py-snudda/package.py
@@ -14,6 +14,11 @@ class PySnudda(PythonPackage):
 
     maintainers = ["hjorth"]
 
+    version("2.1.17", "6a89065cf6722c2da512a0d5fa60a3c8")
+    version("2.1.14.1", "913b613055030183a8f30a67a0410def")
+    version("2.1.14", "a0a88d4822a500b8390db9a47c628f50")
+    version("2.1.13", "e5f7bc57a848e489352f8fb1f16b164a")
+    version("2.1.12", "8f8cbbcf3d6f12c4092160a6e9312ae1")
     version("2.1.11", "5cb71667a6f8c708279fc5dc94883ba3")
     version("2.1.10", "a1f5bf39ee0418e7ce8a0783042c59c8")
     version("2.1.2", "5d61a548995f88f95f680bf124534287")
@@ -39,6 +44,7 @@ class PySnudda(PythonPackage):
     depends_on("py-cython",             type=("build","run"))
     depends_on("py-numba@0.60.0:",      type=("build","run"))
     depends_on("open3d+python@0.18:",   type=("build","run"), when="@2:")
+    depends_on("py-quantities@0.16.2:", type=("build","run"), when="@2.1.14:")
 
     # snudda tarballs in pypi do not include the tests/ dir: just use default spack tests for now
     # @run_after('install')
diff --git a/spack.yaml b/spack.yaml
index f8426907..aa9f8e43 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -51,7 +51,7 @@ spack:
     - py-quantities-scidash@0.12.4.3
     - py-quantities@0.16.2
     - py-siibra@1.0a9
-    - py-snudda@2.1.11
+    - py-snudda@2.1.17
     - py-spynnaker@7.3.0
     - py-tvb-framework@2.9
     - py-tvb-contrib@2.9.1
-- 
GitLab


From 090c1bee1dc2c751053c9e9dd137ca214a6fcb90 Mon Sep 17 00:00:00 2001
From: Eleni Mathioulaki <emathioulaki@athenarc.gr>
Date: Sat, 10 May 2025 23:39:23 +0200
Subject: [PATCH 5/6] feat(CI): allow fetching stage to fail

to avoid stopping the entire pipeline due to transient network issues/mirror unavailability when installing many packages
---
 install_spack_env.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/install_spack_env.sh b/install_spack_env.sh
index a0ed1f67..2df8081a 100644
--- a/install_spack_env.sh
+++ b/install_spack_env.sh
@@ -130,9 +130,9 @@ spack-python -c "exit(not len(spack.environment.active_environment().uninstalled
     else
         echo "Updating of the source cache disabled."
     fi
-    if [ "$ret" -ne 0 ]; then
-        (exit $ret)
-    fi
+    # if [ "$ret" -ne 0 ]; then
+    #     (exit $ret)
+    # fi
 )
 
 if [ -n "${OCI_CACHE_PREFIX}" ]; then
-- 
GitLab


From 1db7b14af2889805374c17d684b6dd88b0f91bce Mon Sep 17 00:00:00 2001
From: Eleni Mathioulaki <emathioulaki@athenarc.gr>
Date: Mon, 12 May 2025 10:26:54 +0200
Subject: [PATCH 6/6] feat(CI): add ppd deployment job

---
 .gitlab-ci.yml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 81a0e3f6..91b188c3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -115,6 +115,17 @@ variables:
   rules:
     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE =~ /platform\/esd/ && $CI_PIPELINE_SOURCE == "push"
 
+# deploy a pre-production environment first, to avoid directly modifying the experimental or official release environments
+.deploy-ppd-release:
+  variables:
+    SPACK_ENV: ppd
+    RELEASE_NAME: EBRAINS-ppd
+  allow_failure: false
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule"  && $DEPLOYMENT == "prod"
+    - if: $CI_COMMIT_BRANCH =~ /^ebrains/
+      when: manual
+
 # deploy the experimental release of tools once a week from latest working version of int release 
 .deploy-exp-release:
   variables:
@@ -158,26 +169,42 @@ deploy-exp-release-dev-cineca:
     - .deploy-exp-dev-release
     - .deploy-dev-server-cineca
 
+# deploy ppd release to prod environment at JSC
+deploy-ppd-release-prod-jsc:
+  extends:
+    - .deploy-ppd-release
+    - .deploy-prod-server-jsc
+
+# deploy ppd release to prod environment at CINECA
+deploy-ppd-release-prod-cineca:
+  extends:
+    - .deploy-ppd-release
+    - .deploy-prod-server-cineca
+
 # deploy exp release to prod environment at JSC
 deploy-exp-release-prod-jsc:
+  needs: [deploy-ppd-release-prod-jsc]
   extends:
     - .deploy-exp-prod-release
     - .deploy-prod-server-jsc
 
 # deploy exp release to prod environment at CINECA
 deploy-exp-release-prod-cineca:
+  needs: [deploy-ppd-release-prod-cineca]
   extends:
     - .deploy-exp-prod-release
     - .deploy-prod-server-cineca
 
 # deploy prod release to prod environment at JSC
 deploy-prod-release-prod-jsc:
+  needs: [deploy-ppd-release-prod-jsc]
   extends:
     - .deploy-prod-release
     - .deploy-prod-server-jsc
 
 # deploy prod release to prod environment at CINECA
 deploy-prod-release-prod-cineca:
+  needs: [deploy-ppd-release-prod-cineca]
   extends:
     - .deploy-prod-release
     - .deploy-prod-server-cineca
-- 
GitLab