Jupyter extension with an interactive MAAP tutorial and MAAP specific help tab options.
Project description
MAAP Help Jupyter Extension
Jupyter extension that provides an interactive tour and adds MAAP specific information to the help tab
Requirements
| Package | Version |
|---|---|
| JupyterLab | v4.1.6 |
| NodeJS | v18.20.0 |
| Python | >= v3.8 |
These are the recommended versions. Others may be suitable, but are not actively supported.
Install
To install the extension, execute:
pip install maap_help_jupyter_extension
Uninstall
To remove the extension, execute:
pip uninstall maap_help_jupyter_extension
Contributing
Development install
# Install package dependencies
jlpm install
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build
If you would like to disable the default jupyter lab tutorial, (MAAP specific one will still be enabled), run
jupyter labextension disable "jupyterlab-tour:default-tours"
The
jlpmcommand is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.
The first command installs the dependencies that are specified in the
setup.py file and in package.json. Among the dependencies are also all the JupyterLab components 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 compiler tsc and stored in a lib
directory. And a condensed form of the Javascript is copied in the Python
package (in the folder maap_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 folder maap_help_jupyter_extension/labextension so 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.
jupyter lab --watch
Development uninstall
pip uninstall maap_help_jupyter_extension
In development mode, you will also need to remove the symlink created by jupyter labextension develop
command. To find its location, you can run jupyter labextension list to figure out where the labextensions
folder is located. Then you can remove the symlink named maap-help-jupyter-extension within that folder.
Testing
Playwright is the testing framework used. When testing locally, use the following command to start the jupyter server and run the tests:
jlpm run start & jlpm run test
To test using the interactive UI, run the following instead:
jlpm run start & jlpm run test --ui
File Structure Info
-
Information 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 use
-
Validation:
.prettierrcand.prettierignorespecify the code formatterprettierconfiguration.eslintrc.jsand.eslintignorespecify the code lintereslintconfiguration.github/workflows/build.ymlsets the continuous integration tests of the code using GitHub Actions
-
Packaging 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
Release
See RELEASE
Contribute
See CONTRIBUTING
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maap_help_jupyter_extension-2.0.2.tar.gz.
File metadata
- Download URL: maap_help_jupyter_extension-2.0.2.tar.gz
- Upload date:
- Size: 394.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0280affeca57f825e0735ecf3d235d2879b1f9e53f9fb260baec29c97aa85303
|
|
| MD5 |
fb364dc8d54663b0e1dc2f0157235e86
|
|
| BLAKE2b-256 |
f9f4456aac8c8f8d0d1faa60c9b76761011a70d02b1a0e92001e6110c540eb28
|
File details
Details for the file maap_help_jupyter_extension-2.0.2-py3-none-any.whl.
File metadata
- Download URL: maap_help_jupyter_extension-2.0.2-py3-none-any.whl
- Upload date:
- Size: 233.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb92b910c9a694e5a372ebc1fc898181b5a3964eb32c537587f81d909057efc4
|
|
| MD5 |
0183974f807193cd47e19ad526d801fa
|
|
| BLAKE2b-256 |
5818fcd433f7ba900491fbb7e5909b86a2d5d31a61b88c569e40afa2419915f3
|