From a1d20ed06300dff72f3824139d5715bb6e2d5782 Mon Sep 17 00:00:00 2001 From: Noah Dove Date: Tue, 13 Dec 2022 15:45:53 -0800 Subject: [PATCH] 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 2f376fd31..5af953fa0 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 = 'file_size' else: assert False, catalog for filters in [self._fastq_filter(catalog), {}]: