Skip to content

Commit

Permalink
[r] Use DCP2 schema name for HCA replica_type (#6453)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc authored and achave11-ucsc committed Aug 7, 2024
1 parent 5912057 commit 770590e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/azul/plugins/metadata/hca/indexer/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ class BaseTransformer(Transformer, metaclass=ABCMeta):
api_bundle: api.Bundle

def replica_type(self, entity: EntityReference) -> str:
assert entity.entity_type == self.entity_type(), entity
return entity.entity_type.removesuffix('s')
api_entity = self.api_bundle.entities[UUID(entity.entity_id)]
return api_entity.schema_name

@classmethod
def aggregator(cls, entity_type: EntityType) -> Optional[EntityAggregator]:
Expand Down

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

6 changes: 3 additions & 3 deletions test/service/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1340,9 +1340,9 @@ def test_verbatim_jsonl_manifest(self):
('links', 'links.json'),
('cell_suspension', 'cell_suspension_0.json'),
('project', 'project_0.json'),
('file', 'sequence_file_0.json'),
('file', 'sequence_file_1.json'),
('sample', 'specimen_from_organism_0.json')
('sequence_file', 'sequence_file_0.json'),
('sequence_file', 'sequence_file_1.json'),
('specimen_from_organism', 'specimen_from_organism_0.json')
]
]
response = self._get_manifest(ManifestFormat.verbatim_jsonl, {})
Expand Down

0 comments on commit 770590e

Please sign in to comment.