Skip to content

Fix subject_selection_flag #308

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix subject_selection_flag #308

wants to merge 1 commit into from

Conversation

tientong98
Copy link
Contributor

@tientong98 tientong98 commented Jun 12, 2025

Closes #307.

@tientong98 tientong98 requested a review from Copilot June 12, 2025 17:04
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.78%. Comparing base (5a89bec) to head (c6f549d).

Files with missing lines Patch % Lines
babs/generate_bidsapp_runscript.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
- Coverage   80.83%   80.78%   -0.06%     
==========================================
  Files          16       16              
  Lines        1508     1509       +1     
  Branches      234      234              
==========================================
  Hits         1219     1219              
- Misses        181      182       +1     
  Partials      108      108              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the handling of subject selection flags in the bidsapp run script, ensuring that a dynamic flag value is used instead of a hardcoded one.

  • Replaces the hardcoded "--participant-label" in the shell template with the variable subject_selection_flag.
  • Updates the Python script to include subject_selection_flag in the template context with a default value.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
babs/templates/bidsapp_run.sh.jinja2 Uses subject_selection_flag variable instead of the hardcoded flag in the command line.
babs/generate_bidsapp_runscript.py Introduces and passes subject_selection_flag (with default value) in the generation context.
Comments suppressed due to low confidence (2)

babs/templates/bidsapp_run.sh.jinja2:69

  • Ensure that subject_selection_flag is consistently provided to avoid any scenarios where the flag might be missing at runtime.
{{ subject_selection_flag }} "${subid}"

babs/generate_bidsapp_runscript.py:62

  • [nitpick] Consider expanding the comment to document under what circumstances subject_selection_flag may be overridden, ensuring clarity for future maintainers.
subject_selection_flag = '--participant-label'  # default value

@tientong98 tientong98 requested a review from mattcieslak June 12, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$SUBJECT_SELECTION_FLAG in yaml file wasn't set correctly
2 participants