Skip to content

Commit

Permalink
[r] Remove organismAgeValue term facet from service response (#2824, PR
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Sep 29, 2021
2 parents bdde3d5 + 2bd436d commit eba9a93
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 744 deletions.
744 changes: 68 additions & 676 deletions lambdas/service/openapi.json

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/azul/plugins/metadata/hca/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ def service_config(self) -> ServiceConfig:
"specimenOrgan": "contents.specimens.organ",
"specimenOrganPart": "contents.specimens.organ_part",
"organismAge": "contents.donors.organism_age",
# FIXME: Remove organismAgeValue facet
# https://github.com/DataBiosphere/azul/issues/2824
"organismAgeValue": "contents.donors.organism_age_value",
"organismAgeUnit": "contents.donors.organism_age_unit",
"organismAgeRange": "contents.donors.organism_age_range",
"preservationMethod": "contents.specimens.preservation_method",
Expand Down Expand Up @@ -303,9 +300,6 @@ def service_config(self) -> ServiceConfig:
"genusSpecies",
"organismAge",
"organismAgeUnit",
# FIXME: Remove organismAgeValue facet
# https://github.com/DataBiosphere/azul/issues/2824
"organismAgeValue",
"biologicalSex",
"sampleDisease",
"specimenDisease",
Expand Down
2 changes: 0 additions & 2 deletions src/azul/plugins/metadata/hca/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ def _donor_types(cls) -> FieldTypes:
'diseases': [null_str],
'organism_age': value_and_unit,
'organism_age_unit': null_str,
'organism_age_value': null_str,
# Prevent problem due to shadow copies on numeric ranges
'organism_age_range': pass_thru_json,
'donor_count': null_int
Expand All @@ -736,7 +735,6 @@ def _donor(self, donor: api.DonorOrganism) -> MutableJSON:
'development_stage': donor.development_stage,
'diseases': sorted(donor.diseases),
'organism_age': organism_age,
'organism_age_value': donor.organism_age,
'organism_age_unit': donor.organism_age_unit,
**(
{
Expand Down

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

1 change: 0 additions & 1 deletion test/indexer/test_hca_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,6 @@ def test_sample_with_no_donor(self):
'development_stage': 'human adult stage',
'diseases': ['normal'],
'organism_age': '62 year',
'organism_age_value': '62',
'organism_age_unit': 'year',
'organism_age_range': {
'gte': 1955232000.0,
Expand Down
10 changes: 0 additions & 10 deletions test/service/data/pfb_manifest.results.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,6 @@
"organism_age_unit": [
""
],
"organism_age_value": [
""
],
"submission_date": "2018-10-10T02:23:39.580000Z",
"update_date": "2018-10-10T02:23:42.998000Z"
},
Expand Down Expand Up @@ -769,9 +766,6 @@
"organism_age_unit": [
"year"
],
"organism_age_value": [
"38"
],
"submission_date": "2018-11-02T10:02:12.191000Z",
"update_date": "2018-11-02T10:07:39.622000Z"
},
Expand Down Expand Up @@ -5071,10 +5065,6 @@
"year",
""
],
"organism_age_value": [
"56",
""
],
"submission_date": "2021-01-01T00:00:00.000000Z",
"update_date": ""
},
Expand Down
27 changes: 2 additions & 25 deletions test/service/test_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,14 +1844,7 @@ def test_organism_age_facet(self):
'term': 'year',
'count': 1
}
],
'organismAgeValue': [
{
'term': '20',
'count': 1
}
],

]
},
# This project has multiple donor organisms
'2c4724a4-7252-409e-b008-ff5c127c7e89': {
Expand All @@ -1876,16 +1869,6 @@ def test_organism_age_facet(self):
'term': 'year',
'count': 1
}
],
'organismAgeValue': [
{
'term': '40-44',
'count': 1
},
{
'term': '55-59',
'count': 1
}
]
},
# This project has one donor but donor has no age
Expand All @@ -1901,13 +1884,7 @@ def test_organism_age_facet(self):
'term': None,
'count': 1
}
],
'organismAgeValue': [
{
'term': None,
'count': 1
}
],
]
}
}
self._assert_term_facets(test_data,
Expand Down

0 comments on commit eba9a93

Please sign in to comment.