Package: maap-help-jupyter-extension
maap-help-jupyter-extensionJupyter extension that provides an interactive tour and adds MAAP specific information to the help tabRequirementsJupyterLab >= 3.4.4InstallTo install the extension, execute:pipinstallmaap_help_jupyter_extensionUninstallTo remove the extension, execute:pipuninstallmaap_help_jupyter_extensionContributingDevelopment installNote: You will need NodeJS v14 to build the extension package.# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmrunbuildIf you would like to disable the default jupyter lab tutorial, (MAAP specific one will still be enabled), runjupyter labextension disable "jupyterlab-tour:default-tours"Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.The first command installs the dependencies that are specified in thesetup.pyfile and inpackage.json. Among the dependencies are also all theJupyterLabcomponents that you want to use in your project.It then runs the build script. In that step, the TypeScript code gets
converted to javascript using the compilertscand stored in alibdirectory. And a condensed form of the Javascript is copied in the Python
package (in the foldermaap_help_jupyter_extension/labextension). This is the code that
would be installed by the user in JupyterLab.The second command creates a symbolic link to the foldermaap_help_jupyter_extension/labextensionso that extension is installed in development mode in JupyterLab.The third command allows you to update the Javascript code each time you modify your
extension code.Now, we can run the extension. Note by adding--watch, we just have to refresh the browser when the project is rebuilt.jupyterlab--watchDevelopment uninstallpipuninstallmaap_help_jupyter_extensionIn 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 namedmaap-help-jupyter-extensionwithin that folder.File Structure InfoInformation about the extension:README.mdcontains some instructionsLICENSEcontains your extension code license; BSD-3 Clause by default (but you can change it).Extension code (those files are mandatory):package.jsoncontains information about the extension such as dependenciestsconfig.jsoncontains information for the typescript compilationsrc/plugin.tsthis contains the actual code of your extensionstyle/folder contains style elements that you can useValidation:.prettierrcand.prettierignorespecify the code formatterprettierconfiguration.eslintrc.jsand.eslintignorespecify the code lintereslintconfiguration.github/workflows/build.ymlsets the continuous integration tests of the code usingGitHub ActionsPackaging as a Python package:setup.pycontains information about the Python package such as what to packagepyproject.tomlcontains the dependencies to create the Python packageMANIFEST.incontains list of non-Python files to include in the Python packageinstall.jsoncontains information retrieved by JupyterLab to help users know how to manage the packagemaap_help_jupyter_extensionfolder contains the final code to be distributed