-
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
[ENH] Added root endpoint with welcome message and API docs link #286
Conversation
Signed-off-by: samadpls <[email protected]>
Signed-off-by: samadpls <[email protected]>
Pull Request Test Coverage Report for Build 8371746917Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Signed-off-by: samadpls <[email protected]>
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 @samadpls for taking this on, this looks good to me. I'd wait for @alyssadai to take a look at my question, but after that I think we'd be good to merge 🧑🍳
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.
Hey @samadpls, thanks again for addressing this! The welcome message looks great and the link seems to work as expected.
Do you want to take a stab at adding a basic test for the new root endpoint response so that our code coverage check passes? https://github.com/neurobagel/api/blob/main/tests/test_app_events.py might be a good place for it for now, and you can use something like
Lines 32 to 42 in 87a0373
@pytest.mark.parametrize( | |
"invalid_data_element_URI", | |
["apple", "some_thing:cool"], | |
) | |
def test_get_terms_invalid_data_element_URI( | |
test_app, invalid_data_element_URI | |
): | |
"""Given an invalid data element URI, returns a 422 status code as the validation of the data element URI fails.""" | |
response = test_app.get(f"/attributes/{invalid_data_element_URI}") | |
assert response.status_code == 422 |
/
contains some part of the welcome message you would expect, and maybe a successful status code).
Let me know if you have any questions!
Signed-off-by: samadpls <[email protected]>
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 @samadpls for the test!
The tests are currently failing on the PR (see https://github.com/neurobagel/api/actions/runs/8363565151/job/22896810427?pr=286#step:6:107), I've suggested an addition below that should fix the problem.
Once the fix is applied, this should be good to merge.
Co-authored-by: Alyssa Dai <[email protected]>
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.
Looks good to me!
🚀 PR was released in |
Changes proposed in this pull request:
Checklist
[ENH]
,[FIX]
,[REF]
,[TST]
,[CI]
,[MNT]
,[INF]
,[MODEL]
,[DOC]
) (see https://neurobagel.org/contributing/pull_requests for more info)skip-release
(to be applied by maintainers only)Closes #XXXX
For new features:
For bug fixes: