Skip to main content

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

Help Menu Tour

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 jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

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.md contains some instructions
    • LICENSE contains your extension code license; BSD-3 Clause by default (but you can change it).
  • Extension code (those files are mandatory):

    • package.json contains information about the extension such as dependencies
    • tsconfig.json contains information for the typescript compilation
    • src/plugin.ts this contains the actual code of your extension
    • style/ folder contains style elements that you can use
  • Validation:

    • .prettierrc and .prettierignore specify the code formatter prettier configuration
    • .eslintrc.js and .eslintignore specify the code linter eslint configuration
    • .github/workflows/build.yml sets the continuous integration tests of the code using GitHub Actions
  • Packaging as a Python package:

    • setup.py contains information about the Python package such as what to package
    • pyproject.toml contains the dependencies to create the Python package
    • MANIFEST.in contains list of non-Python files to include in the Python package
    • install.json contains information retrieved by JupyterLab to help users know how to manage the package
    • maap_help_jupyter_extension folder contains the final code to be distributed

    Release

See RELEASE

Contribute

See CONTRIBUTING

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maap_help_jupyter_extension-2.0.0.tar.gz (394.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file maap_help_jupyter_extension-2.0.0.tar.gz.

File metadata

File hashes

Hashes for maap_help_jupyter_extension-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8ce121a816279a39ddbd39662f15827dca39a47d6e8bf4fc5eaa716363dcece6
MD5 f3dcbe9763dc095b4430ef096b978aba
BLAKE2b-256 c2c102a931084d671243931568d8ae8f88d7a2d062199b352ece0311b241e7cc

See more details on using hashes here.

File details

Details for the file maap_help_jupyter_extension-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for maap_help_jupyter_extension-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8943f0a53280f99b798d75c6a8d13b06d7ce13d94be23c095dea3da2257f609d
MD5 df575996e750f702b54bc2e97905a39d
BLAKE2b-256 9ce709949a9b07865faf6f1315b67285108c9d8e6f6f570d478d81c4a1097028

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page