From 0efbbe95811158190a8b7244c50ff588b9d8b6a7 Mon Sep 17 00:00:00 2001 From: Noa Aviel Dove Date: Thu, 29 Aug 2024 18:18:15 -0700 Subject: [PATCH] fixup! [p] Extract `is_stitched` from manifest entries (partial #6299) --- src/humancellatlas/data/metadata/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/humancellatlas/data/metadata/api.py b/src/humancellatlas/data/metadata/api.py index 849fb8bd2..e4752f40f 100644 --- a/src/humancellatlas/data/metadata/api.py +++ b/src/humancellatlas/data/metadata/api.py @@ -18,7 +18,7 @@ chain, ) from typing import ( - AbstractSet, + Collection, Iterable, Mapping, MutableMapping, @@ -977,11 +977,11 @@ def __init__(self, manifest: MutableJSONs, metadata_files: Mapping[str, JSON], links_json: JSON, - stitched_entity_ids: AbstractSet[str] = frozenset()): + stitched_entity_ids: Collection[str] = ()): self.uuid = UUID4(uuid) self.version = version self.manifest = {m.name: m for m in map(ManifestEntry, manifest)} - self.stitched = stitched_entity_ids + self.stitched = frozenset(map(UUID4, stitched_entity_ids)) json_by_core_cls: MutableMapping[type[E], list[tuple[JSON, ManifestEntry]]] = defaultdict(list) for file_name, json in metadata_files.items(): @@ -1079,7 +1079,7 @@ def not_stitched(self, entities: Mapping[UUID, E]) -> list[E]: return [ entity for uuid, entity in entities.items() - if str(uuid) not in self.stitched + if uuid not in self.stitched ] @cached_property