Skip to content

systemslab notebook push ​

Description Upload a markdown file as a notebook, creating or updating it.
Usage systemslab notebook push [OPTIONS] <FILE>

Description ​

The systemslab notebook push command uploads a markdown file with YAML front matter. If the front matter has an id (as files from systemslab notebook pull do), that notebook is updated. Otherwise a new notebook is created. To create one, start the file with just a title:

markdown
---
title: Allocator results
---

The [baseline](/experiment/0192f4e0-0000-7100-8000-000000000002) was 18%
slower.

The front matter may also set one of context: <id> or experiment: <id> (bare UUIDs) to give the notebook a default context or experiment, which charts and KPI tables that don't name their own use. Pushing a file whose id doesn't match an existing notebook fails.

Updates fail if the notebook has changed on the server since the revision in the front matter, so you can't overwrite someone else's changes; there is no option to force an overwrite. If that happens, pull the notebook again (to a different file if you want to keep your edits), reapply your changes, and push again. If the notebook already matches the file (e.g. an earlier push was saved but its response was lost), the push succeeds.

After a successful push the file is rewritten with the notebook as the server stores it: the front matter gets the new id and revision, and charts get id= attributes. Pass --no-rewrite to leave the file alone; its revision is then out of date, so pull before pushing it again. The command prints the notebook's URL, or just its id with --output-format short.

Before creating a notebook, push adds a create_key to the front matter. If the push fails partway (e.g. the connection drops), pushing the file again returns the notebook that was created instead of making another, with any changes made to the file since applied to it. --no-rewrite can only create a notebook if the file already has a create_key, since it can't save one.

Options ​

OptionDefaultDescription
<FILE>The markdown file to upload, with YAML front matter.
-m, --message <MESSAGE>A description of the change, recorded in the notebook's history.
--no-rewriteDon't rewrite the file with the server's copy after pushing.

Common Options ​

OptionDefaultDescription
--systemslab-url The URL at which to access the systemslab server.
--colorauto Controls when color is used in the output. Possible values are auto, always, and never.
--output-formatlong Output format to use when outputting messages. long will result output designed to be human-readable while short is short output meant to be used within scripts.

Environment Variables ​

VariableDescription
SYSTEMSLAB_URLSpecify the URL used to contact the SystemsLab server. Equivalent to --systemslab-url.