diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ae570a4a9b5fc69358da568a755a557a4762b50..5162ebdd5dfa552bc7d712ed78bae7fa268fa6cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,27 +7,30 @@ variables: SPACK_VERSION: v0.21.1 SPACK_PATH_GITLAB: /mnt/spack_v0.21.1 SYSTEMNAME: ebrainslab - OC_PROJECT: jupyterhub # =================================================================== # LAB DEPLOYMENTS # =================================================================== -# start an OpenShift Job that will build the Spack environment +# start a k8s Job that will build the Spack environment .deploy-build-environment: stage: build + tags: + - docker-runner + - read-only + image: alpine:3.21.0 + before_script: + - apk add kubectl script: - # login and select project in openshift - - oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN" - - oc project $OC_PROJECT + # use the site-specific kubectl context + - kubectl config use-context $KUBE_CONTEXT # create job description file - - chmod a+x create_job.sh - - ./create_job.sh $CI_PIPELINE_ID $BUILD_ENV_DOCKER_IMAGE $INSTALLATION_ROOT $SPACK_VERSION $SPACK_ENV $CI_COMMIT_BRANCH $RELEASE_NAME $LAB_KERNEL_ROOT + - sh create_job.sh $CI_PIPELINE_ID $BUILD_ENV_DOCKER_IMAGE $INSTALLATION_ROOT $SPACK_VERSION $SPACK_ENV $CI_COMMIT_BRANCH $RELEASE_NAME $LAB_KERNEL_ROOT - cat simplejob.yml # start the deploy job - - oc create -f simplejob.yml + - kubectl create -f simplejob.yml # wait for job to finish to get the logs - - while true; do sleep 300; x=$(oc get pods | grep simplejob${CI_PIPELINE_ID} | awk '{ print $3}'); if [ $x != "Running" ]; then break; fi; done + - while true; do sleep 300; x=$(kubectl get pods | grep simplejob${CI_PIPELINE_ID} | awk '{ print $3}'); if [ $x != "Running" ]; then break; fi; done # # copy logs of failed packages locally, to keep as job artifacts # - oc rsync $(oc get pods -l job-name=simplejob${CI_PIPELINE_ID} -o name):/tmp ./ --include="*/" --include="spack/spack-stage/*/*.txt" --exclude="*" # - mv tmp/spack/spack-stage spack_logs @@ -36,12 +39,10 @@ variables: # - oc rsync $(oc get pods -l job-name=simplejob${CI_PIPELINE_ID} -o name):$LAB_KERNEL_PATH ./ # - mv .$LAB_KERNEL_PATH kernel_specs # if spack install has failed, fail the pipeline - - oc logs jobs/simplejob${CI_PIPELINE_ID} | tee log.txt + - kubectl logs jobs/simplejob${CI_PIPELINE_ID} | tee log.txt - if [ $(cat log.txt | grep "No module available for package" | wc -l) -gt 0 ]; then exit 1; fi; - # delete the job from OpenShift as we have the logs here - - oc delete job simplejob${CI_PIPELINE_ID} || true - tags: - - shell-runner + # delete the job, as we have the logs here + - kubectl delete job simplejob${CI_PIPELINE_ID} || true # artifacts: # paths: # - spack_logs @@ -66,52 +67,34 @@ variables: LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/prod INSTALLATION_ROOT: /srv/main-spack-instance-2402 -# deploy to the dev lab environment at CSCS -.deploy-dev-server-cscs: +# deploy to the dev lab environment at CINECA +.deploy-dev-server-cineca: extends: .deploy-dev-server variables: - OPENSHIFT_SERVER: $CSCS_OPENSHIFT_DEV_SERVER - OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_DEV_TOKEN - BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/tc/ebrains-spack-build-env/okd:okd_23.06 - OC_PROJECT: jupyterhub-int - resource_group: shared-NFS-mount-dev-cscs - tags: # this is just to ensure that the two jobs will run on different runners - - read-write # to avoid issues with common environment variables - - shell-runner + KUBE_CONTEXT: cineca-int + resource_group: shared-NFS-mount-dev-cineca # deploy to the prod lab environment at CSCS .deploy-prod-server-cscs: extends: .deploy-prod-server variables: - OPENSHIFT_SERVER: $CSCS_OPENSHIFT_PROD_SERVER - OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_PROD_TOKEN + KUBE_CONTEXT: cscs-prod BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/tc/ebrains-spack-build-env/okd:okd_23.06 resource_group: shared-NFS-mount-prod-cscs - tags: # this is just to ensure that the two jobs will run on different runners - - read-write # to avoid issues with common environment variables - - shell-runner - -# deploy to the dev lab environment at CINECA -.deploy-dev-server-cineca: - extends: .deploy-dev-server - variables: - OPENSHIFT_SERVER: $CINECA_K8S_DEV_SERVER - OPENSHIFT_TOKEN: $CINECA_K8S_DEV_TOKEN - resource_group: shared-NFS-mount-dev-cineca - tags: # this is just to ensure that the two jobs will run on different runners - - read-only # to avoid issues with common environment variables - - shell-runner # deploy to the prod lab environment at JSC .deploy-prod-server-jsc: extends: .deploy-prod-server variables: - OPENSHIFT_SERVER: $JSC_K8S_PROD_SERVER - OPENSHIFT_TOKEN: $JSC_K8S_PROD_TOKEN + KUBE_CONTEXT: jsc-prod resource_group: shared-NFS-mount-prod-jsc - tags: # this is just to ensure that the two jobs will run on different runners - - read-only # to avoid issues with common environment variables - - shell-runner + +# deploy to the prod lab environment at CINECA +.deploy-prod-server-cineca: + extends: .deploy-prod-server + variables: + KUBE_CONTEXT: cineca-prod + resource_group: shared-NFS-mount-prod-cineca # ------------------------------------------------------------------- # Release types: test, experimental and official releases @@ -156,24 +139,12 @@ variables: # Lab deployment jobs # ------------------------------------------------------------------- -# deploy int release to dev environment at CSCS -deploy-int-release-dev-cscs: - extends: - - .deploy-int-release - - .deploy-dev-server-cscs - # deploy int release to dev environment at CINECA deploy-int-release-dev-cineca: extends: - .deploy-int-release - .deploy-dev-server-cineca -# deploy exp release to dev environment at CSCS -deploy-exp-release-dev-cscs: - extends: - - .deploy-exp-dev-release - - .deploy-dev-server-cscs - # deploy exp release to dev environment at CINECA deploy-exp-release-dev-cineca: extends: @@ -192,6 +163,12 @@ deploy-exp-release-prod-jsc: - .deploy-exp-prod-release - .deploy-prod-server-jsc +# deploy exp release to prod environment at CINECA +deploy-exp-release-prod-cineca: + extends: + - .deploy-exp-prod-release + - .deploy-prod-server-cineca + # deploy prod release to prod environment at CSCS deploy-prod-release-prod-cscs: extends: @@ -204,6 +181,12 @@ deploy-prod-release-prod-jsc: - .deploy-prod-release - .deploy-prod-server-jsc +# deploy prod release to prod environment at CINECA +deploy-prod-release-prod-cineca: + extends: + - .deploy-prod-release + - .deploy-prod-server-cineca + # =================================================================== # GITLAB RUNNER DEPLOYMENTS # =================================================================== diff --git a/README.md b/README.md index 7f141bc3af9ac79d17e72e6767537c9e6a77e50f..1f56713152fea7936140a9855cb2dc5eaf3d2fae 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ git clone --branch {branch-name} https://gitlab.ebrains.eu/ri/tech-hub/platform/ Clone Spack. We currently use version v0.21.1: ``` -git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch v0.20.0 https://github.com/spack/spack +git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch v0.21.1 https://github.com/spack/spack ``` Activate Spack: @@ -53,11 +53,6 @@ Add the project repository to your Spack environment: spack repo add ebrains-spack-builds ``` -Create the environment: -``` -spack env create -d ebrains-spack-builds/ -``` - Define your site-specific configurations: ``` export SYSTEMNAME=<your-system-name> diff --git a/install_spack_env.sh b/install_spack_env.sh index 1a120459d310672a9ffd9b62ee7a15f9f848fcb6..2a9dbf9bd222b3e9aecbfcdbc26a9ffcec946c26 100644 --- a/install_spack_env.sh +++ b/install_spack_env.sh @@ -15,7 +15,7 @@ EBRAINS_SPACK_ENV=$5 # name of EBRAINS Spack environment to be created/updated UPSTREAM_INSTANCE=$6 # path to Spack instance to use as upstream (optional) SPACK_REPO=https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/spack.git -SPACK_VERSION_EBRAINS=${SPACK_VERSION}_ebrains24.04 +SPACK_VERSION_EBRAINS=${SPACK_VERSION}_ebrains24.11 # specify location of .spack dir (by default in ~) # this is where cache and configuration settings are stored diff --git a/packages/build-brainscales/package.py b/packages/build-brainscales/package.py index b80d058387fe3e0c0ed65ce60f9ceb9a52cd4e22..d8349c67a4d21bf29c24540e2b02f23606ee6b62 100644 --- a/packages/build-brainscales/package.py +++ b/packages/build-brainscales/package.py @@ -15,6 +15,13 @@ import spack.build_environment class BuildBrainscales(WafPackage): """Common stuff for BrainScaleS packages...""" + version( + "9.0-a8", + git="https://github.com/electronicvisions/releases-ebrains", + tag="ebrains-9.0-a8", + commit="44323be431da4b4b43890815f453c27207dee0b2", + submodules=True, + ) version( "9.0-a7", git="https://github.com/electronicvisions/releases-ebrains", @@ -45,6 +52,7 @@ class BuildBrainscales(WafPackage): ) # common dependencies of BuildBrainscales-derived packages + depends_on('oppulance@9.0-a8', when='@9.0-a8', type=('build', 'link', 'run', 'test')) depends_on('oppulance@9.0-a7', when='@9.0-a7', type=('build', 'link', 'run', 'test')) depends_on('oppulance@9.0-a6', when='@9.0-a6', type=('build', 'link', 'run', 'test')) depends_on('oppulance@9.0-a5', when='@9.0-a5', type=('build', 'link', 'run', 'test')) diff --git a/packages/log4cxx/package.py b/packages/log4cxx/package.py index 13bfc90b22bfd846f4c865723eacffea379af6ec..0cf8f7a982d2b7ed00e410a78d32e20cf99b8437 100644 --- a/packages/log4cxx/package.py +++ b/packages/log4cxx/package.py @@ -10,16 +10,16 @@ class Log4cxx(CMakePackage): """A C++ port of Log4j""" homepage = "https://logging.apache.org/log4cxx/latest_stable/" - url = "https://dlcdn.apache.org/logging/log4cxx/0.12.0/apache-log4cxx-0.12.0.tar.gz" + url = "https://github.com/apache/logging-log4cxx/archive/refs/tags/rel/v1.2.0.tar.gz" maintainers("nicmcd") # begin EBRAINS (added): bring upstream (ref. spack@0.21.2) - version("1.2.0", sha256="09f4748aa5675ef5c0770bedbf5e00488668933c5a935a43ac5b85be2436c48a") - version("1.1.0", sha256="1fc7d82697534184bc0f757348d969d24852b948f63d6b17283fd1ee29c2c28a") + version("1.2.0", sha256="3e0af426011718c634194200cdd79b49ec13c322697bdcddef3d8b2ac9efd7b6") + version("1.1.0", sha256="feb425ce35a391cf0927356bebb7da53f96c8a7aaf634aaf740e011203c732bb") # end EBRAINS - version("0.12.1", sha256="7bea5cb477f0e31c838f0e1f4f498cc3b30c2eae74703ddda923e7e8c2268d22") - version("0.12.0", sha256="bd5b5009ca914c8fa7944b92ea6b4ca6fb7d146f65d526f21bf8b3c6a0520e44") + version("0.12.1", sha256="567a4200c5b005a816c401e798d98294782950c7750eb3e285e851b970c8beed") + version("0.12.0", sha256="31730a17b8ff3f416256755b7aa6d7e95b167c670eb469eb9ff99aa006376e79") variant("cxxstd", default="17", description="C++ standard", values=("11", "17"), multi=False) # begin EBRAINS (added) diff --git a/packages/oppulance/package.py b/packages/oppulance/package.py index 9875947f1263238bee276cdf8cda7360f9e0f93b..2249a8b49fcd95084214f53a4af45fcebb1c5302 100644 --- a/packages/oppulance/package.py +++ b/packages/oppulance/package.py @@ -21,6 +21,13 @@ class Oppulance(Package): depends_on('wget') depends_on('gmp') + version( + "9.0-a8", + git="https://github.com/electronicvisions/releases-ebrains", + tag="ebrains-9.0-a8", + commit="44323be431da4b4b43890815f453c27207dee0b2", + submodules=True, + ) version( "9.0-a7", git="https://github.com/electronicvisions/releases-ebrains", diff --git a/packages/py-nestml/package.py b/packages/py-nestml/package.py index 964295a4ff6ec2628cbbcbd7f588890f092e7c42..a5ea9b1b3a5c6dd6168c9588fedc39ad6d87ef38 100644 --- a/packages/py-nestml/package.py +++ b/packages/py-nestml/package.py @@ -13,11 +13,12 @@ class PyNestml(PythonPackage): """ homepage = 'https://nestml.readthedocs.org/' - url = 'https://pypi.org/packages/py3/N/NESTML/NESTML-7.0.2-py3-none-any.whl' + url = 'https://pypi.org/packages/py3/N/NESTML/NESTML-8.0.0-py3-none-any.whl' git = 'https://github.com/nest/nestml/' maintainers = ['clinssen', 'pnbabu'] + version('8.0.0', sha256='bb2182fadd5f3ff7fa538e7f9865bafefb8be67938c83028174491768e88ef09', expand=False) version('7.0.2', sha256='3611239ff8436bf1c74b878562564007285c6da5df0317c6cd52f65e6bcd3f8b', expand=False) version('7.0.1', sha256='38392bdd06c5be5af65050153f34fb78dee6032158b268b83599bd70aab5c030', expand=False) version('7.0.0', sha256='4e271048b4a9ad2c161dda98d3ee25e143537649a264d521deb0ff5543020d73', expand=False) diff --git a/packages/py-nnmt/package.py b/packages/py-nnmt/package.py new file mode 100644 index 0000000000000000000000000000000000000000..7b722a7fee4d9a543b4d9bca4eb4d3add77c0c8a --- /dev/null +++ b/packages/py-nnmt/package.py @@ -0,0 +1,34 @@ +# 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 import * + + +class PyNnmt(PythonPackage): + """NNMT is an open-source, community centered Python package for collecting + reusable implementations of analytical methods for neuronal network model analysis + based on mean-field theory.""" + + homepage = "https://nnmt.readthedocs.io/en/latest/index.html" + pypi = "nnmt/nnmt-1.3.0.tar.gz" + + maintainers = ["rshimoura", "terhorstd"] + + version("1.3.0", sha256="0cb4f7c58e08520e383506b5b15fb0a9552801adc03fd1006b9e3dd17b1b636d") + + depends_on("py-setuptools@23.1.0:", type="build") + depends_on("py-numpy@1.8:", type=("build", "run")) + depends_on("py-scipy@0.14:", type=("build", "run")) + depends_on("py-cython@0.20:", type=("build", "run")) + depends_on("py-h5py@2.5:", type=("build", "run")) + depends_on("py-matplotlib@2.0:", type=("build", "run")) + depends_on("py-pint", type=("build", "run")) + depends_on("py-pyyaml", type=("build", "run")) + depends_on("py-requests", type=("build", "run")) + depends_on("py-mpmath", type=("build", "run")) + depends_on("py-decorator", type=("build", "run")) + depends_on("py-pytest@5.4:", type=("build", "run")) + depends_on("py-pytest-mock@3.1:", type=("build", "run")) + depends_on("python@3:", type=("build", "run")) diff --git a/packages/py-spalloc/package.py b/packages/py-spalloc/package.py index d915721cfa37078a9442cc8f67f3e92879630814..69ee89a20ad90ecfaf51509c61c65daf92b4662e 100644 --- a/packages/py-spalloc/package.py +++ b/packages/py-spalloc/package.py @@ -13,8 +13,17 @@ class PySpalloc(PythonPackage): homepage = "https://github.com/SpiNNakerManchester/spalloc" pypi = "spalloc/spalloc-1!7.0.0.tar.gz" + def url_for_version(self, version): + url = "https://pypi.org/packages/source/s/spalloc/spalloc-1!{}.tar.gz" + return url.format(version) + + version('7.3.0', sha256='5664546187a57c87743c8bf1db812a2ab1c14db15fb0f44ee64f5f72d1cdedac') version('7.0.0', sha256='e141a0e661efd6fd634f3793752d8d6deef56ee37a21fa8e3d7208f4edd86f51') - depends_on("python@3.7:", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + + depends_on("py-spinnutilities@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spinnutilities@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-jsonschema", type=("build", "run")) - depends_on("py-spinnutilities@7.0.0", type=("build", "run")) diff --git a/packages/py-spinnaker-pacman/package.py b/packages/py-spinnaker-pacman/package.py index 632db1708cbb8d56c00398594c43b655a99c9f4c..47ead35534c34f5403343200349b9fa658dd04a3 100644 --- a/packages/py-spinnaker-pacman/package.py +++ b/packages/py-spinnaker-pacman/package.py @@ -13,9 +13,21 @@ class PySpinnakerPacman(PythonPackage): homepage = "https://github.com/SpiNNakerManchester/PACMAN" pypi = "SpiNNaker_PACMAN/SpiNNaker_PACMAN-1!7.0.0.tar.gz" + def url_for_version(self, version): + name = "spinnaker_pacman" if version >= Version("7.2.0") else "SpiNNaker_PACMAN" + url = "https://pypi.org/packages/source/s/SpiNNaker_PACMAN/{}-1!{}.tar.gz" + return url.format(name, version) + + version("7.3.0", sha256="ef597e14aac9877c676181082e11e77ea3d4b0dfb5977b0d3ce78020229fb055") version("7.0.0", sha256="d9e7e620d02fda88f57a8cf157cc9421b5606d453230847f3d35985eae4c074d") - depends_on("python@3.7:", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + + depends_on("py-spinnutilities@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spinnmachine@7.3.0", type=("build", "run"), when="@7.3.0") + + depends_on("py-spinnutilities@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-spinnmachine@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-jsonschema", type=("build", "run")) - depends_on("py-spinnutilities@7.0.0", type=("build", "run")) - depends_on("py-spinnmachine@7.0.0", type=("build", "run")) diff --git a/packages/py-spinnfrontendcommon/package.py b/packages/py-spinnfrontendcommon/package.py index be654d01ebb6f69a4bcdc0e7ebfae2fe661dd73a..dd9be1a37bea891c50ca2f300b65ba07930b302e 100644 --- a/packages/py-spinnfrontendcommon/package.py +++ b/packages/py-spinnfrontendcommon/package.py @@ -6,8 +6,11 @@ from spack.package import * -_JAR_URL = "https://github.com/SpiNNakerManchester/JavaSpiNNaker/releases/download/7.0.0/spinnaker-exe.jar" -_JAR_SHA256 = "2d909c7fb3aa15886acf26febb1bd48e25db0c347a231944aa6a5f86107bb55b" +_JAR_URL_7_3_0 = "https://github.com/SpiNNakerManchester/JavaSpiNNaker/releases/download/7.3.0/spinnaker-exe.jar" +_JAR_SHA256_7_3_0 = "8fea399e835d053eb9b9b8b6f4752475d19cc3995389ca544f3ad1758007edbf" + +_JAR_URL_7_0_0 = "https://github.com/SpiNNakerManchester/JavaSpiNNaker/releases/download/7.0.0/spinnaker-exe.jar" +_JAR_SHA256_7_0_0 = "2d909c7fb3aa15886acf26febb1bd48e25db0c347a231944aa6a5f86107bb55b" class PySpinnfrontendcommon(PythonPackage): """This package provides utilities for specifying binary data @@ -16,18 +19,32 @@ class PySpinnfrontendcommon(PythonPackage): homepage = "https://github.com/SpiNNakerManchester/SpiNNFrontEndCommon" pypi = "SpiNNFrontEndCommon/SpiNNFrontEndCommon-1!7.0.0.tar.gz" + def url_for_version(self, version): + name = "spinnfrontendcommon" if version >= Version("7.2.0") else "SpiNNFrontEndCommon" + url = "https://pypi.org/packages/source/s/SpiNNFrontEndCommon/{}-1!{}.tar.gz" + return url.format(name, version) + + version("7.3.0", sha256="c3aea0160525c4f08bc74244f219a9664a06aa70876cfb68944c7d6378daf161") version("7.0.0", sha256="07539734ed0105472d06d655bbd92e149ef44c77c388fcca28857558faa6dd10") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-spinnman@7.0.0", type=("build", "run")) - depends_on("py-spinnaker-pacman@7.0.0", type=("build", "run")) - depends_on("py-spalloc@7.0.0", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + + depends_on("py-spinnman@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spinnaker-pacman@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spalloc@7.3.0", type=("build", "run"), when="@7.3.0") + + depends_on("py-spinnman@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-spinnaker-pacman@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-spalloc@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-scipy@0.16.0:", type=("build", "run")) depends_on("py-ebrains-drive@0.5.1:", type=("build", "run")) depends_on("java@11:") - resource(name="spinnaker-exe.jar", url=_JAR_URL, checksum=_JAR_SHA256, expand=False, placement="resource_root/JavaSpiNNaker/SpiNNaker-front-end/target") + resource(name="spinnaker-exe.jar", url=_JAR_URL_7_0_0, checksum=_JAR_SHA256_7_0_0, expand=False, placement="resource_root/JavaSpiNNaker/SpiNNaker-front-end/target", when="@7.0.0") + resource(name="spinnaker-exe.jar", url=_JAR_URL_7_3_0, checksum=_JAR_SHA256_7_3_0, expand=False, placement="resource_root/JavaSpiNNaker/SpiNNaker-front-end/target", when="@7.3.0") def install(self, spec, prefix): super(PySpinnfrontendcommon, self).install(spec, prefix) diff --git a/packages/py-spinnmachine/package.py b/packages/py-spinnmachine/package.py index 1c5c5892b9ad537501a79be7932ec277c158fb0f..5fcd3b902c64963db760f61674653ad27472417b 100644 --- a/packages/py-spinnmachine/package.py +++ b/packages/py-spinnmachine/package.py @@ -13,7 +13,16 @@ class PySpinnmachine(PythonPackage): homepage = "https://github.com/SpiNNakerManchester/SpiNNMachine" pypi = "SpiNNMachine/SpiNNMachine-1!7.0.0.tar.gz" + def url_for_version(self, version): + name = "spinnmachine" if version >= Version("7.2.0") else "SpiNNMachine" + url = "https://pypi.org/packages/source/s/SpiNNMachine/{}-1!{}.tar.gz" + return url.format(name, version) + + version("7.3.0", sha256="7c23def7deac54d56e23f4679c2317ddd053e6f6632c81ddf497fe021f37960c") version("7.0.0", sha256="5da374fd9208287799fbc324136fe5954dd1b370792ea81ea10d4537643272ad") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-spinnutilities@7.0.0", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + + depends_on("py-spinnutilities@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spinnutilities@7.0.0", type=("build", "run"), when="@7.0.0") diff --git a/packages/py-spinnman/package.py b/packages/py-spinnman/package.py index 1ff4a26805c083c00958e465f092380b60e75fe8..f89d9ad7b8fee886d0e241d68674ea033f175170 100644 --- a/packages/py-spinnman/package.py +++ b/packages/py-spinnman/package.py @@ -13,8 +13,18 @@ class PySpinnman(PythonPackage): homepage = "https://github.com/SpiNNakerManchester/SpiNNMan" pypi = "SpiNNMan/SpiNNMan-1!7.0.0.tar.gz" + def url_for_version(self, version): + name = "spinnman" if version >= Version("7.2.0") else "SpiNNMan" + url = "https://pypi.org/packages/source/s/SpiNNMan/{}-1!{}.tar.gz" + return url.format(name, version) + + version("7.3.0", sha256="8b4924ee31cae35845164da8d2da69391d306246772c706fdcd935e4ce8535db") version("7.0.0", sha256="61bc8934e4ad6798b48c02ff6c8a3ef5c8e080a5ee2f4b88fc9cd587ed1b1ae6") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-spinnmachine@7.0.0", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + + depends_on("py-spinnmachine@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spinnmachine@7.0.0", type=("build", "run"), when="@7.0.0") + depends_on("py-websocket-client", type=("build", "run")) diff --git a/packages/py-spinnutilities/package.py b/packages/py-spinnutilities/package.py index 6dfa0ca88e2179dde32bb7266a966c6b6a67ce0b..ede3fe0d7c82b9ef85b65c0c33dd7104d26b0ff2 100644 --- a/packages/py-spinnutilities/package.py +++ b/packages/py-spinnutilities/package.py @@ -14,9 +14,17 @@ class PySpinnutilities(PythonPackage): homepage = "https://github.com/SpiNNakerManchester/SpiNNUtils" pypi = "SpiNNUtilities/SpiNNUtilities-1!7.0.0.tar.gz" + def url_for_version(self, version): + name = "spinnutilities" if version >= Version("7.2.0") else "SpiNNUtilities" + url = "https://pypi.org/packages/source/s/SpiNNUtilities/{}-1!{}.tar.gz" + return url.format(name, version) + + version("7.3.0", sha256="5343004fd2aeec0124267e91c2649356b20bf8f2a5d33c9d7cd5ea6cce7dd86b") version("7.0.0", sha256="662855395ec367008735047a66a7ca75d1e5070e309ca3aa6ba3a843fb722841") - depends_on("python@3.7:", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + depends_on("py-appdirs", type=("build", "run")) depends_on("py-numpy", type=("build", "run")) depends_on("py-pyyaml", type=("build", "run")) diff --git a/packages/py-spynnaker/package.py b/packages/py-spynnaker/package.py index 6f775aa1c5f174076cf6f2a93d04c83361971769..0e200cb32b19ac4472283ed973549c08092a0e16 100644 --- a/packages/py-spynnaker/package.py +++ b/packages/py-spynnaker/package.py @@ -15,10 +15,18 @@ class PySpynnaker(PythonPackage): maintainers = ["rowley"] + def url_for_version(self, version): + name = "spynnaker" if version >= Version("7.2.0") else "sPyNNaker" + url = "https://pypi.org/packages/source/s/sPyNNaker/{}-1!{}.tar.gz" + return url.format(name, version) + + version("7.3.0", sha256="f052a50b8a31b526f0249b7aa1f7fe77c2f34fc35838600bef17c43e9d3bf9a9") version("7.0.0", sha256="caeaa624e3fdbca3b938c9be7ea4c78a51a037e659389fb01952822f069664db") - depends_on("python@3.7:", type=("build", "run")) - depends_on("py-spinnfrontendcommon@7.0.0", type=("build", "run")) + depends_on("python@3.8:", type=("build", "run"), when="@7.3.0:") + depends_on("python@3.7:", type=("build", "run"), when="@7.0.0:") + depends_on("py-spinnfrontendcommon@7.3.0", type=("build", "run"), when="@7.3.0") + depends_on("py-spinnfrontendcommon@7.0.0", type=("build", "run"), when="@7.0.0") depends_on("py-matplotlib", type=("build", "run")) depends_on("py-quantities", type=("build", "run")) depends_on("py-pynn", type=("build", "run")) diff --git a/packages/py-tvb-widgets/package.py b/packages/py-tvb-widgets/package.py index 7ca3db0d9a3fef2ea8a8746c0a457c2bd69cf053..855ac583d2f6e12fb0f6363d983ec4910c07b3b2 100644 --- a/packages/py-tvb-widgets/package.py +++ b/packages/py-tvb-widgets/package.py @@ -47,8 +47,7 @@ class PyTvbWidgets(PythonPackage): depends_on('py-traitlets@5.7.1:', type=('build', 'run')) depends_on('py-toml', type=('build', 'run')) depends_on('py-bokeh', type=('build', 'run')) - depends_on('vtk@=9.2.6', type=('build', 'run')) - + depends_on('vtk@9:9.3', type=('build', 'run')) depends_on('py-pytest', type='test') depends_on('py-pytest-mock', type='test') diff --git a/packages/wf-brainscales2-demos/package.py b/packages/wf-brainscales2-demos/package.py index cdf482c71a4e5a2ed0c3f1306f67f8638eb98f7b..9226c76a37defcb3c8317e9eccba93dfbc0aca7f 100644 --- a/packages/wf-brainscales2-demos/package.py +++ b/packages/wf-brainscales2-demos/package.py @@ -16,6 +16,7 @@ class WfBrainscales2Demos(Package): maintainers = ["emuller", "muffgaga"] # ECM: we probably should build the ipynb file in this package + version("9.0-a8", tag="jupyter-notebooks-9.0-a8") version("9.0-a7", tag="jupyter-notebooks-9.0-a7") version("9.0-a6", tag="jupyter-notebooks-9.0-a6") version("9.0-a5", tag="jupyter-notebooks-9.0-a5") diff --git a/packages/wf-human-multi-area-model/package.py b/packages/wf-human-multi-area-model/package.py new file mode 100644 index 0000000000000000000000000000000000000000..7cafb2c150b15adbba1473d2b4c2af9058879952 --- /dev/null +++ b/packages/wf-human-multi-area-model/package.py @@ -0,0 +1,68 @@ +# 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 import * + + +class WfHumanMultiAreaModel(Package): + """Meta-package to collect all dependencies of the Human Multi-Area-Model.""" + + git = "https://github.com/INM-6/human-multi-area-model" + maintainer = ["rshimoura", "terhorstd"] + + version("2.0.1", tag="v2.0.1") + version("master", branch="master") + + depends_on("nest@3.8:", type=("run", "test")) + depends_on("py-joblib@1.2.0:", type=("run", "test")) + depends_on("py-xlrd@2.0.1:", type=("run", "test")) + depends_on("py-matplotlib@3.7.3:", type=("run", "test")) + depends_on("py-pyyaml@6.0:", type=("run", "test")) + depends_on("py-numpy@1.23.5:", type=("run", "test")) + depends_on("py-seaborn@0.12.2:", type=("run", "test")) + depends_on("python@3.8:", type=("run", "test")) + depends_on("py-pandas@2.0.3:", type=("run", "test")) + depends_on("py-scipy@1.10.1:", type=("run", "test")) + depends_on("py-nnmt@1.3.0:", type=("run", "test")) + depends_on("py-dicthash@0.0.1:", type=("run", "test")) + depends_on("py-networkx@3.1:", type=("run", "test")) + depends_on("py-notebook@6.5.4:", type=("run", "test")) + depends_on("py-future@0.18.2:", type=("run", "test")) + + def install(self, spec, prefix): + install_tree(".", join_path(prefix, "notebooks")) + + def _nbconvert(self, nb, nb_out): + jupyter = Executable("jupyter") + args = [ + "nbconvert", + "--ExecutePreprocessor.kernel_name=python3", + "--execute", + "--to", + "notebook", + nb, + "--output", + nb_out + ] + try: + # execute notebook and save + jupyter(*args) + except Exception as e: + # if the above fails, re-run notebook to produce output with error + jupyter(*(args+["--allow-errors"])) + raise + + def _run_notebooks(self, output_dir): + mkdirp(output_dir) + self._nbconvert(join_path(self.prefix, "notebooks", "humam_tutorial.ipynb"), join_path(output_dir, "humam_tutorial.ipynb")) + + @run_after("install") + @on_package_attributes(run_tests=True) + def installcheck(self): + self._run_notebooks(join_path(self.stage.path, ".install_time_tests")) + copy_tree(join_path(self.stage.path, ".install_time_tests"), join_path(self.prefix, '.build')) + + def test_notebook(self): + self._run_notebooks(join_path(self.test_suite.stage, self.spec.format("out-{name}-{version}-{hash:7}"))) diff --git a/spack.yaml b/spack.yaml index 4af3f81619804c3f9303c1cbb483b054a9698600..5f8217b5edd9ea0a302482dd82bad6330354a010 100644 --- a/spack.yaml +++ b/spack.yaml @@ -12,10 +12,10 @@ spack: - biobb-model@4.0.0 - biobb-structure-checking@3.12.1 - biobb-structure-utils@4.0.0 - - hxtorch@9.0-a7 + - hxtorch@9.0-a8 - nest@3.8 +sonata - neuron@8.2.3 +mpi - - jaxsnn@9.0-a7 + - jaxsnn@9.0-a8 - py-bluepyefe@2.2.18 - py-bluepymm@0.7.65 - py-bluepyopt@1.13.86 @@ -36,7 +36,7 @@ spack: - py-libneuroml@0.4.1 - py-libsonata@0.1.23 - py-neo@0.13.3 - - py-nestml@7.0.2 + - py-nestml@8.0.0 - py-netpyne@1.0.6 - py-neurom@3.2.2 - py-neuror@1.6.4 @@ -46,7 +46,7 @@ spack: - py-quantities@0.16.0 - py-siibra@1.0a9 - py-snudda@2.0.1 - - py-spynnaker@7.0.0 + - py-spynnaker@7.3.0 - py-tvb-framework@2.9 - py-tvb-contrib@2.9.1 - py-tvb-library@2.9.1 @@ -56,16 +56,17 @@ spack: - py-tvb-ext-unicore - py-tvb-ext-xircuits@1.1.0 - py-viziphant@0.4.0 - - pynn-brainscales@9.0-a7 + - pynn-brainscales@9.0-a8 - r-rgsl@0.1.1 - r-sbtabvfgen@0.1 - r-uqsa@2.2 - sda@7.3.3d # Workflows (meta-packages) - wf-biobb - - wf-brainscales2-demos@9.0-a7 + - wf-brainscales2-demos@9.0-a8 - wf-protein-association-rates@0.1 - wf-multi-area-model@1.2.0 + - wf-human-multi-area-model@2.0.1 - wf-uq-akar4@0.1 - wf-custom-python@0.1 #- py-cerebstats