-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCIA Adapter #121
TCIA Adapter #121
Conversation
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
Please find the detailed integration test report here Please find the ci env pod logs here |
tests/test_agg_mds_tcia_adapter.py
Outdated
] | ||
""" | ||
|
||
field_mappings = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need PatientID, EthnicGroup, Patient Sex and SeriesCount also in the final fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just tests. Though, I have added the fields for clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the fields. I had requested it to align with CTDS guidelines, but as long as it works reliably, I’m okay to proceed.
assert get_metadata( | ||
"tcia", "http://test/ok", filters=filters, mappings=field_mappings | ||
) == { | ||
"study_id_1": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On some level this is how the subject metadata coming out of adapter should be
{
"_guid_type": "TCIA_promethueus_subject_metadata",
"gen3_discovery": {
"tags": [
{
"name": "TCIA",
"category": "Data Source"
},
{
"name": "path:PatientSex",
"category": "gender"
},
{
"name": "path:EthnicGroup",
"category": "race"
}
],
"authz": "",
"gender": "path:PatientSex",
"commons": "",
"data_source": "TCIA",
"apollo_id": "path:PatientID",
"_unique_id": "path:StudyInstanceUID",
"subject_id": "path:StudyInstanceUID",
"year_of_birth" : datetime.datetime.now().year - path:PatientAge.replace("Y" , ""), (convert age to year of birth)
"gender" : "path:PatientSex",
"race" : "path:EthnicGroup",
"_series_count" : "path:SeriesCount",
"study_title": "path:StudyDescription",
"program_name": "path:Collection",
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just tests. From what I see it has the same structure to what you provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate that. My request was to meet the testing standards, but looking at time crunch, if it works as required, I’m fine moving forward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am as well.
tests/test_agg_mds_tcia_adapter.py
Outdated
|
||
@respx.mock | ||
def test_get_metadata_tcia(): | ||
tcia_response = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TCIA response only test for subject level metadata. For study-level metadata coming from this URL I think the mapping should be like this
{
"_guid_type": "TCIA_promethueus_study_metadata",
"gen3_discovery": {
"tags": [
{
"name": "TCIA",
"category": "Data Source"
}
],
"authz": "",
"_unique_id": "path:SeriesInstanceUID",
"commons": "",
"data_source": "TCIA",
"apollo_id": "path:PatientID",
"short_name": "path:ProtocolName",
"study_description" : "path:SeriesDescription",
"program_name": "path:Collection",
"subject_id": "path:StudyInstanceUID",
"series_number" : "path:SeriesNumber",
"image_count": "path:ImageCount",
"study_url": "path:CollectionURI",
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the part for study-level to the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding that
Please find the ci env pod logs here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done some extra changes.
tests/test_agg_mds_tcia_adapter.py
Outdated
] | ||
""" | ||
|
||
field_mappings = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just tests. Though, I have added the fields for clarification.
tests/test_agg_mds_tcia_adapter.py
Outdated
|
||
@respx.mock | ||
def test_get_metadata_tcia(): | ||
tcia_response = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added the part for study-level to the tests.
Please find the detailed integration test report here Please find the ci env pod logs here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look fine.
Please find the detailed integration test report here Please find the ci env pod logs here |
Please find the ci env pod logs here |
Please find the detailed integration test report here Please find the ci env pod logs here |
Link to JIRA ticket if there is one: PROM-168
New Features
Breaking Changes
Bug Fixes
Improvements
Dependency updates
Deployment changes