Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/loader.py
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
@attr.s | @attr.s | ||||
class RawExtrinsicMetadataCore: | class RawExtrinsicMetadataCore: | ||||
"""Contains the core of the metadata extracted by a loader, that will be | """Contains the core of the metadata extracted by a loader, that will be | ||||
used to build a full RawExtrinsicMetadata object by adding object identifier, | used to build a full RawExtrinsicMetadata object by adding object identifier, | ||||
context, and provenance information.""" | context, and provenance information.""" | ||||
format = attr.ib(type=str) | format = attr.ib(type=str) | ||||
metadata = attr.ib(type=bytes) | metadata = attr.ib(type=bytes) | ||||
discovery_date = attr.ib(type=Optional[datetime.datetime]) | discovery_date = attr.ib(type=Optional[datetime.datetime], default=None) | ||||
"""Defaults to the visit date.""" | """Defaults to the visit date.""" | ||||
@attr.s | @attr.s | ||||
class BasePackageInfo: | class BasePackageInfo: | ||||
"""Compute the primary key for a dict using the id_keys as primary key | """Compute the primary key for a dict using the id_keys as primary key | ||||
composite. | composite. | ||||
▲ Show 20 Lines • Show All 674 Lines • Show Last 20 Lines |