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

[FIX] Ensure non-agg API doesn't error out when all matches lack pipeline data #369

Merged
merged 11 commits into from
Oct 29, 2024

Conversation

alyssadai
Copy link
Contributor

@alyssadai alyssadai commented Oct 26, 2024

Changes proposed in this pull request:

  • Comments added to clarify steps in graph response reshaping
  • Add mocked non-aggregated graph response where no subjects have pipeline info
    • Add test of API response for this query result case
  • Handle NaNs for pipeline_name during graph response reshaping, to account for cases where there are no completed pipelines among matching sessions

Checklist

This section is for the PR reviewer

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see our Contributing Guidelines for more info)
  • PR has a label for the release changelog or skip-release (to be applied by maintainers only)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass
  • If the PR changes the SPARQL query template, the default Neurobagel query file has also been regenerated

For new features:

  • Tests have been added

For bug fixes:

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

@alyssadai alyssadai added the pr-bug-fix Bug fix, will increment patch version when merged (0.0.+1) label Oct 26, 2024
@coveralls
Copy link
Collaborator

coveralls commented Oct 26, 2024

Pull Request Test Coverage Report for Build 11565246440

Warning: 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

  • 29 of 29 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.1%) to 96.655%

Totals Coverage Status
Change from base Build 11522278696: 1.1%
Covered Lines: 809
Relevant Lines: 837

💛 - Coveralls

@alyssadai alyssadai marked this pull request as ready for review October 26, 2024 22:01
@alyssadai alyssadai added the release Create a release when this PR is merged label Oct 28, 2024
@surchs surchs self-requested a review October 28, 2024 19:07
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 @alyssadai for addressing this. I have a question about the test that protects against a regression here in the future. Otherwise this all looks nice

🧑‍🍳

app/api/crud.py Outdated Show resolved Hide resolved
app/api/crud.py Show resolved Hide resolved
tests/test_query.py Show resolved Hide resolved
@alyssadai alyssadai merged commit 9f18925 into main Oct 29, 2024
7 checks passed
@alyssadai alyssadai deleted the fix-api-response branch October 29, 2024 00:56
Copy link
Contributor

🚀 PR was released in v0.4.1 🚀

@neurobagel-bot neurobagel-bot bot added the released This issue/pull request has been released. label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bug-fix Bug fix, will increment patch version when merged (0.0.+1) release Create a release when this PR is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-agg API response can't handle matching subjects lacking pipeline data
3 participants