Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/interface.py
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | def directory_get(self, ids: Iterable[Sha1Git]) -> Dict[Sha1Git, datetime]: | ||||
"""Retrieve the associated date for each directory sha1 in `ids`. If some | """Retrieve the associated date for each directory sha1 in `ids`. If some | ||||
directory has no associated date, it is not present in the resulting dictionary. | directory has no associated date, it is not present in the resulting dictionary. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("entity_get_all") | @remote_api_endpoint("entity_get_all") | ||||
def entity_get_all(self, entity: EntityType) -> Set[Sha1Git]: | def entity_get_all(self, entity: EntityType) -> Set[Sha1Git]: | ||||
"""Retrieve all sha1 ids for entities of type `entity` present in the provenance | """Retrieve all sha1 ids for entities of type `entity` present in the provenance | ||||
model. | model. This method is used only in tests. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("location_get") | @remote_api_endpoint("location_get") | ||||
def location_get(self) -> Set[bytes]: | def location_get(self) -> Set[bytes]: | ||||
"""Retrieve all paths present in the provenance model.""" | """Retrieve all paths present in the provenance model. | ||||
This method is used only in tests.""" | |||||
... | ... | ||||
@remote_api_endpoint("origin_set_url") | @remote_api_endpoint("origin_set_url") | ||||
def origin_set_url(self, urls: Dict[Sha1Git, str]) -> bool: | def origin_set_url(self, urls: Dict[Sha1Git, str]) -> bool: | ||||
"""Associate urls to origins identified by sha1 ids, as paired in `urls`. Return | """Associate urls to origins identified by sha1 ids, as paired in `urls`. Return | ||||
a boolean stating whether the information was successfully stored. | a boolean stating whether the information was successfully stored. | ||||
""" | """ | ||||
... | ... | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | ) -> Set[RelationData]: | ||||
identified by some sha1 id in `ids`. If `reverse` is set, destination entities | identified by some sha1 id in `ids`. If `reverse` is set, destination entities | ||||
are matched instead. | are matched instead. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("relation_get_all") | @remote_api_endpoint("relation_get_all") | ||||
def relation_get_all(self, relation: RelationType) -> Set[RelationData]: | def relation_get_all(self, relation: RelationType) -> Set[RelationData]: | ||||
"""Retrieve all entries in the selected `relation` that are present in the | """Retrieve all entries in the selected `relation` that are present in the | ||||
provenance model. | provenance model. This method is used only in tests. | ||||
""" | """ | ||||
... | ... | ||||
@remote_api_endpoint("with_path") | @remote_api_endpoint("with_path") | ||||
def with_path(self) -> bool: | def with_path(self) -> bool: | ||||
... | ... | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |