Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/archive/loader.py
Show All 33 Lines | def __init__(self, url: str, artifacts: Sequence[Mapping[str, Any]], | ||||
"""Loader constructor. | """Loader constructor. | ||||
For now, this is the lister's task output. | For now, this is the lister's task output. | ||||
Args: | Args: | ||||
url: Origin url | url: Origin url | ||||
artifacts: List of artifact information with keys: | artifacts: List of artifact information with keys: | ||||
**time**: last modification time as either isoformat date string | - **time**: last modification time as either isoformat date | ||||
or timestamp | string or timestamp | ||||
**url**: the artifact url to retrieve filename | |||||
**artifact's filename version**: artifact's version length | - **url**: the artifact url to retrieve filename | ||||
**length**: artifact's length | |||||
- **artifact's filename version**: artifact's version length | |||||
- **length**: artifact's length | |||||
identity_artifact_keys: Optional List of keys forming the | identity_artifact_keys: Optional List of keys forming the | ||||
"identity" of an artifact | "identity" of an artifact | ||||
""" | """ | ||||
super().__init__(url=url) | super().__init__(url=url) | ||||
self.artifacts = artifacts # assume order is enforced in the lister | self.artifacts = artifacts # assume order is enforced in the lister | ||||
if not identity_artifact_keys: | if not identity_artifact_keys: | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |