Skip to article frontmatterSkip to article content

Notebooks in MECA

Authors
Affiliations
Curvenote Inc
Posit Software PBC
Posit Software PBC
National Center for Biotechnology Information, National Library of Medicine, National Institutes of Health, Bethesda, MD 20894, USA.
Michael J. Fox Foundation

The goal of this article is to recommend community standards for including Notebooks in MECA files. This is intended to be complementary to our proposal regarding the inclusion of computational notebooks within JATS XML files.

MECA Overview

MECA is a National Information Standards Organization (NISO) project which outlines a common means to easily transfer manuscripts and accompanying files between manucript systems.

A MECA file is a single zip file which contains:

A manifest.xml file which describes the contents of the bundle A single manuscript as a JATS XML file A transfer.xml which includes information about the sending and receiving systems Content files (arbitrary dependency files) which must be listed in the manifest.xml There are other optional files as well, read more here

MECA and Notebooks

While JATS XML provides a standard way to encode a journal article metadata and ocntents, it does not provide a mechanism for bundling or including externally referenced files with the JATS XML file. MECA files provide a way to combine a JATS article with the files it references into a single file that be sumbitted to manuscript systems or shared with others.

We specifically envisision that MECA files which include JATS XML with notebook sub-articles will also include a native copy of the notebooks (as .ipynb files) as well as files required to restore the execution environment for a notebook (for example as a folder that can be used to restore the environment).

MECA Paths

While MECA files may include arbitrary files (as long as they are referenced from with the manifest.xml file), we propose that by convention, the following files be placed in the following paths and referenced in the manifest.xml using the following item-type.

ItemFolderitem-type
Notebook (.ipynb file)notebooksnotebook
REES compliant foldersourcesnotebook-environment

Sample MECA Zip Contents

The following table outlines the contents of a sample MECA file for an article.

File NameFile Type
123e4567-e89b-12d3-a456-426655440000-MECA.zipArchive file
manifest.xmlManifest metadata file
demoarticle.xmlArticle metadata file
demoarticle_files/fig-jats/plot.jpgFile uploaded by author
demoarticle_files/fig-jats/plto2.jpgFile uploaded by author
demoarticle.pdfSystem file
notebooks/source.ipynbNotebook file (source of plot)
notebooks/article.ipynbNotebook file (document)
source/requirements.txtREES compliant folder