Skip to main content

A Jupyterlab extension to interact with the Oceanum.io platform

Project description

oceanumlab

<<<<<<< before updating Github Actions Status A Jupyterlab extension to interact with the Oceanum.io platform

This extension is composed of a Python package named oceanumlab for the server extension and a NPM package named oceanumlab for the frontend extension.

Github Actions Status

A Jupyterlab extension to interact with the Oceanum.io platform

after updating

Requirements

  • JupyterLab >= 3.0

Install

To install the extension, execute:

pip install oceanumlab

Uninstall

To remove the extension, execute:

pip uninstall oceanumlab

Contributing

Development install

Note: You will need NodeJS to build the extension package.

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.

# Clone the repo to your local environment
# Change directory to the oceanumlab directory
# 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 build

You 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 needed
jlpm watch
# Run JupyterLab in another terminal
jupyter lab

With 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, the jlpm build command 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:

jupyter lab build --minimize=False

Development uninstall

pip uninstall oceanumlab

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 oceanumlab within that folder.

Testing the extension

Server tests

This extension is using Pytest for Python code testing.

Install test dependencies (needed only once):

pip install -e ".[test]"

To execute them, run:

pytest -vv -r ap --cov oceanumlab

Frontend tests

This extension is using Jest for JavaScript code testing.

To execute them, execute:

jlpm
jlpm test

Integration tests

This extension uses Playwright for the integration tests (aka user level tests). More precisely, the JupyterLab helper Galata is used to handle testing the extension in JupyterLab.

More information are provided within the ui-tests README.

Packaging the extension

See RELEASE

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

oceanumlab-4.0.3.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

oceanumlab-4.0.3-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file oceanumlab-4.0.3.tar.gz.

File metadata

  • Download URL: oceanumlab-4.0.3.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for oceanumlab-4.0.3.tar.gz
Algorithm Hash digest
SHA256 4668823d52d63b00b24da6036559926961ad3615dcc505f20f5f951f316e47a5
MD5 aa6f1a8babd1effbf87088847e8bbaa9
BLAKE2b-256 2b0470440baa1a0dc31fc08f732fa5c9c4a28a1cece5bd6d592e2915152dcfb0

See more details on using hashes here.

File details

Details for the file oceanumlab-4.0.3-py3-none-any.whl.

File metadata

  • Download URL: oceanumlab-4.0.3-py3-none-any.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for oceanumlab-4.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f654077cecf271f093e2bf5e82c6c3e512730cc6cdfa95ca3ff96f0f96105d3
MD5 7a10d00b663e4dae85b72e89b7db8959
BLAKE2b-256 9f4b38615e7051dafc15bd67588a6293947c501d301f3bd2b7658799099cbab3

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