Jupyter Notebooks
LABDRIVE is integrated with Jupyter Notebooks. Jupyter notebooks are documents that containing an ordered list of input/output cells which can contain code (Python usually, but other languages can be used), text (using Markdown), mathematics, plots and rich media, that can be executed step by step or in full, in a very easy to use environment, in a LABDRIVE-integrated computational environment.
The source code used to create, read and analyze scientific and research data is usually created by the researchers as Jupyter notebooks, and must also be preserved, along with the datasets. It is usually the best existing Provenance and Structure metadata for the dataset.
LABDRIVE allows users to keep the Jupyter notebooks in which they have the code that reads and "understands" their data as part of the dataset they are creating.
Before using the Jupyter notebooks feature, make sure that your user has an active API key and S3 credentials already generated. If not, a 403 Forbidden error will be shown while trying to access a notebook.
Create a new digital notebook
When in the Explore Content tab of a Data container, right-click over an empty space in the files area. Select New and then Dynamic Notebook, to create a new notebook.

Upload an existing Jupyter notebook
You can upload any existing Jupyter notebook like any other file, using a file transfer protocol or simply dragging and dropping your file to the LABDRIVE Data Container.
Open an existing Jupyter notebook
To open a Jupyter Notebook, double click the notebook icon you would like to open.
How to use them
You can use your Jupyter Notebooks in the same way you would use them in any other platform but, if you plan to work with the data you have in a LABDRIVE container, we have created a Python library that simplifies many actions and makes your programming easier.
For example, lets say you would like to create a function that hashes your files with a new algorithm you would like to use.
First, you should initialize your function, loading the LIBNOVA LABDRIVE libraries:
If your function is going to be called from a LABDRIVE Function, you will receive some parameters from LABDRIVE every time your function is called, but if you plan to use it inside a Jupyter notebook, you should initialize it by your own:
Every function executes in relation to a (Execution) Job, that is really useful for logging the execution progress. You should initialize it with:
And you can log to it using:
The JobMessage.JobMessageType defines the type of message. You can see a list of the available types here.
And then, you would usually have your payload. In this example:
And finally, we must let LABDRIVE that our function has finished, with the result status:
The full code sample:
Last updated
Was this helpful?

