diff --git a/packages/wf-brainscales2-demos/package.py b/packages/wf-brainscales2-demos/package.py index 7f914a9e1121ad663abeedb03ab25dbe46a4c0a4..2cd9776844276a6cadac0c2863a62e2b28bfd721 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")