-
Notifications
You must be signed in to change notification settings - Fork 1
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
Dataset sample and donor endpoints #612
Conversation
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.
@ChuckKollar here is the summary of the solution change: hubmapconsortium/ingest-api#411 (comment)
src/app.py
Outdated
# If there are zero items in the list associated organs, then there are no associated | ||
# Organs and a 404 will be returned. | ||
if len(associated_samples) < 1: | ||
not_found_error("the dataset does not have any associated organs") |
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.
Should say "samples" instead of "organs" in the 404 message, also update the comment above
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.
OK!
src/app.py
Outdated
# If there are zero items in the list associated organs, then there are no associated | ||
# Organs and a 404 will be returned. | ||
if len(associated_donors) < 1: | ||
not_found_error("the dataset does not have any associated organs") |
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.
Fix error message and comment above line to say "donors".
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.
OK!
@@ -670,6 +670,44 @@ def get_associated_organs_from_dataset(neo4j_driver, dataset_uuid): | |||
|
|||
return results | |||
|
|||
def get_associated_samples_from_dataset(neo4j_driver, dataset_uuid): |
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.
Please add the comment block above the function declaration
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.
OK!
|
||
return results | ||
|
||
def get_associated_donors_from_dataset(neo4j_driver, dataset_uuid): |
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.
Please add the comment block above the function declaration
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.
OK!
Endpoint to return 'samples', 'organs', and 'donors' uuids of dataset id given.
Issue: #604