A Jupyter Notebook extension which enables uploading to Zenodo from JupyterLab
A Zenodo extension for JupyterHub
This is part of a two-part extension: the lab extension (UI) and the server extension (which interfaces with Zenodo). In order to use this extension, both parts must be enabled. The following instructions should be run in your terminal.
To install the server extension:
pip install jupyterlab_zenodo
To enable the server extension:
jupyter serverextension enable --py jupyterlab_zenodo
To install the lab extension:
jupyter labextension install @chameleoncloud/jupyterlab_zenodo
You can add a series of (optional) custom features by adding lines to your
- Create a default Zenodo access token so that users don't need their own:
c.ZenodoConfig.access_token = '<your token>'
- Set up a post-upload redirect. By setting
<your-url>below, users will be redirected to that site with an added 'doi' query parameter when they successfully create a new Zenodo upload.
c.ZenodoConfig.upload_redirect_url = '<your-url>'
- Set a default Zenodo community. The below will identify all depositions published with this extension with
c.ZenodoConfig.community = '<your community>'
- Customize the internal storage database. Information about previous uploads to Zenodo on a user's server will be stored in
<database-location>in a sqlite database called
<database-name>. These default to
c.ZenodoConfig.database_location = '<database-location>'
c.ZenodoConfig.database_name = '<database_name>'
To work with the extension without publishing directly to Zenodo, use Zenodo sandbox.
Indicate that you're in a development environment and provide a default sandbox token in
c.ZenodoConfig.dev = True c.ZenodoConfig.access_token = '<your sandbox token>'
The server side of this extension comes with a set of integration tests. They can be used as follows:
- Create a Zenodo sandbox access token
- Assign the value TEST_API_TOKEN in
jupyterlab_zenodo/test_init.pyto your access token (as a string)
make testsfrom the root in your terminal
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size jupyterlab_zenodo-0.1.3.tar.gz (15.4 kB)||File type Source||Python version None||Upload date||Hashes View hashes|