Skip to content
Snippets Groups Projects
Commit 8272c0a3 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

Merge branch 'try_adding_a_test_to_wf-bss2-demos' into 'master'

feat(BSS2): add/reenable tests

See merge request technical-coordination/project-internal/devops/platform/ebrains-spack-builds!396
parents 95194fb7 afb57d09
No related branches found
No related tags found
No related merge requests found
...@@ -128,6 +128,9 @@ class Hxtorch(WafPackage): ...@@ -128,6 +128,9 @@ class Hxtorch(WafPackage):
env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library)) env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library))
env.prepend_path('PATH', ':'.join(path)) env.prepend_path('PATH', ':'.join(path))
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path('PYTHONPATH', self.prefix.lib)
def setup_run_environment(self, env): def setup_run_environment(self, env):
env.prepend_path('PYTHONPATH', self.prefix.lib) env.prepend_path('PYTHONPATH', self.prefix.lib)
...@@ -165,8 +168,11 @@ class Hxtorch(WafPackage): ...@@ -165,8 +168,11 @@ class Hxtorch(WafPackage):
args = ['--test-execnone'] args = ['--test-execnone']
return args return args
# def install_test(self): def install_test(self):
# with working_dir('spack-test', create=True): with working_dir('spack-test', create=True):
# old_pythonpath = os.environ.get('PYTHONPATH', '') old_pythonpath = os.environ.get('PYTHONPATH', '')
# os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath]) os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath])
# python('-v', '-X dev', '-c', 'import hxtorch; print(hxtorch.__file__)') python('-c', 'import hxtorch; print(hxtorch.__file__)')
# ignore exit code for now
cmd_true = which("true")
cmd_true()
...@@ -104,6 +104,9 @@ class PynnBrainscales(WafPackage): ...@@ -104,6 +104,9 @@ class PynnBrainscales(WafPackage):
env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library)) env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library))
env.prepend_path('PATH', ':'.join(path)) env.prepend_path('PATH', ':'.join(path))
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path('PYTHONPATH', self.prefix.lib)
def setup_run_environment(self, env): def setup_run_environment(self, env):
env.prepend_path('PYTHONPATH', self.prefix.lib) env.prepend_path('PYTHONPATH', self.prefix.lib)
...@@ -141,8 +144,11 @@ class PynnBrainscales(WafPackage): ...@@ -141,8 +144,11 @@ class PynnBrainscales(WafPackage):
args = ['--test-execnone'] args = ['--test-execnone']
return args return args
# def install_test(self): def install_test(self):
# with working_dir('spack-test', create=True): with working_dir('spack-test', create=True):
# old_pythonpath = os.environ.get('PYTHONPATH', '') old_pythonpath = os.environ.get('PYTHONPATH', '')
# os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath]) os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath])
# python('-c', 'import pynn_brainscales; print(pynn_brainscales.__file__)') python('-c', 'import pynn_brainscales; print(pynn_brainscales.__file__)')
# ignore exit code for now
cmd_true = which("true")
cmd_true()
...@@ -7,24 +7,50 @@ ...@@ -7,24 +7,50 @@
from spack import * from spack import *
class WfBrainscales2Demos(BundlePackage): class WfBrainscales2Demos(Package):
"""Meta-package to collect all dependencies for the BrainScaleS-2 demos/tutorials.""" """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/brainscales2-demos"
version("23.6") maintainer = ["muffgaga"]
depends_on('py-matplotlib@3.5.1:') # ECM: we probably should build the ipynb file in this package
depends_on('py-ipywidgets@7.7.0:') version("23.6", branch="jupyter-notebooks-experimental")
depends_on('py-ipycanvas@0.10.2:')
depends_on('py-numpy@1.21.6:') depends_on('hxtorch', type=("run", "test"))
depends_on('py-ipython@8.0.1:') depends_on('pynn-brainscales', type=("run", "test"))
depends_on('py-quantities@0.13.0:') depends_on('py-matplotlib@3.5.1:', type=("run", "test"))
depends_on('py-torch@1.11.0:') depends_on('py-ipywidgets@7.7.0:', type=("run", "test"))
depends_on('py-torchvision@0.12.0:') depends_on('py-ipycanvas@0.10.2:', type=("run", "test"))
depends_on('py-tqdm@4.62.3:') depends_on('py-numpy@1.21.6:', type=("run", "test"))
depends_on('py-requests@2.26.0:') depends_on('py-ipython@8.0.1:', type=("run", "test"))
depends_on('py-neo@0.11.1:') depends_on('py-quantities@0.13.0:', type=("run", "test"))
depends_on('py-scipy@1.8.1:') depends_on('py-torch@1.11.0:', type=("run", "test"))
depends_on('py-deap@1.3:') depends_on('py-torchvision@0.12.0:', type=("run", "test"))
depends_on('py-pandas@1.4.2:') depends_on('py-tqdm@4.62.3:', type=("run", "test"))
depends_on('py-requests@2.26.0:', type=("run", "test"))
depends_on('py-neo@0.11.1:', type=("run", "test"))
depends_on('py-scipy@1.8.1:', type=("run", "test"))
depends_on('py-deap@1.3:', type=("run", "test"))
depends_on('py-pandas@1.4.2:', type=("run", "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):
cmd_env = which("env")
cmd_env()
# 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")
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