Skip to content

Optional

A platform produces data continuously: it will add files to a project already described. This block shows what happens then.

  1. Add the fourth file to the node, in names:

    depot.yaml
    - source: zenodo
    browse:
    path: [24343971]
    names: [README.md, stations.csv, mesures.csv, dictionnaire.csv]
  2. See what changes:

    Fenêtre de terminal
    madbot-cli plan depot.yaml
    = node 'Stream water quality': unchanged
    source zenodo
    + link dictionnaire.csv [24343971/dictionnaire.csv]
    = 3 data linked
    = submission 'Stream water quality': deposited (submitted)
    = 3 data in the submission
    = DOI: doi:10.82233/…
    ! 1 data selected are not in the deposit: dictionnaire.csv
    A deposit cannot be updated yet: give them a new submission, under another title.

    Two things to read:

    • only the new file is to be linked: the other three are unchanged;
    • the submission takes every data of the node (all: true), but it is already deposited: madbot cannot update a deposit made in a repository yet. The new file would go in a new submission, under another title.
  3. Apply:

    Fenêtre de terminal
    madbot-cli apply depot.yaml
    Done: 1 change, 0 failures, 0 submissions sent.
    node 'Stream water quality': 4 data read
    submission 'Stream water quality': submitted
  • A second submission: add under submissions a submission with another title, the same repository block, its metadata, and the new file as its only data:

    data:
    - source: zenodo
    names: [dictionnaire.csv]

    then apply --submit.

  • Machine-readable output: madbot-cli plan depot.yaml --json and madbot-cli apply depot.yaml --json give the same content as JSON, for a tool to read.

  • The exit status, that a script or a continuous integration pipeline can test: 0 when everything went well, 1 when an object failed (a data not read, a submission refused, an error of the API), 2 when the file or a setting is invalid, and nothing was sent. Try madbot-cli plan depot.yaml; echo $?.