Skip to content
Snippets Groups Projects

feat(BSS2): add/reenable tests

Merged Eric Müller requested to merge try_adding_a_test_to_wf-bss2-demos into master
4 unresolved threads

Merge request reports

Pipeline #24812 passed

Pipeline passed for afb57d09 on try_adding_a_test_to_wf-bss2-demos

Approval is optional

Merged by Eleni MathioulakiEleni Mathioulaki 1 year ago (Sep 8, 2023 11:37am UTC)

Merge details

  • Changes merged into master with 8272c0a3 (commits were squashed).
  • Deleted the source branch.

Pipeline #24816 passed

Pipeline passed for 8272c0a3 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
141 144 args = ['--test-execnone']
142 145 return args
143 146
144 # def install_test(self):
145 # with working_dir('spack-test', create=True):
146 # old_pythonpath = os.environ.get('PYTHONPATH', '')
147 # os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath])
148 # python('-c', 'import pynn_brainscales; print(pynn_brainscales.__file__)')
147 def install_test(self):
148 with working_dir('spack-test', create=True):
149 old_pythonpath = os.environ.get('PYTHONPATH', '')
150 os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath])
  • Author Maintainer

    Maybe not needed if setup_dependent_build_environment is providing the PATHs? (Also in hxtorch)

  • setup_dependent_build_environment -> build env of dependent packages

    setup_build_environment -> build env of this package

    so to skip this, you need to define setup_build_environment (installation-time tests run in the build environment, so setup_run_environment is not enough)

  • Author Maintainer

    Technically, I would expect those to use the same stuff as other packages that depend on *this package. Providing setup_build_environment is somewhat unclean, as this influences the build itself.

    Edited by Eric Müller
  • Please register or sign in to reply
  • 104 104 env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library))
    105 105 env.prepend_path('PATH', ':'.join(path))
    106 106
    107 def setup_dependent_build_environment(self, env, dependent_spec):
    • Author Maintainer

      Might fix the env in the workflow install test… (if it does → weird named function)

      (and yes, BSS2 should install to the correct site-packages prefix instead of lib/)

    • Please register or sign in to reply
  • 23 depends_on('py-torch@1.11.0:')
    24 depends_on('py-torchvision@0.12.0:')
    25 depends_on('py-tqdm@4.62.3:')
    26 depends_on('py-requests@2.26.0:')
    27 depends_on('py-neo@0.11.1:')
    28 depends_on('py-scipy@1.8.1:')
    29 depends_on('py-deap@1.3:')
    30 depends_on('py-pandas@1.4.2:')
    13 homepage="https://electronicvisions.github.io/documentation-brainscales2"
    14 git = "https://github.com/electronicvisions/brainscales2-demos"
    15 maintainer = ["muffgaga"]
    16
    17 # ECM: we probably should build the ipynb file in this package
    18 version("23.6", branch="jupyter-notebooks-experimental")
    19
    20 depends_on('hxtorch', type=("run", "test"))
    • Author Maintainer

      Do we need to set the type? In the past, type defaulted to build+link — which would NOT be what we want… this is a workflow package, and therefore it's about testing the env that users see → test+run.

    • Please register or sign in to reply
  • Eleni Mathioulaki
    Eleni Mathioulaki @elmath started a thread on commit afb57d09
  • 168 168 args = ['--test-execnone']
    169 169 return args
    170 170
    171 # def install_test(self):
    172 # with working_dir('spack-test', create=True):
    173 # old_pythonpath = os.environ.get('PYTHONPATH', '')
    174 # os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath])
    175 # python('-v', '-X dev', '-c', 'import hxtorch; print(hxtorch.__file__)')
    171 def install_test(self):
    172 with working_dir('spack-test', create=True):
    173 old_pythonpath = os.environ.get('PYTHONPATH', '')
    174 os.environ['PYTHONPATH'] = ':'.join([str(self.prefix.lib), old_pythonpath])
    175 python('-c', 'import hxtorch; print(hxtorch.__file__)')
  • Author Maintainer

    Ok, this looks already reasonable (https://gitlab.ebrains.eu/technical-coordination/project-internal/devops/platform/ebrains-spack-builds/-/jobs/48505/artifacts/file/spack_logs/installed/wf-brainscales2-demos-23.6-yj4iveg6emnfh53fo6y3fr7vul4rf3zg/.spack_test_results/ts_05-yin_yang.ipynb).

    Still on TODO list for this MR:

    • setting the "connection mode" (there was some EBRAINS detection magic which fails in the CI runner env) → i.e. something like "LAB_KERNEL_NAME = EBRAINS-experimental"
    • run all tests
  • these only mean changes to the wf package, right? could you do this in a different MR? I'd like to merge at least the hxtorch/pynn-brainscales stuff to avoid building them every time :)

  • Author Maintainer

    Ok, sure.

  • Eric Müller approved this merge request

    approved this merge request

  • mentioned in commit 8272c0a3

  • Please register or sign in to reply