Skip to content

Commit

Permalink
[r] Fix: Verbatim JSONL manifest issues (#6453, PR #6459)
Browse files Browse the repository at this point in the history
  • Loading branch information
achave11-ucsc committed Aug 14, 2024
2 parents f4f4375 + 7766c1d commit e1bb690
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 129 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
2 changes: 1 addition & 1 deletion src/azul/service/manifest_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ def create_file(self) -> tuple[str, Optional[str]]:
with open(path, 'w') as f:
for replica in self._all_replicas():
entry = {
'contents': replica['contents'],
'value': replica['contents'],
'type': replica['replica_type']
}
json.dump(entry, f)
Expand Down

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

14 changes: 7 additions & 7 deletions test/service/data/verbatim/hca/pfb_entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@
},
{
"links": [],
"name": "file",
"name": "links",
"ontology_reference": "",
"properties": [],
"values": {}
},
{
"links": [],
"name": "links",
"name": "project",
"ontology_reference": "",
"properties": [],
"values": {}
},
{
"links": [],
"name": "project",
"name": "sequence_file",
"ontology_reference": "",
"properties": [],
"values": {}
},
{
"links": [],
"name": "sample",
"name": "specimen_from_organism",
"ontology_reference": "",
"properties": [],
"values": {}
Expand All @@ -46,7 +46,7 @@
},
{
"id": "70d1af4a-82c8-478a-8960-e9028b3616ca",
"name": "file",
"name": "sequence_file",
"object": {
"describedBy": "https://schema.humancellatlas.org/type/file/6.5.2/sequence_file",
"file_core": {
Expand All @@ -69,7 +69,7 @@
},
{
"id": "0c5ac7c0-817e-40d4-b1b1-34c3d5cfecdb",
"name": "file",
"name": "sequence_file",
"object": {
"describedBy": "https://schema.humancellatlas.org/type/file/6.5.2/sequence_file",
"file_core": {
Expand Down Expand Up @@ -122,7 +122,7 @@
},
{
"id": "a21dc760-a500-4236-bcff-da34a0e873d2",
"name": "sample",
"name": "specimen_from_organism",
"object": {
"biomaterial_core": {
"biomaterial_id": "DID_scRSq06_pancreas",
Expand Down
Loading

0 comments on commit e1bb690

Please sign in to comment.