Skip to content

Commit

Permalink
Fix: File fields size and name are inconsistently named in AnVIL (#4642
Browse files Browse the repository at this point in the history
…, PR #4833)
  • Loading branch information
achave11-ucsc committed Dec 17, 2022
2 parents 0aa860a + 50aa0e9 commit d6c531a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/azul/plugins/metadata/anvil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ def _field_mapping(self) -> MetadataPlugin._FieldMapping:
'file_id',
'data_modality',
'file_format',
'file_size',
'file_md5sum',
'reference_assembly',
'file_name',
# Not in schema
'crc32',
'sha256',
Expand All @@ -166,8 +168,6 @@ def _field_mapping(self) -> MetadataPlugin._FieldMapping:
# These field names are hard-coded in the implementation of
# the repository service/controller.
**{
'file_size': 'size',
'file_name': 'name',
# Not in schema
'version': 'fileVersion',
'uuid': 'fileId',
Expand Down
6 changes: 1 addition & 5 deletions test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def _get_one_file(self, catalog: CatalogName) -> JSON:
if config.is_hca_enabled(catalog):
file_size_facet = 'fileSize'
elif config.is_anvil_enabled(catalog):
file_size_facet = 'size'
file_size_facet = 'files.file_size'
else:
assert False, catalog
for filters in [self._fastq_filter(catalog), {}]:
Expand Down Expand Up @@ -785,10 +785,6 @@ def _check_curl_manifest(self, _catalog: CatalogName, response: bytes):

def _test_repository_files(self, catalog: str):
with self.subTest('repository_files', catalog=catalog):
# FIXME: File downloads are broken on AnVIL deployments
# https://github.com/DataBiosphere/azul/issues/4507
if config.is_anvil_enabled(catalog):
self.skipTest('File downloads are broken on AnVIL deployments')
file = self._get_one_file(catalog)
file_uuid, file_version = file['uuid'], file['version']
endpoint_url = config.service_endpoint
Expand Down

0 comments on commit d6c531a

Please sign in to comment.