Skip to content

Allow metadata-only deposit client side

This opens a swh deposit metadata-only cli [1]

This allows the users to post to their collection a metadata-only deposit.

The users provide the atom entry metadata file with --metadata flag. This file can already contain the swhid to which we will attach the metadata. Or the user can provide the swhid though the --swhid flag (internally, we will amend the metadata file with the swhid consistently with what the server expect).

If no swhid is provided at all, the cli will raise and explain the problem.

  • [1]
Usage: swh deposit metadata-only [OPTIONS]

  Deposit metadata only upload



Options:
  --url TEXT                      (Optional) Deposit server api endpoint. By
                                  default,
                                  https://deposit.softwareheritage.org/1

  --username TEXT                 (Mandatory) User's name  [required]
  --password TEXT                 (Mandatory) User's associated password
                                  [required]

  --swhid TEXT                    SWHID
  --metadata PATH                 Path to xml metadata file  [required]
  -f, --format [logging|yaml|json]
                                  Output format results.
  -h, --help                      Show this message and exit.

Related to #2886 (closed)

Test Plan

tox


Migrated from D4737 (view on Phabricator)

Merge request reports