Warning

This page is incomplete as we have not nailed down all metadata fields yet.

Tracking metadata#

Every submission in Code Shelf must contain some tracking metadata. This allows users to find out where a notebook or script came from and who to contact in case of problems.

Attention

It is up to the users to not remove or manipulate the metadata unduly.

Metadata fields#

Some fields have to be filled in manually. E.g.

  • authors (name and email)

  • version

Other fields are set automatically when code is deployed. E.g.

  • commit

  • hash

  • shelf_url

The latter are usually empty of missing for files in a Code Shelf repository. But the former must be provided whenever a file is submitted or updated.

Metadata storage#

In Jupyter notebooks, tracking metadata is stored in a special "dmsc_tracking" object in the "metadata" object of the notebooks JSON. In scripts, tracking metadata is stored using inline script metadata in a [tool.dmsc_tracking] table.

In both cases, you can view the metadata directly by opening the file in a text editor. Or you can use

pixi run shelf show path/to/file.ipynb

However, the latter requires you to be in a Code Shelf repository.