Skip to content
Snippets Groups Projects
Verified Commit e8599390 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

Improve core loader docstring to explicit the extid mapping

Currently, those impacted loaders are only used through the nixguix stack but they are
not specific to nixguix.

Refs. swh/devel/swh-loader-core#4749
parent e064fa63
No related branches found
No related tags found
No related merge requests found
Pipeline #7364 passed
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment