diff --git a/swh/loader/core/loader.py b/swh/loader/core/loader.py index 244cfaae820ae2378ad8a4f915491dd077306b8f..7cdda7978f140026e75d5c066900b38e7b79f6bf 100644 --- a/swh/loader/core/loader.py +++ b/swh/loader/core/loader.py @@ -858,9 +858,22 @@ class NodeLoader(BaseLoader, ABC): class ContentLoader(NodeLoader): - """Basic loader for edge case content ingestion. + """Basic loader for edge case ingestion of url resolving to bare 'content' file. - The output snapshot is of the form: + A visit ends up in full visit with a snapshot when the artifact is retrieved with + success, match the checksums provided and is ingested with success in the archive. + + An extid mapping entry is recorded in the extid table. The extid_type depends on the + checksums' type provided (see :class:`NodeLoader`) + + .. code: + + ExtID(extid_type='[nar|checksums]-sha256', + extid_version=self.extid_version, + target='swh:1:cnt:<content-id>', + target_type='content') + + The output snapshot has the following structure: .. code:: @@ -1091,7 +1104,35 @@ class BaseDirectoryLoader(NodeLoader): class TarballDirectoryLoader(BaseDirectoryLoader): - """TarballDirectoryLoader in charge of ingesting Directory coming from a tarball.""" + """TarballDirectoryLoader for ingestion of url resolving to a tarball. The tarball + is uncompressed and checked against its provided checksums (either standard + checksums or :class:`Nar` checksums). + + A visit ends up in full visit with a snapshot when the artifact is retrieved with + success, match the checksums provided and is ingested with success in the archive. + + An extid mapping entry is recorded in the extid table. The extid_type depends on the + checksums' type provided (see :class:`NodeLoader`) + + .. code: + + # extid_type depends on the checksums provided + ExtID(extid_type='[nar|checksums]-sha256', + extid_version=self.extid_version, + target='swh:1:dir:<directory-id>', + target_type='directory') + + The output snapshot has the following structure: + + .. code:: + + id: <bytes> + branches: + HEAD: + target_type: directory + target: <directory-id> + + """ visit_type = "tarball-directory"