Changeset View
Changeset View
Standalone View
Standalone View
docs/persistent-identifiers.rst
Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | * when a software artifact is obtained from Software Heritage by resolving a | ||||
SWHID, it is straightforward to verify that it is exactly the intended one: | SWHID, it is straightforward to verify that it is exactly the intended one: | ||||
just compute the core identifier from the artefact itself, and check that it | just compute the core identifier from the artefact itself, and check that it | ||||
is the same as the core identifier part of the SHWID | is the same as the core identifier part of the SHWID | ||||
* the core identifier of a software artifact can be computed *before* its | * the core identifier of a software artifact can be computed *before* its | ||||
archival on Software Heritage | archival on Software Heritage | ||||
Choosing what type of SWHID to use | |||||
---------------------------------- | |||||
``swh:1:dir:`` SWHIDs are the most robust SWHIDs, as they can be recomputed from | |||||
the simplest objects (a directory structure on a filesystem), even when all | |||||
metadata is lost, without relying on the Software Heritage archive. | |||||
Therefore, we advise implementers and users to prefer this type of SWHIDs | |||||
over ``swh:1:rev:`` and ``swh:1:rel:`` to reference a source code artifacts. | |||||
However, since keeping the metadata is also important, you should add an anchor | |||||
qualifier to ``swh:1:dir:`` SWHIDs whenever possible, so the metadata stored | |||||
in the Software Heritage archive can be retrieved when needed. | |||||
This means, for example, that you should prefer | |||||
``swh:1:dir:a8eded6a2d062c998ba2dcc3dcb0ce68a4e15a58;anchor=swh:1:rel:22ece559cc7cc2364edc5e5593d63ae8bd229f9f`` | |||||
over ``swh:1:rel:22ece559cc7cc2364edc5e5593d63ae8bd229f9f``. | |||||
Resolvers | Resolvers | ||||
--------- | --------- | ||||
Software Heritage resolver | Software Heritage resolver | ||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
SWHIDs can be resolved using the Software Heritage :swh_web:`Web interface <>`. | SWHIDs can be resolved using the Software Heritage :swh_web:`Web interface <>`. | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |