Skip to content

Commit

Permalink
Absorb renaming of AnVIL fields (#4617)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Nov 22, 2022
1 parent 274baae commit 487fb5b
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/azul/plugins/metadata/anvil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _field_mapping(self) -> MetadataPlugin._FieldMapping:
# These field names are hard-coded in the implementation of
# the repository service/controller.
**{
'byte_size': 'size',
'file_size': 'size',
# Not in schema
'version': 'fileVersion',
'uuid': 'fileId',
Expand Down
4 changes: 2 additions & 2 deletions src/azul/plugins/metadata/anvil/indexer/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _file_types(cls) -> FieldTypes:
'file_id': null_str,
'data_modality': [null_str],
'file_format': null_str,
'byte_size': null_int,
'file_size': null_int,
'reference_assembly': [null_str],
# Not in schema
'version': null_str,
Expand Down Expand Up @@ -343,7 +343,7 @@ def _file(self, manifest_entry: JSON) -> MutableJSON:
metadata = self.bundle.metadata_files[manifest_entry['name']]
return self._entity(manifest_entry,
self._file_types(),
size=metadata['byte_size'])
size=metadata['file_size'])

def _only_dataset(self) -> MutableJSON:
return self._dataset(self._entries_by_entity_id[one(self._entities_by_type['dataset'])])
Expand Down
2 changes: 1 addition & 1 deletion src/azul/plugins/repository/tdr_anvil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def convert_column(value):
'file_id',
'data_modality',
'file_format',
'byte_size',
'file_size',
'reference_assembly',
'file_ref',
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 40 additions & 40 deletions test/indexer/data/3fdc952d-7eec-a8d9-be70-876aa4377a53.results.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 487fb5b

Please sign in to comment.