Skip to content

CS-SI/eodag-labextension

Repository files navigation

eodag-labextension

JupyterLab extension used to search remote sensed imagery from various image providers.

This extension is composed of to parts:

  • a React client plugin adding a tab into Jupyter Lab left panel,
  • a Python Jupyter notebook REST service consumed by the client and served at /eodag/ or /user/<username>/eodag/ for JupyterHub (a home page is available at that URL).

The products search is based on the eodag library.

Setup

pip install .
jupyter labextension install .

Configuration

eodag configuration file should be localized at .config/eodag/eodag.yaml (see eodag documentation). Make sure that that file is configured properly.

Run

jupyter lab
# or
jupyterhub

and browse http://localhost:8888 or http://localhost:8000.

Adjust port number.

Contributing

npm install -g configurable-http-proxy

virtualenv -p `which python3.6` venv
venv/bin/activate
pip install -e .[dev]

# Enables extension: required if package installed in editable mode!
# --sys-prefix required if running into virtual env
jupyter serverextension enable --py eodag_labextension --sys-prefix

pre-commit install

# Into first terminal
jlpm run watch
# Into second terminal
jupyter lab --watch --no-browser --ip=0.0.0.0

then browse http://localhost:8888

Alternatively, plugin can be tested with JupyterHub with command jupyterhub at URL http://localhost:8000.

Troubleshooting

On jupyterhub version upgrade and if jupyterhub command fails, it can be required to do a jupyterhub upgrade-db.

On build error, try running npm prune && npm run clean && npm install.

Known issues

At statup, console prints a warning: Failed to fetch package metadata for 'eodag-labextension': <HTTPError 404: 'Not Found'>. This is because extension is not deployed on npm registry (see source).

Reference

Distributing Jupyter Extensions as Python Packages

Copyright 2020 CS GROUP - France All rights reserved