Experiment sharing and publishing

See the prerequisite and be sure to be familiar with

Experiments may be published at any point of their lifecyle. They may first be registered in the cakes repository serving as a way to record experiments and the changes made to them. They may later be posted and synchronised with the web site, but not necessarily made accessible through a published link. Then they may be made visible on the web site and the results (in fact the full repository content) may be published in a bona fide research data repository: we provide the example for doing this on zenodo.

Sharing experiments in the cakes repository

You will need an account from the cakes git repository. Then you need to ask for the creation of the ${LABEL} repository. Both can be achieved by sending an email to or

Then perform from your git directory:

$ git remote add origin${LABEL}.git
$ git branch --set-upstream-to=origin/master master
$ git push --all
$ git push --tags
alternatively you can clone the empty ${LABEL}.git repo (with ssh, not https) and add your stuff in it.

This can, and preferably should, be done early (as early as the design stage). This could play the role of preregistration. In this case, it is useful to push and tag the changes at all steps during design.

Publishing experiments on the web site

The generated html file can be made available online. The experiment should be found under${LABEL} as soon as you registered it in the cakes repository.

For that reason, it is good that the notebook provides direct access to the various resources: and, input, result and the zip files containing all this.

To have it indexed on the index, ask for it as the same address as above.

The page can still be updated from the git repository, for instance, for adding within the notebook image a link to the results when published on or Zenodo.

Creating a clean zip archive

It may be useful, for archiving on various places to create a minimal zip archive, containing all results, but only files of interest. This can be obtained in the following way:

$ git submodule deinit --all              # beware that there is no stuff there (compile results)
$ git reflog expire --all --expire=now    # next instructions to reduce the size of the zip
$ git gc --prune=now --aggressive
$ cd ..
$ zip -r -q ${LABEL}.zip ${LABEL}/        # Takes the .git as well
This file may be generated after metadata for submitting to zenodo. This is the archive that can be published in zenodo (preferred) or

Instructions to publish results on Zenodo

In order to record an experiment under Zenodo, you first need to create a zenodo account. All the process can be achieved through the website, we describe the command line approach.

Generate the metadata needed by zenodo:

$ bash lazylav/scripts/
This generates a metadata.json file that can be edited if needed.

Create the zip file as above will generate a ${LABEL}.zip (and move you to the parent directory).

Get a zenodo token from this link and assign it to a variable (also set a variable for the zenodo server; may be used for testing):

$ TOKEN=<paste_your_token_here>

Declare a new deposition:

$ DEP=$(curl -H "Content-Type: application/json" -X POST --data @${LABEL}/metadata.json "https://${ZENSERV}/api/deposit/depositions?access_token=${TOKEN}")

Extract ID and BUCKET link from the returned JSon (uses jq; can also be done manually):

$ ID=$(echo "${DEP}" | jq --raw-output .id)
$ BUCKET=$(echo "${DEP}" | jq --raw-output .links.bucket)

Upload the zip file:

$ curl --upload-file ${LABEL}.zip -X PUT "${BUCKET}/${LABEL}.zip?access_token=${TOKEN}"

Publish the deposition:

$ curl -i -X POST "https://${ZENSERV}/api/deposit/depositions/${ID}/actions/publish?access_token=${TOKEN}"
It should be made available at the 10.5281/zenodo.${ID} DOI.

It is possible to modify the experiment description just after creating the deposit to include the DOI in them. This is achieved in markdown by (replace ${ID} by its value):

which will be displayed as: DOI:10.5281/zenodo.${ID}

It is also possible to upload new versions of depositions.