Package: tvb-ext-unicore
tvb-ext-unicoreTVB Widgets - A Unicore Lab extensionThis 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.The package is composed of a Python module namedtvbextunicorefor the server extension and a NPM package namedtvb-ext-unicorefor the frontend extension.As the extension provides access to different EBRAINS HPC sites, it needs
your EBRAINS authentication token in order to work.There are 2 options to use this extension:Directly inEBRAINS Lab: in this case, your token
will be retrieved automatically (as you had to login for accessing the extension).Outside EBRAINS Lab: you will need to manually copy your authentication token from
EBRAINS Lab and keep it in an environment variable calledCLB_AUTH.RequirementsJupyterLab >= 3.0pyunicore >= 0.9.15InstallTo install the extension, execute:pipinstalltvb-ext-unicoreUninstallTo remove the extension, execute:pipuninstalltvb-ext-unicoreTroubleshootIf you are seeing the frontend extension, but it is not working, check
that the server extension is enabled:jupyterserverextensionlistIf the server extension is installed and enabled, but you are not seeing
the frontend extension, check the frontend extension is installed:jupyterlabextensionlistContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Install external dependenciespipinstallpyunicore# Clone the tvb-ext-unicore repo to your local environment# Change directory to the tvb-ext-unicore directorycdtvb-ext-unicore# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Server extension must be manually installed in develop modejupyterserverextensionenabletvbextunicore# Define CLB_AUTH environment variable holding your EBRAINS tokenexportCLB_AUTH=${ebrains_token}# Rebuild extension Typescript source after making changesjlpmrunbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmrunwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm run buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstall# Server extension must be manually disabled in develop modejupyterserverextensiondisabletvbextunicore
pipuninstalltvb-ext-unicoreIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedtvb-ext-unicorewithin that folder.AcknowledgmentsThis project has received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).