Skip to content

Commit 70d9e73

Browse files
committed
inputs and tests
1 parent e8a04b1 commit 70d9e73

4 files changed

Lines changed: 4 additions & 29 deletions

File tree

src/rbc/cli/longitudinal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def validate_namespace(cls, ns: argparse.Namespace) -> LongitudinalArgs:
4646
def main(args: LongitudinalArgs) -> int:
4747
"""Main entrypoint of longitudinal workflow."""
4848
run(
49-
input_dirs=args.input_dirs,
49+
input_dirs=list(args.input_dirs),
5050
output_dir=args.output_dir,
5151
filters=Filters(
5252
participant_label=args.participant_label,

src/rbc/workflows/functional.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ class FunctionalLongOutputs(NamedTuple):
393393
forward_xfm: BOLD-to-longitudinal-template composite warp.
394394
sbref: Motion reference volume warped to longitudinal template space.
395395
bold: Preprocessed BOLD warped to longitudinal template space.
396-
bold_mask: Brain mask warped to longitudinal template space,
397-
or *None* if no mask was provided.
396+
bold_mask: Brain mask warped to longitudinal template space.
398397
regressed_bold: Nuisance-regressed (non-bandpassed) BOLD in longitudinal
399398
template space. Suitable for ALFF/fALFF.
400399
cleaned_bold: Nuisance-regressed + bandpass-filtered BOLD in longitudinal

tests/unit/bids/test_exports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def test_file_count_single_regressor(
202202
outputs = _make_func_outputs(workdir, ["36-parameter"])
203203
export_functional(func_bids, outputs, regressors=["36-parameter"])
204204
saved = list(pipe_ctx.output_dir.rglob("*.*"))
205-
assert len(saved) == 13
205+
assert len(saved) == 14
206206

207207
def test_file_count_two_regressors(
208208
self, func_bids: Bids, workdir: Path, pipe_ctx: RunContext
@@ -215,7 +215,7 @@ def test_file_count_two_regressors(
215215
outputs = _make_func_outputs(workdir, regs)
216216
export_functional(func_bids, outputs, regressors=regs)
217217
saved = list(pipe_ctx.output_dir.rglob("*.*"))
218-
assert len(saved) == 16
218+
assert len(saved) == 18
219219

220220

221221
# ---------------------------------------------------------------------------

tests/unit/orchestration/test_longitudinal.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -373,30 +373,6 @@ def test_missing_required_file_raises(
373373
regressors=["36-parameter"],
374374
)
375375

376-
def test_optional_bold_mask_file_not_found(
377-
self, func_df: pl.DataFrame, tpl_df: pl.DataFrame, tmp_path: Path
378-
) -> None:
379-
"""Optional bold_mask not found is caught; 3 exports emitted."""
380-
pipe_ctx = RunContext(sub="01", ses="baseline", output_dir=tmp_path)
381-
with (
382-
patch(
383-
"rbc.orchestration.longitudinal.functional_longitudinal",
384-
return_value=_mock_func_outputs(with_bold_mask=False),
385-
),
386-
patch(
387-
"rbc.bids.query.find_file",
388-
side_effect=_none_for(suffix="mask", desc="brain"),
389-
),
390-
patch("rbc.bids.builder.shutil.copy2") as mock_copy,
391-
):
392-
process_func(
393-
pipe_ctx=pipe_ctx,
394-
func_df=func_df,
395-
tpl_df=tpl_df,
396-
regressors=["36-parameter"],
397-
)
398-
assert mock_copy.call_count == 5
399-
400376

401377
class TestLongitudinalDispatch:
402378
"""Tests for run() dispatch logic (not filtering, which is in test_filters)."""

0 commit comments

Comments
 (0)