Skip to content

Commit

Permalink
Add FIXMEs (#6778)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Jan 2, 2025
1 parent 2d7c278 commit c7db242
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/azul/indexer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ class SourceSpec(Generic[SOURCE_SPEC], metaclass=ABCMeta):
have simple unstructured names may want to use :class:`SimpleSourceSpec`.
"""

# FIXME: Improve equality and interning semantics for source ref and spec
# https://github.com/DataBiosphere/azul/issues/6778
prefix: Prefix | None

@classmethod
Expand Down Expand Up @@ -475,6 +477,9 @@ class SourceRef(SupportsLessAndGreaterThan, Generic[SOURCE_SPEC, SOURCE_REF]):
spec. There may be an instance of a subclass of this class that has the same
ID and spec as an instance of this class or another subclass of this class.
FIXME: Improve equality and interning semantics for source ref and spec
https://github.com/DataBiosphere/azul/issues/6778
Note to plugin implementers: Since the source ID can't be assumed to be
globally unique, plugins should subclass this class, even if the subclass
body is empty.
Expand All @@ -500,6 +505,9 @@ def __new__(cls: type[SOURCE_REF], *, id: str, spec: SOURCE_SPEC) -> SOURCE_REF:
Interns instances by their ID and spec. Two different sources may still
use the same ID or spec.
FIXME: Improve equality and interning semantics for source ref and spec
https://github.com/DataBiosphere/azul/issues/6778
>>> class S(SourceRef): pass
>>> a, b = SimpleSourceSpec.parse('a:/0'), SimpleSourceSpec.parse('b:/0')
Expand Down
2 changes: 2 additions & 0 deletions test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ def _wait_for_indexer():
with self._service_account_credentials:
fqids = self._get_indexed_bundles(catalog)
indexed_sources = {fqid.source for fqid in fqids}
# FIXME: Improve equality and interning semantics for source ref and spec
# https://github.com/DataBiosphere/azul/issues/6778
ma_source_ids = {s.id for s in self.managed_access_sources_by_catalog[catalog]}
public_source = one(s for s in indexed_sources if s.id not in ma_source_ids)
ma_source = only(s for s in indexed_sources if s.id in ma_source_ids)
Expand Down

0 comments on commit c7db242

Please sign in to comment.