Skip to main content

JupyterLab extension for browsing Minio object storage

Project description

jupyterlab-minio

Github Actions Status PyPI version Binder

JupyterLab extension for browsing Minio object storage.

This extension is composed of a Python package named jupyterlab-minio.

Jupyter Minio

Installation

This extension works on JupyterLab 3 only.

To install:

pip install jupyterlab-minio

You may also need to run:

jupyter server extension enable jupyterlab-minio

to make sure the server extension is enabled. Then, restart (stop and start) JupyterLab.

Usage

Configuration

If you have a ~/.mc/config.json file, no further configuration is necessary.

To configure using environment variables, set:

export MINIO_ENDPOINT="https://s3.us.cloud-object-storage.appdomain.cloud"
export MINIO_ACCESS_KEY="my-access-key-id"
export MINIO_SECRET_KEY="secret"

Alternatively, you can start without any configuration and fill in your endpoint and credentials through the form when prompted.

Development

Development Installation

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

The jlpm command is JupyterLab's pinned version of yarn, but you may also use yarn or npm as an alternative.

To install the development environment:

# Clone the repository and navigate to the project folder
git clone https://github.com/aristide/jupyterlab-minio.git
cd jupyterlab-minio

# Set up a virtual environment
virtualenv .venv
source .venv/bin/activate

# Install required packages for development
pip install jupyter_packaging~=0.10

# Install the package in development mode
pip install -e .

# Link the development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Enable the server extension manually in development mode
jupyter server extension enable jupyterlab-minio

# Build the extension TypeScript source files
jlpm build

To continuously watch the source directory and rebuild the extension on changes, run:

# Watch the source directory in one terminal
jlpm watch

# In another terminal, run JupyterLab in debug mode
jupyter lab --debug

To ensure source maps are generated for easier debugging:

jupyter lab build --minimize=False

Development Uninstallation

# Disable the server extension in development mode
jupyter server extension disable jupyterlab-minio

# Uninstall the package
pip uninstall jupyterlab-minio

In development mode, you may also need to remove the symlink created by jupyter labextension develop. To find its location, use jupyter labextension list to locate the labextensions folder, then remove the jupyterlab-minio symlink within it.

Testing the Extension

Server Tests

To install test dependencies and execute server tests:

pip install -e ".[test]"
jupyter labextension develop . --overwrite
pytest -vv -r ap --cov jupyterlab-minio

Frontend Tests

To execute frontend tests using Jest:

jlpm
jlpm test

Integration Tests

This extension uses Playwright with the JupyterLab helper Galata for integration tests.

Refer to the ui-tests README for further details.

Running the Devcontainer in Visual Studio Code

  1. Install Docker: Ensure Docker is installed and running on your machine. You can download it from Docker's official site.

  2. Install Visual Studio Code: Download and install Visual Studio Code.

  3. Install the Remote - Containers Extension:

    • In Visual Studio Code, go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on Mac).
    • Search for and install the "Remote - Containers" extension by Microsoft.
  4. Open the Project in a Devcontainer:

    • Open the jupyterlab-minio project folder in Visual Studio Code.
    • You should see a prompt to reopen the folder in a devcontainer. Click "Reopen in Container." If you don’t see the prompt, use the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on Mac), type "Remote-Containers: Reopen in Container," and select it.
  5. Wait for the Container to Build:

    • VS Code will build the devcontainer using the .devcontainer/Dockerfile or .devcontainer/devcontainer.json configuration. This setup may take a few minutes as it installs dependencies and configures the environment.
  6. Access the Development Environment:

    • Once the container is running, you can access the terminal (Ctrl+`` or Cmd+``on Mac) and use the VS Code editor as usual. The devcontainer has all necessary tools pre-installed for working onjupyterlab-minio.
  7. Run the Extension:

    • To run and test the extension in JupyterLab, use the development commands from above, such as jlpm watch and jupyter lab --debug --ServerApp.token='' --ip=0.0.0.0 --notebook-dir=notebooks.

This setup allows you to develop in a consistent, isolated environment that replicates the project dependencies and configurations, making collaboration easier.

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

jupyterlab_minio-1.1.1.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

jupyterlab_minio-1.1.1-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlab_minio-1.1.1.tar.gz.

File metadata

  • Download URL: jupyterlab_minio-1.1.1.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jupyterlab_minio-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6bec0207e6a229c9728911fa408ef976b5f6388b42dfede3057933deafa4fff0
MD5 253b8c6ecfca44389d9d2cb1f5d6544f
BLAKE2b-256 7c1316c45f519ccf51c305afe47b2224acc73dce9fc60bc923009b94280cc408

See more details on using hashes here.

File details

Details for the file jupyterlab_minio-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_minio-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 584f4161050ad05c2d125ea3a323966636009c06bf99b1c95996c9f96742e9f2
MD5 c8aa684b288df828e8c35f9501f63e0a
BLAKE2b-256 c61622c827fa6134113a9a3ee1d3f383735adaada72634f96db1cfb5e5d44434

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