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

[ENH] Implemented new endpoint to return known node APIs #29

Merged
merged 8 commits into from
Nov 17, 2023
Merged

Conversation

rmanaem
Copy link
Contributor

@rmanaem rmanaem commented Nov 16, 2023

Changes proposed in this pull request:

  • Modified the format of the NB_NODES as a string of strings to string of tuples
  • Renamed NB_NODES to LOCAL_NB_NODES
  • Refactored and renamed parse_nodes_as_list to parse_nodes_as_dict
  • Updated tests
  • Updated get function in crud.py
  • Fixed the parsing/creation of the output in get_terms function of crud.py
  • Implemented CohortQueryResponse
  • Added response_model for get_query endpoint
  • Implemented nodes router and an endpoint to return all known node APIs

Checklist

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see https://neurobagel.org/contributing/pull_requests for more info)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

@coveralls
Copy link
Collaborator

coveralls commented Nov 16, 2023

Pull Request Test Coverage Report for Build 6906358008

  • 47 of 47 (100.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 92.969%

Totals Coverage Status
Change from base Build 6893463369: 1.8%
Covered Lines: 119
Relevant Lines: 128

💛 - Coveralls

@surchs surchs self-requested a review November 16, 2023 23:33
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Thanks @rmanaem! Nice regex use! I left a couple of suggestions with clarity in mind, take a look.

I do think that we should emit warnings if the LOCAL_NB_NODES contains bad input. If that's a bigger deal to address, please make a separate issue to raise that warning so we don't forget

app/api/crud.py Show resolved Hide resolved
app/api/crud.py Outdated Show resolved Hide resolved
app/api/utility.py Outdated Show resolved Hide resolved
app/api/utility.py Outdated Show resolved Hide resolved
tests/test_utility.py Show resolved Hide resolved
tests/test_utility.py Show resolved Hide resolved
@rmanaem
Copy link
Contributor Author

rmanaem commented Nov 17, 2023

@surchs Made an issue for the warning. See #31

@rmanaem rmanaem merged commit f85c44b into main Nov 17, 2023
4 checks passed
@rmanaem rmanaem deleted the feat-26 branch November 17, 2023 17:05
@surchs
Copy link
Contributor

surchs commented Apr 11, 2024

🚀 PR was released in v0.1.0 🚀

@surchs surchs added the released This issue/pull request has been released. label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New endpoint to return known node APIs
3 participants