Skip to content
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

Merged
merged 5 commits into from
Feb 8, 2024

Conversation

ChuckKollar
Copy link
Contributor

Endpoint to return 'samples', 'organs', and 'donors' uuids of dataset id given.

Issue: #604

Copy link
Member

@yuanzhou yuanzhou left a 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_neo4j_queries.py Show resolved Hide resolved
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")
Copy link
Member

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

Copy link
Contributor Author

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")
Copy link
Member

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".

Copy link
Contributor Author

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):
Copy link
Member

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

Copy link
Contributor Author

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):
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK!

@yuanzhou yuanzhou merged commit 2241085 into dev-integrate Feb 8, 2024
2 checks passed
@yuanzhou yuanzhou deleted the dataset_sample_and_donor_endpoints branch February 12, 2024 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P Pitt dev team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants