From 46dff572fa8b560a81640170f3a69a6f43a9973d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de> Date: Thu, 7 Sep 2023 12:10:59 +0200 Subject: [PATCH] feat(wf-brainscales2-demos): add a test [draft] --- packages/wf-brainscales2-demos/package.py | 30 ++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/wf-brainscales2-demos/package.py b/packages/wf-brainscales2-demos/package.py index 7f914a9e..2cd97768 100644 --- a/packages/wf-brainscales2-demos/package.py +++ b/packages/wf-brainscales2-demos/package.py @@ -7,13 +7,18 @@ from spack import * -class WfBrainscales2Demos(BundlePackage): +class WfBrainscales2Demos(Package): """Meta-package to collect all dependencies for the BrainScaleS-2 demos/tutorials.""" - homepage="https://electronicvisions.github.io/documentation-brainscales2/" + homepage="https://electronicvisions.github.io/documentation-brainscales2" + git = "https://github.com/electronicvisions/documentation-brainscales2" + maintainer = ["muffgaga"] - version("23.6") + # ECM: we probably should build the ipynb file in this package + version("23.6", branch="jupyter-notebook-experimental") + depends_on('hxtorch') + depends_on('pynn-brainscales') depends_on('py-matplotlib@3.5.1:') depends_on('py-ipywidgets@7.7.0:') depends_on('py-ipycanvas@0.10.2:') @@ -28,3 +33,22 @@ class WfBrainscales2Demos(BundlePackage): depends_on('py-scipy@1.8.1:') depends_on('py-deap@1.3:') depends_on('py-pandas@1.4.2:') + + 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" + "ts_05-yin_yang.ipynb" + "--output" + prefix+"/.spack_test_results/ts_05-yin_yang.ipynb") -- GitLab