-
Notifications
You must be signed in to change notification settings - Fork 5
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
berkeley
: API endpoint /data_objects/study/{study_id}
not returning correct results
#689
Comments
berkeley
find_data_objects_for_study_data_objects_study__study_id__get endpoint not returning the correct results.berkeley
: API endpoint /data_objects/study/{study_id}
not returning correct results
Once #694 has been merged in, I expect this bug to also be squashed. |
On second thought, I think—even with the The endpoint code uses the |
Locally, updating the endpoint's code to use - biosamples = mdb.biosample_set.find({"part_of": study["id"]}, ["id"])
+ biosamples = mdb.biosample_set.find({"associated_studies": study["id"]}, ["id"]) Note: This is with dump |
Now that #694 has been merged in, I'll open a PR having the above code change in it. |
@sujaypatil96 @eecavanna who needs to review this? |
I merged it in without review (other than self-review) just now in the interest of time. I would still like for @sujaypatil96 to review it when he gets a chance—and he can open a ticket (or message me on Slack) in case he has concerns about its contents. It is not urgent, from my perspective. |
With the endpoint fix in place, and with the ![]() The response (when downloaded as a file via Swagger UI) is 55 KB, which (in this context) I consider to be "in the ballpark" of the 51 KB @aclum put in the issue description. For example, maybe some workflows have added more data objects. 🤷 ![]() |
Confirmed fixed in berkeley |
Describe the bug
This endpoint is returning an empty array b/c alldocs doesn't exist in berkeley
To Reproduce
Steps to reproduce the behavior:
'https://api-berkeley.microbiomedata.org/data_objects/study/nmdc%3Asty-11-33fbta56'
-H 'accept: application/json'
Expected behavior
Response json body should contain the same records as production.
Example user story template:
AS A {user|persona|system},
[INSTEAD OF {current condition}]
I EXPECTED {result}
[SO THAT {value or justification}]
[NO LATER THAN {best by date}]
Screenshots
If applicable, add screenshots to help explain your problem.
Acceptance Criteria
Response body is ~51K in size.
Example scenario-based template:
Given (some given context or precondition), when (I take this action), then (this will be the specific outcome).
Additional context
Consider adding test coverage for this endpoint.
cc @sujaypatil96 because ncbi export code also needs alldocs
The text was updated successfully, but these errors were encountered: