Skip to content

Commit

Permalink
[r] Replace snapshot and remove workaround (#5229)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Jun 15, 2023
1 parent 5f6eaf0 commit d448944
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deployments/anvilprod/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def mkdict(previous_catalog: dict[str, str],


anvil_sources = mkdict({}, 3, mkdelta([
mksrc('datarepo-dev-43738c90', 'ANVIL_1000G_2019_Dev_20230302_ANV5_202303032342', 22814),
mksrc('datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
]))
Expand Down
15 changes: 7 additions & 8 deletions test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
service_account,
)
from more_itertools import (
always_iterable,
first,
grouper,
one,
Expand Down Expand Up @@ -981,16 +982,14 @@ def _get_indexed_bundles(self,
version=bundle['bundleVersion']
)
if config.is_anvil_enabled(catalog):
# Biosamples are used as bundle entities for primary bundles
# and are never present in supplementary bundles.
# We cannot use the `files.is_supplementary` field to
# determine whether a bundle is supplementary or not due to
# false positives in the current snapshots
# (https://github.com/DataBiosphere/azul/issues/5229)
is_supplementary = one(set.union(*(
set(always_iterable(file['is_supplementary']))
for file in hit['files']
)))
bundle_fqid['entity_type'] = (
BundleEntityType.primary.value
if hit['biosamples'] else
BundleEntityType.supplementary.value
if is_supplementary else
BundleEntityType.primary.value
)
bundle_fqid = self.repository_plugin(catalog).resolve_bundle(bundle_fqid)
indexed_fqids.add(bundle_fqid)
Expand Down

0 comments on commit d448944

Please sign in to comment.