HomeSoftware Heritage

swh.deposit.parsers: Ensure SWHIDs with context are valid

Description

swh.deposit.parsers: Ensure SWHIDs with context are valid

If not, those errors are caught early enough so the deposit users are notified
and can fix those.

This further checks the SWHIDs with qualifiers entries. Typically, ensuring the
"anchor" and "visit" SWHIDs if provided are valid according to the documentation
[1]

  • "visit" is a snapshot core swhid (if any)
  • "anchor" is a core swhid of leaf node (either directory, a revision, a release or a snapshot)

[1] https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#qualifiers

Related to T2537