diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59ec4499dc5e23da91f12fd6a09edb1eec14c932..7f765299722f1a688be880945e250b16a3090b0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -207,7 +207,7 @@ build-spack-env-on-runner: - | # succesfully installed packages: keep the spack logs for any package modified during this CI job SPACK_PACKAGES_DIR=$SPACK_DEV_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0 - if cp --parents $SPACK_PACKAGES_DIR/*/.spack/*.txt ./; then + if cp --parents $SPACK_PACKAGES_DIR/*/.spack/*.txt $SPACK_PACKAGES_DIR/*/.spack_test_results/* ./; then mv .$SPACK_PACKAGES_DIR spack_logs/installed else echo "No packages installed, so no logs to collect" @@ -290,6 +290,7 @@ sync-gitlab-spack-instance: # (we use repo.yaml, that is modified at each start of the pipeline, as a reference file) SPACK_PACKAGES_DIR=$SPACK_PATH/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0 if find $SPACK_PACKAGES_DIR/*/.spack/*.txt -newer $SPACK_REPO_PATH/repo.yaml -exec cp --parents -r "{}" ./ \;; then + cp --parents -r $SPACK_PACKAGES_DIR/*/.spack_test_results/* ./ mv .$SPACK_PACKAGES_DIR spack_logs/installed else echo "No packages installed, so no logs to collect" diff --git a/packages/wf-multi-area-model/package.py b/packages/wf-multi-area-model/package.py index 4458d12310e5488005c37357586f2fc60c003a51..0020b1de2827ce3a086283a1350e7f86e3f68c27 100644 --- a/packages/wf-multi-area-model/package.py +++ b/packages/wf-multi-area-model/package.py @@ -6,15 +6,33 @@ from spack import * -class WfMultiAreaModel(BundlePackage): +class WfMultiAreaModel(Package): """Meta-package to collect all dependencies of the Multi-Area-Model.""" homepage="https://inm-6.github.io/multi-area-model/" - git = "https://github.com/INM-6/multi-area-model" + #git = "https://github.com/INM-6/multi-area-model" + git = "https://github.com/terhorstd/multi-area-model" maintainer = ["terhorstd"] - version("0.1") + version("master", branch="master") + version("ebrains", branch="lab.ebrains.eu") depends_on("py-nested-dict") depends_on("py-dicthash") + depends_on("py-matplotlib") + depends_on("py-numpy") + depends_on("py-scipy") + depends_on("py-future") + depends_on("nest") + depends_on("py-notebook", type="test") + def install(self, spec, prefix): + # sanity_check_prefix requires something in the install directory + mkdirp(prefix + "/.spack_test_results") + + @run_after("install") + @on_package_attributes(run_tests=True) + def installcheck(self): + # execute notebook and save + jupyter = Executable("jupyter") + jupyter("nbconvert", "--ExecutePreprocessor.kernel_name=python3", "--execute", "--allow-errors", "--to", "notebook", "multi-area-model.ipynb", "--output", prefix+"/.spack_test_results/multi-area-model.ipynb") diff --git a/spack.yaml b/spack.yaml index 89e7eec2bf4c18fc4b44d5f7cc9f89a4413d8c3d..4a8592575847f9c8f7254eaf037d9c8736d251cc 100644 --- a/spack.yaml +++ b/spack.yaml @@ -62,7 +62,7 @@ spack: - wf-biobb - wf-brainscales2-demos - wf-uq-akar4@0.1 - - wf-multi-area-model@0.1 + - wf-multi-area-model@ebrains #- py-cerebstats #- py-cerebunit #- py-morphounit@1.0.4