Repository navigation
[Fable 5] Decompose statistics and ICLabel closeout modules - #219
Conversation
|
🤖 Specification for the >500 LOC closeout diff. Problem: functions/statistics/_core.py owned every statistics implementation behind thin same-name shims, so public modules did not own their behavior and package exports needed an import-order workaround. plugins/ICLabel/pop_prop_extended.py mixed pop/history/dialog glue, classifier and DIPFIT/PVAF numerics, activity data assembly, Matplotlib rendering, navigation, and rejection controls in one module. Issue #213 also required a final accounting of the remaining #197/#205 architecture items. Approach: statistics implementations now live in their existing same-name modules. _shared.py owns only reusable array/grid helpers and two-way ANOVA containers, and _core.py remains as a small compatibility re-export facade. ICLabel property handling is split into pop_prop_extended.py for public pop/dialog/history glue, _prop_numerics.py for classifier, DIPFIT, PVAF, spectra, and dashboard data assembly, and _prop_browser.py for Matplotlib rendering and control callbacks. .notes/implementation-notes.html maps the remaining #197/#205 items to PRs #214-#218, this PR, or an explicit non-goal rationale. Key code: pop_prop_extended now delegates rendering through build_navigable_dashboard while preserving the same history_command construction. statistics.init imports same-name modules first and then binds package callables from the modules so importing eegprep.functions.statistics.fdr does not replace statistics.fdr with the submodule object. _core.py re-exports the same symbols for older internal imports without owning implementations. Tests: focused statistics coverage verifies behavior, package callable exports after submodule imports, and _core compatibility. Focused ICLabel/viewprops coverage verifies facade helper imports, classifier/DIPFIT parsing, dashboard data assembly, GUI dashboard rendering, navigation, rejection controls, packaged help, and pop_viewprops delegation. Verification run locally: focused pytest, ruff check, ruff format --check, ty check, staged and PR-scope pre-commit, and EEGPREP_SKIP_MATLAB=1 pytest -m "not slow". |
|
Claude finished @suraj-ranganath's task in 3m 0s —— View job Code review
What I checkedStatistics decomposition
ICLabel decomposition
BlockingNone. ImportantNone. Nits
Test gapsNone blocking. The new coverage targets the two real risks of this refactor (import-order export stability and facade/delegation identity). Note: EEGLAB parity notesNone — this is a pure internal module split. Command strings, dialog specs ( Note: I could not execute |
323331f
into
feature/fable5-architecture-closeout
[Fable 5] Decompose statistics and ICLabel closeout modules
Split statistics implementations into focused same-name modules and separate ICLabel property-browser pop glue, numerics, and Matplotlib rendering ownership. Preserve public imports, command strings, GUI behavior, and close out the remaining #197/#205 mapping for the final architecture phase.
Closes #213