Skip to content

Fix two walkthroughs for current CanlabCore API#3

Open
torwager wants to merge 1 commit into
masterfrom
fix/walkthrough-toolbox-drift
Open

Fix two walkthroughs for current CanlabCore API#3
torwager wants to merge 1 commit into
masterfrom
fix/walkthrough-toolbox-drift

Conversation

@torwager

Copy link
Copy Markdown
Contributor

What

Two CANlab walkthroughs no longer ran end-to-end against the current CanlabCore API. Both were surfaced by the new hardened walkthrough smoke tests in canlab/CanlabCore#79.

  • canlab_help_3_voxelwise_t_test_walkthroughwrite() no longer silently overwrites an existing file. The script wrote example_t_image.nii, then re-wrote the same path with 'thresh', which now errors with "File already exists. Use 'overwrite' option to force overwrite." Pass 'overwrite' on both writes (also makes the section idempotent on re-run).
  • canlab_help_4b_3D_visualization — per-image metadata for the kragel18 dataset now lives in .metadata_table (270×6, with the Domain column), not the now-empty .dat_descrip, so metadata(1:5,:) / metadata.Domain threw an out-of-bounds error. Read from .metadata_table.

Verification

Both walkthroughs run clean through the CanlabCore harness (10/10 walkthrough tests pass) after these changes + refreshing the bundled snapshots in #79.

🤖 Generated with Claude Code

Surfaced by the hardened CanlabCore walkthrough smoke tests:

- canlab_help_3_voxelwise_t_test_walkthrough: write() no longer silently
  overwrites an existing file. The script wrote example_t_image.nii then
  re-wrote the same path with 'thresh', which now errors. Pass 'overwrite'
  on both writes so the section is also idempotent on re-run.
- canlab_help_4b_3D_visualization: per-image metadata for the kragel18
  dataset now lives in .metadata_table, not the (now-empty) .dat_descrip,
  so metadata(1:5,:) / metadata.Domain failed. Read from .metadata_table.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.

1 participant