Repository navigation
Prepare the legacy group-data stack for deletion (markers, warnings, gds parity) - #262
bbuchsbaum wants to merge 6 commits into
Conversation
Every function, branch and helper that exists only for the legacy group_data_csv/_h5/_nifti stack carries a LEGACY-GROUP-DELETE (next minor) marker (derived from the call graph: reachable only from the deprecated entry points), and data-raw/simplification-2026-10-plan.md has the deletion checklist. The accessors extract_csv_data(), get_rois(), get_contrasts(), read_h5_full(), read_nifti_full(), fmri_meta() on group_data_nifti and fmri_ttest() on legacy file-backed objects now emit deprecation warnings (.legacy_group_deprecated(); internal legacy reads use .legacy_group_quiet() so users see one warning). .demo_group_data() is the gds demo used by the live examples and .demo_fmri_meta(); t_to_beta_se() moved to metafuns.R so the three legacy files can be deleted whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFokJuZ18Chw2tkkMDvz4x
…ests to gds Blocks testing legacy constructors, readers, validators and legacy branches carry LEGACY-GROUP-DELETE markers; blocks testing live features (meta estimators, contrasts, print/summary, coef_image, save-by-stat, spatial FDR, fmri_ttest) now build gds group data and keep their assertions. The tidy() per-ROI test stays on legacy input (NEEDS MIGRATION: gds ROI fits are not fmri_meta_roi). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFokJuZ18Chw2tkkMDvz4x
…ests to gds ols_t_cpp()/welch_t_cpp() deprecation tests and legacy-vs-gds parity tests carry LEGACY-GROUP-DELETE markers; live tests (fit-time contrasts, ttest mc/contrasts, write_results by-stat outputs, demos, gds bridges) now build gds group data with the same assertions. One legacy-only assertion in the ttest error-gate block is marked inline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFokJuZ18Chw2tkkMDvz4x
So the legacy stack can go without losing behaviour: - fmri_meta() on gds data whose samples are not a voxel grid (ROI tables, parcels) returns an fmri_meta_roi fit (tidy() per ROI, print() reports ROIs, spatial_fdr() groups by ROI), as legacy csv fits did; - group_data(format = "csv") on a table without an ROI column treats it as one ROI, "overall" (it stopped); - summary.group_data_gds(), so summary() on gds data no longer falls through to the legacy summary.group_data(). New tests in test-simplify-2026-10-legacy-prep.R fail on master. The tidy() test in test-group_analysis.R is migrated, and test_fmri_meta_csv.R keeps its fmri_meta_roi / n_rois assertions on gds input. Group B tests: legacy-only blocks marked LEGACY-GROUP-DELETE; review-B meta-weight and estimator tests (vs t.test, lm, metafor), csv meta tests and NIfTI ttest/meta tests migrated to gds input with their assertions kept. The deletion checklist now lists the test files and blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFokJuZ18Chw2tkkMDvz4x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFokJuZ18Chw2tkkMDvz4x
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: cdf2bf25-7096-4348-b84c-fc91daacce44) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #262 +/- ##
==========================================
- Coverage 92.05% 91.92% -0.13%
==========================================
Files 86 86
Lines 16230 16281 +51
==========================================
+ Hits 14940 14967 +27
- Misses 1290 1314 +24
🚀 New features to boost your workflow:
|
tests/testthat/setup.R silences deprecations suite-wide, so nothing checked the new warnings fire. The test turns them back on for the legacy accessors, fmri_meta.group_data_nifti(), read_h5_full() and fmri_ttest() on legacy data, and checks .legacy_group_quiet() keeps internal reads silent. Marked for deletion with the stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFokJuZ18Chw2tkkMDvz4x
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: a3a5f7c0-ff56-47f7-b598-eb2b7e3a99ed) |
This prepares the deletion of the legacy
group_data_csv/_h5/_niftistack in the next minor release, without removing anything yet. When that release comes, the deletion becomes mechanical: delete every site markedLEGACY-GROUP-DELETE (next minor)(grep -rn LEGACY-GROUP-DELETE R src tests vignetteslists 60), then regenerate docs. The step-by-step checklist is indata-raw/simplification-2026-10-plan.md, section "Legacy group-data deletion checklist".Changes
Markers. Every function, branch and helper that exists only for the legacy stack is marked: 28 sites in
R/, 2 insrc/.R/group_data_{csv,h5,nifti}.R).fmri_meta.R, 6 legacygroup_datamethods,ols_t_cpp()/welch_t_cpp(), and legacy branches infmri_meta_methods.R,fmri_ttest_helpers.Randgroup_data_gds.R.list(blocks =)form andpaired_diff_block()are not legacy and stay unmarked.Deprecation warnings. Every public legacy entry point now warns:
extract_csv_data(),get_rois(),get_contrasts(),read_h5_full()andread_nifti_full();fmri_meta()ongroup_data_niftidata, andfmri_ttest()on any legacy file-backed object;fmri_metamethods.Internal legacy reads go through
.legacy_group_quiet(), so users see one warning, not several.options(fmrireg.suppress_deprecation = TRUE)silences them, as before.gds now does what the legacy CSV reader did, so deleting it loses nothing:
fmri_meta()on data whose samples aren't a voxel grid (ROI tables, parcels) returns anfmri_meta_roifit.tidy()gives one row per ROI,print()reports ROIs, andspatial_fdr()groups by ROI.group_data(format = "csv")on a table without an ROI column treats it as one ROI, "overall". It used to stop.summary.group_data_gds().summary()on gds data used to fall through to the legacy method.Demos and docs.
.demo_group_data()(gds) backs the live examples and.demo_fmri_meta()..demo_group_data_csv()is kept only for the legacy accessors' examples, and is marked.t_to_beta_se()moved toR/metafuns.R, so the three legacy files can be deleted whole.a_09vignette note is updated.Tests (37 files).
t.test/lm/metafor, the meta CSV closed forms, fmri_ttest on NIfTI, write_results by-stat outputs, contrasts, print/summary andtidy().test-simplify-2026-10-P1.Rnow expects ROI-table fits to befmri_meta_roiwithn_rois.Testing
tests/testthat/test-simplify-2026-10-legacy-prep.Rcovers the three gds behaviours above against closed-form IVW estimates. All three tests fail on master.test-review-E-cli.R, an artifact of running every file in one process; that file passes on its own. 8,622 passing.Left for the deletion PR
Follow the checklist. Every public entry point now warns, so the next minor release can delete the stack.
Generated by Claude Code
Note
Medium Risk
Changes group-analysis dispatch, fit object classes (
fmri_meta_roi), and deprecation warnings across meta/ttest paths; deletion is deferred but user-visible behavior on gds ROI tables and summary() shifts to match legacy CSV semantics.Overview
This PR prepares removal of the legacy
group_data_csv/_h5/_niftistack in the next minor release without deleting it yet. Sites slated for deletion are taggedLEGACY-GROUP-DELETE (next minor), and a full checklist lives indata-raw/simplification-2026-10-plan.md.Deprecation plumbing: New
.legacy_group_deprecated()/.legacy_group_quiet()warn on public legacy entry points (extract_csv_data(),get_rois(),get_contrasts(),read_h5_full(),read_nifti_full(),fmri_meta()ongroup_data_nifti,fmri_ttest()on file-backed legacy objects) while internal legacy reads stay quiet. NEWS documents the upcoming removals andoptions(fmrireg.suppress_deprecation).GDS parity with the old CSV reader so behavior is preserved after deletion:
fmri_meta()on non–voxel-grid samples returnsfmri_meta_roi(n_rois, per-ROItidy()/spatial_fdr()); tabulargroup_data(format = "csv")without an ROI column becomes a single "overall" ROI;summary.group_data_gds()stops dispatching to the legacysummary.group_data().Demos and tests switch live examples to
.demo_group_data()(gds);t_to_beta_se()moves toR/metafuns.R. Many tests build gds fixtures instead of legacy constructors, with newtest-simplify-2026-10-legacy-prep.Rlocking the three gds behaviors above.Reviewed by Cursor Bugbot for commit a4dfc27. Bugbot is set up for automated code reviews on this repo. Configure here.