EGU23-9235
https://doi.org/10.5194/egusphere-egu23-9235
EGU General Assembly 2023
© Author(s) 2023. This work is distributed under
the Creative Commons Attribution 4.0 License.

Long-term Reproducibility for Jupyter Notebook

Claudio D'Onofrio1, Karolina Pantazatou1, Ute Karstens1, Margareta Hellström1, Ida Storm1, and Alex Vermeulen2
Claudio D'Onofrio et al.
  • 1ICOS Carbon Portal, Lund University, Lund, Sweden (claudio.donofrio@nateko.lu.se)
  • 2ICOS ERIC - Carbon Portal, Lund University, Lund, Sweden (claudio.donofrio@nateko.lu.se)

Computational notebooks (e.g. Jupyter notebook) are a popular choice for interactive scientific computing to convey descriptive information together with executable source code. The user can annotate the scientific development of the work, the methods applied, describe ancillary data or the analysis of results, with text, illustrations, figures, and equations. Such ‘executable’ documents provide a paradigm shift in scientific writing, where not only the science is described, but the actual computation and source code are openly available and can be reproduced and validated.

Therefore, it is of paramount importance to preserve these documents. A unique and persistent identification (PID) is essential together with providing enough information to execute the source code. Generating a PID for a Jupyter notebook is not technically challenging. We can automatically collect system and run-time information and, with a guided workflow for the user, assemble a rich set of metadata. The collected information allows us to recreate the computational environment and run the source code, which in return (theoretically) should produce the same results as published.

The importance of providing a rich set of metadata for all digital objects in a human readable and machine actionable form is well understood and widely accepted as necessity for reproducibility, traceability, and provenance. This is reflected in the FAIR principles (Wilkinson, https://doi.org/10.1038/sdata.2016.18) which are regarded as gold standard by many scientific communities.

Pimentel et al. (https://doi.org/10.1109/MSR.2019.00077) analysed over 800’000 Jupyter notebooks from GitHub. 24 % executed without errors and only 4 % produced the same results. The likelihood to successfully compile and run a decade old source code is slim. Long term support for well established operating systems varies between 5 to 10 years, user software support is usually shorter and looking at free and open-source repositories there is often no support (or best effort) offered.

We present an approach to safely reproduce the computational environment in the future with a focus on long-term availability. Instead of trying to reinstall the computational environment based on the stored metadata, we propose to archive the docker image, the user space (user installed packages) and finally the source code. Recreating the system in this way is more like restoring a backup, where backup is the equivalent of an entire computer system. It does not solve all the problems but removes a great deal of complexity and uncertainty.

Though there are shortcomings in our approach, we believe our solution will lower the threshold for scientists to provide rich meta data, code and results attached to a publication that can be reproduced in the far future.

How to cite: D'Onofrio, C., Pantazatou, K., Karstens, U., Hellström, M., Storm, I., and Vermeulen, A.: Long-term Reproducibility for Jupyter Notebook, EGU General Assembly 2023, Vienna, Austria, 24–28 Apr 2023, EGU23-9235, https://doi.org/10.5194/egusphere-egu23-9235, 2023.

Supplementary materials

Supplementary material file