Skip to content

[TST] Add missing attribute options to mocked responses - #855

Open
rmanaem wants to merge 1 commit into
mainfrom
maint-854
Open

[TST] Add missing attribute options to mocked responses#855
rmanaem wants to merge 1 commit into
mainfrom
maint-854

Conversation

@rmanaem

@rmanaem rmanaem commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request:

  • Add missing diagnosis (Healthy Control, ADHD) and assessment (MoCA, UPDRS) options to mocked responses
  • Update imaging modality mock labels to match federate API labels
  • Update ResultsTSV test assertions to match updated modality mock labels

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 participant-level and/or the dataset-level result file, the query-tool-results files in the neurobagel_examples repo have 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.

Summary by Sourcery

Keep mocked option responses and ResultsTSV tests consistent with the federate API’s available attributes and imaging terminology.

Enhancements:

  • Expand mocked diagnosis and assessment option responses with Healthy Control, ADHD, MoCA, and UPDRS terms.
  • Align mocked imaging modality labels and abbreviations with the federate API.

Tests:

  • Update ResultsTSV end-to-end assertions for the standardized imaging modality labels.

- Add missing diagnosis (Healthy Control, ADHD) and assessment (MoCA, UPDRS) options to mocked responses
- Update imaging modality mock labels to match federate API labels
- Update ResultsTSV test assertions to match updated modality mock labels
@rmanaem rmanaem added the pr-internal Non-user-facing code improvement, will increment patch version when merged (0.0.+1) label Sep 4, 2026
@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for neurobagel-query ready!

Name Link
🔨 Latest commit 443307e
🔍 Latest deploy log https://app.netlify.com/projects/neurobagel-query/deploys/6a9aea86be70da0008d7cb27
😎 Deploy Preview https://deploy-preview-855--neurobagel-query.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sourcery-ai

sourcery-ai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Reviewer's Guide

This test-focused PR expands mocked diagnosis and assessment options, synchronizes imaging modality labels and abbreviations with the federate API, and updates ResultsTSV assertions to reflect the new mock output.

File-Level Changes

Change Details Files
Expand mocked option fixtures to cover additional diagnosis and assessment terms.
  • Add Healthy Control and ADHD diagnosis nodes.
  • Add MoCA and UPDRS assessment-tool nodes.
cypress/fixtures/mocked-responses.ts
Align mocked imaging modality labels and abbreviations with federate API terminology.
  • Rename T1, T2, and functional MRI labels to API-standard image names.
  • Change the functional modality abbreviation from fMRI to bold.
cypress/fixtures/mocked-responses.ts
Update TSV end-to-end expectations for the revised imaging modality labels.
  • Assert the new BOLD and T2-weighted labels in phenotypic and imaging session output.
cypress/e2e/ResultsTSV.cy.ts

Assessment against linked issues

Issue Objective Addressed Explanation
#854 Add the missing Healthy Control and ADHD diagnosis terms, and MoCA and UPDRS assessment terms, to the mocked attribute responses used by UpdateExamples.
#854 Align the mocked imaging modality labels with API conventions: Blood-Oxygen-Level Dependent image, T1-weighted image, and T2-weighted image.
#854 Update ResultsTSV test assertions to expect the corrected imaging modality labels.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-internal Non-user-facing code improvement, will increment patch version when merged (0.0.+1)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix missing attribute labels in example TSV files generated by UpdateExamples e2e test

1 participant