From 6dbfdd52e47db5fd2bf90ebd995956c0fddada91 Mon Sep 17 00:00:00 2001 From: Noah Dove Date: Thu, 15 Dec 2022 18:07:05 -0800 Subject: [PATCH 1/2] Re-enable repository files test for AnVIL catalogs (#4507) --- test/integration_test.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/integration_test.py b/test/integration_test.py index 2f376fd31..5eb028476 100644 --- a/test/integration_test.py +++ b/test/integration_test.py @@ -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 From 50aa0e9b948ef332b8478ccf7e28f652e4f913b7 Mon Sep 17 00:00:00 2001 From: Noah Dove Date: Tue, 13 Dec 2022 15:45:53 -0800 Subject: [PATCH 2/2] Fix: AnVIL field size is inconsistently named (#4642) --- src/azul/plugins/metadata/anvil/__init__.py | 4 ++-- test/integration_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/azul/plugins/metadata/anvil/__init__.py b/src/azul/plugins/metadata/anvil/__init__.py index 65deb134a..9e26d3f08 100644 --- a/src/azul/plugins/metadata/anvil/__init__.py +++ b/src/azul/plugins/metadata/anvil/__init__.py @@ -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', @@ -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', diff --git a/test/integration_test.py b/test/integration_test.py index 5eb028476..2aa3fb541 100644 --- a/test/integration_test.py +++ b/test/integration_test.py @@ -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), {}]: