Skip to content

Commit

Permalink
[r] Replace snapshot and remove workaround (#5229, PR #5313)
Browse files Browse the repository at this point in the history
  • Loading branch information
achave11-ucsc committed Jun 21, 2023
2 parents 37bcbc2 + efdec9f commit f1330a3
Show file tree
Hide file tree
Showing 2 changed files with 10 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
17 changes: 9 additions & 8 deletions test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TextIOWrapper,
)
from itertools import (
chain,
starmap,
)
import json
Expand Down Expand Up @@ -71,9 +72,11 @@
service_account,
)
from more_itertools import (
always_iterable,
first,
grouper,
one,
only,
)
from openapi_spec_validator import (
validate_spec,
Expand Down Expand Up @@ -985,16 +988,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 = only(set(chain.from_iterable(
always_iterable(file['is_supplementary'])
for file in hit['files']
)), default=False)
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 f1330a3

Please sign in to comment.