From bcd0a74eb37177cac6d0e5e7e0f7f772302124c1 Mon Sep 17 00:00:00 2001 From: Adrian Ciu <adrian.ciu@codemart.ro> Date: Tue, 15 Oct 2024 10:35:14 +0200 Subject: [PATCH] feat: add py-tvb-ext-{unicore,bucket,xircuits} --- packages/py-pytest-tornasync/package.py | 20 ++++++++++ packages/py-tvb-contrib/package.py | 3 +- packages/py-tvb-ext-bucket/package.py | 35 ++++++++++++++++++ packages/py-tvb-ext-unicore/package.py | 37 +++++++++++++++++++ packages/py-tvb-ext-xircuits/package.py | 49 +++++++++++++++++++++++++ spack.yaml | 8 ++-- 6 files changed, 147 insertions(+), 5 deletions(-) create mode 100644 packages/py-pytest-tornasync/package.py create mode 100644 packages/py-tvb-ext-bucket/package.py create mode 100644 packages/py-tvb-ext-unicore/package.py create mode 100644 packages/py-tvb-ext-xircuits/package.py diff --git a/packages/py-pytest-tornasync/package.py b/packages/py-pytest-tornasync/package.py new file mode 100644 index 00000000..784f7db7 --- /dev/null +++ b/packages/py-pytest-tornasync/package.py @@ -0,0 +1,20 @@ +from spack.package import * + + +class PyPytestTornasync(PythonPackage): + """ + py.test plugin for testing Python 3.5+ Tornado code + """ + + homepage = "https://github.com/eukaryote/pytest-tornasync" + pypi = "pytest-tornasync/pytest-tornasync-0.6.0.post2.tar.gz" + maintainers = ['ldomide', 'adrianciu'] + + license('http://www.opensource.org/licenses/mit-license.php') + + version("0.6.0.post2", sha256="d781b6d951a2e7c08843141d3ff583610b4ea86bfa847714c76edefb576bbe5d") + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-pytest', type=('build', 'run')) + depends_on('py-tornado@5.0:', type=('build', 'run')) + diff --git a/packages/py-tvb-contrib/package.py b/packages/py-tvb-contrib/package.py index 9aabdbaa..8f940f0c 100644 --- a/packages/py-tvb-contrib/package.py +++ b/packages/py-tvb-contrib/package.py @@ -12,10 +12,11 @@ class PyTvbContrib(PythonPackage): """ homepage = "https://www.thevirtualbrain.org/" - pypi = 'tvb-contrib/tvb-contrib-2.9.tar.gz' + pypi = 'tvb-contrib/tvb_contrib-2.9.1.tar.gz' maintainers = ['dionperd', 'paulapopa', "ldomide"] + version('2.9.1', '23c8cc11737f8b87d8e8db573f9f3701611ccc1b6ca67fac00cd09e6307cae6c') version('2.9', '64e5f17c46b67c1f92b3cdfb863c7d5e1d97d913b26521a9567735270bb9ad25') version('2.8.2', 'ff5990e979cf1f87046d7bed2c265f9dec50f9d817abaabdf5df7ec4482b5063') version('2.8.1', '0b9bc5f837913f1cba007d25ae94c9df51bf43bf19c9fb2af14a90cb6a1e1a66') diff --git a/packages/py-tvb-ext-bucket/package.py b/packages/py-tvb-ext-bucket/package.py new file mode 100644 index 00000000..3d5e7c2b --- /dev/null +++ b/packages/py-tvb-ext-bucket/package.py @@ -0,0 +1,35 @@ +from spack import * + + +class PyTvbExtBucket(PythonPackage): + """ + Jupyter Lab extension tvb-ext-bucket for accessing EBRAINS data proxy through a GUI + """ + + homepage = "https://www.thevirtualbrain.org/" + pypi = "tvb-ext-bucket/tvb_ext_bucket-1.0.0.tar.gz" + maintainers = ['ldomide', 'adrianciu'] + + version("1.0.0", sha256="43c7e75129d65b14ef347d9ce2de4d152b308d5464e015e3577f480a7d75bbee") + + depends_on('py-setuptools', type='build') + depends_on('python@3.8:', type=('build', 'run')) + depends_on('py-jupyter-server', type=('build', 'run')) + depends_on('py-ebrains-drive@0.5.0:', type=('build', 'run')) + depends_on('py-hatchling@1.5.0:', type='build') + depends_on('py-jupyterlab@3.4.7:3', type=('build', 'run')) + depends_on('py-hatch-nodejs-version@0.3.1:', type='build') + depends_on('npm', type='build') + depends_on('node-js', type='build') + depends_on('py-hatch-jupyter-builder', type='build') + + depends_on('py-pytest', type='test') + depends_on('py-pytest-asyncio', type='test') + depends_on('py-pytest-mock', type='test') + depends_on('py-pytest-tornasync', type='test') + + @run_after('install') + @on_package_attributes(run_tests=True) + def install_test(self): + pytest = which('pytest') + pytest() diff --git a/packages/py-tvb-ext-unicore/package.py b/packages/py-tvb-ext-unicore/package.py new file mode 100644 index 00000000..786e2f6e --- /dev/null +++ b/packages/py-tvb-ext-unicore/package.py @@ -0,0 +1,37 @@ +from spack.package import * +import os + + +class PyTvbExtUnicore(PythonPackage): + """" + This jupyter extension offers a UI component to monitor HPC jobs through Unicore interface. + It allows users to easily switch between computing sites, retrieve details about the jobs, and also cancel them. + """ + + homepage = "https://www.thevirtualbrain.org/" + pypi = "tvb-ext-unicore/tvb-ext-unicore-2.0.0.tar.gz" + maintainers = ['ldomide', 'adrianciu'] + + version("2.0.0", sha256="85c4176c4a833149245e41e2448e94e5507f44bb7c3ffe1e5cf52f9c9b76e7ad") + + depends_on('py-setuptools', type='build') + depends_on('python@3.8:', type=('build', 'run')) + depends_on('py-hatchling@1.5:', type='build') + depends_on('py-hatch-nodejs-version@0.3.1:', type=('build', 'run')) + depends_on('py-hatch-jupyter-builder@0.5:', type='build') + depends_on('py-jupyterlab@3.4.7:3', type=('build', 'run')) + depends_on('py-jupyter-server', type=('build', 'run')) + depends_on('py-pyunicore@1.0:', type=('build', 'run')) + depends_on('py-jupyter-packaging@0.10:', type='build') + depends_on('npm', type='build') + depends_on('node-js', type='build') + + depends_on('py-pytest', type='test') + depends_on('py-pytest-mock', type='test') + + @run_after('install') + @on_package_attributes(run_tests=True) + def install_test(self): + os.environ['CLB_AUTH'] = 'test_auth_token' + pytest = which('pytest') + pytest() diff --git a/packages/py-tvb-ext-xircuits/package.py b/packages/py-tvb-ext-xircuits/package.py new file mode 100644 index 00000000..23bd0db6 --- /dev/null +++ b/packages/py-tvb-ext-xircuits/package.py @@ -0,0 +1,49 @@ +from spack.package import * + + +class PyTvbExtXircuits(PythonPackage): + """" + This is a jupyterlab extension built as a prototype for building EBRAINS (including TVB simulator, Siibra API) workflows + in a visual and interactive manner. It extends the already existent Xircuits jupyterlab extension by adding new components and new features on top. + """ + + homepage = "https://www.thevirtualbrain.org/" + pypi = "tvb-ext-xircuits/tvb-ext-xircuits-1.1.0.tar.gz" + maintainers = ['ldomide', 'adrianciu'] + + version("1.1.0", sha256="37c71be6ac8e4abb91501b2eb788167f6142eefd2f36ef061d760d2e61828afd") + + depends_on('py-docutils', type=("build", "run")) + depends_on('py-ipykernel', type=("build", "run")) + depends_on('py-packaging', type=("build", "run")) + depends_on('py-tornado@6.1.0:', type=("build", "run")) + depends_on('py-jupyter-core', type=("build", "run")) + depends_on('py-jupyter-packaging', type=("build", "run")) + depends_on('py-jupyterlab-server@2.11.1:3', type=("build", "run")) + depends_on('py-jupyter-server', type=("build", "run")) + depends_on('py-notebook-shim@0.1:', type=("build", "run")) + depends_on('py-jinja2@3.0.3:', type=("build", "run")) + depends_on('py-jupyterlab@3.4.7:3', type=("build", "run")) + depends_on('py-jupyterlab-widgets', type=("build", "run")) + depends_on('py-nbformat', type=("build", "run")) + depends_on('py-numpy', type=("build", "run")) + depends_on('py-requests', type=("build", "run")) + depends_on('py-gitpython', type=("build", "run")) + depends_on('py-pygithub', type=("build", "run")) + depends_on('py-pyunicore', type=("build", "run")) + depends_on('py-siibra', type=("build", "run")) + depends_on('py-tqdm', type=("build", "run")) + depends_on('py-tvb-library', type=("build", "run")) + depends_on('py-tvb-gdist', type=("build", "run")) + depends_on('py-tvb-framework', type=("build", "run")) + depends_on('py-tvb-ext-bucket', type=("build", "run")) + depends_on('py-tvb-ext-unicore', type=("build", "run")) + depends_on('py-tvb-widgets@1.0:', type=("build", "run")) + + depends_on('py-pytest', type='test') + + @run_after('install') + @on_package_attributes(run_tests=True) + def install_test(self): + pytest = which('pytest') + pytest('--ignore', 'tvbextxircuits/tests/xircuits/test_generate_description.py') diff --git a/spack.yaml b/spack.yaml index 909ab1af..ebb65aa3 100644 --- a/spack.yaml +++ b/spack.yaml @@ -46,14 +46,14 @@ spack: - py-siibra@1.0a9 - py-snudda@2.0.1 - py-spynnaker@7.0.0 - - py-tvb-contrib@2.9 - - py-tvb-data@2.8 - py-tvb-framework@2.9 - - py-tvb-gdist@2.2 + - py-tvb-contrib@2.9.1 - py-tvb-library@2.9.1 - py-tvb-multiscale@2.1.0.ebrains - - py-tvb-storage@2.9 - py-tvb-widgets@2.1.0 + - py-tvb-ext-bucket + - py-tvb-ext-unicore + - py-tvb-ext-xircuits@1.1.0 - py-viziphant@0.4.0 - pynn-brainscales@9.0-a6 - r-rgsl@0.1.1 -- GitLab