Skip to content

Commit

Permalink
fixup! [p] Extract is_stitched from manifest entries (partial #6299)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Aug 30, 2024
1 parent ada3983 commit 0efbbe9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/humancellatlas/data/metadata/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
chain,
)
from typing import (
AbstractSet,
Collection,
Iterable,
Mapping,
MutableMapping,
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0efbbe9

Please sign in to comment.