Skip to content
Snippets Groups Projects
Commit e744e05e authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

feat(wf-bss2-demos): add test_notebooks

parent d91ddf3b
No related branches found
No related tags found
No related merge requests found
...@@ -39,16 +39,10 @@ class WfBrainscales2Demos(Package): ...@@ -39,16 +39,10 @@ class WfBrainscales2Demos(Package):
# sanity_check_prefix requires something in the install directory # sanity_check_prefix requires something in the install directory
mkdirp(prefix + "/.spack_test_results") mkdirp(prefix + "/.spack_test_results")
@run_after("install") def _run_notebooks(self):
@on_package_attributes(run_tests=True) # TODO: remove debug output
def installcheck(self):
cmd_env = which("env") cmd_env = which("env")
cmd_env() cmd_env()
# enable "EBRAINS lab" mode
os.environ["LAB_IMAGE_NAME"] = "EBRAINS"
# select "EBRAINS experimental" upstream experiment service
os.environ["LAB_KERNEL_NAME"] = "EBRAINS-experimental"
os.environ["JUPYTERHUB_USER"] = "spack-test-wf-brainscales2-demos"
# execute notebook and save # execute notebook and save
jupyter = Executable("jupyter") jupyter = Executable("jupyter")
jupyter("nbconvert", jupyter("nbconvert",
...@@ -60,3 +54,20 @@ class WfBrainscales2Demos(Package): ...@@ -60,3 +54,20 @@ class WfBrainscales2Demos(Package):
"ts_05-yin_yang.ipynb", "ts_05-yin_yang.ipynb",
"--output", "--output",
prefix+"/.spack_test_results/ts_05-yin_yang.ipynb") prefix+"/.spack_test_results/ts_05-yin_yang.ipynb")
def _set_collab_things(self):
# enable "EBRAINS lab" mode
os.environ["LAB_IMAGE_NAME"] = "EBRAINS"
# select "EBRAINS experimental" upstream experiment service
os.environ["LAB_KERNEL_NAME"] = "EBRAINS-experimental"
os.environ["JUPYTERHUB_USER"] = "spack-test-wf-brainscales2-demos"
@run_after("install")
@on_package_attributes(run_tests=True)
def installcheck(self):
self._set_collab_things()
self._run_notebooks()
def test_notebooks(self):
self._set_collab_things()
self._run_notebooks()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment