Repository navigation
Description
π€ Auto-generated from the thermo-nuclear whole-codebase code-quality review at commit 8ba958e (tip of PR #190). Part of the Fable 5 Findings epic #193.
Rationale
EEGPrep must install and run standalone and be a delight for researchers arriving from EEGLAB. This phase collects the distribution-hygiene and polish items: developer/parity tooling shipped inside the runtime wheel, runtime code that reaches outside the package (vendored-EEGLAB import at load, __file__-walking for resources), a mandatory dependency that is never imported, docs/badges/CI that point at things that do not exist, and genuinely dead code / unused params / over-protective guards.
How to approach
Fixes are low-risk and high-signal for first impressions: move dev tools to tools/, resolve resources via importlib.resources, reconcile pyproject/docs with what the code actually imports, fix the README badge and CI branch triggers, and delete dead helpers. None block correctness, but together they decide whether pip install eegprep and the first hour with the docs feel trustworthy.
Findings in this phase (18)
Every item below was confirmed by an independent adversarial verification pass against the working tree. Check items off as they land. Full per-finding detail (with verifier notes and full evidence) is in THERMO_NUCLEAR_REVIEW.md on the review branch.
1. _selected_string takes an unused withindex parameter
-
functions/popfunc/pop_chansel.py(lines 139-145)- Why: _selected_string(values, withindex) never references
withindexin its body (it only quotes labels that contain spaces). Both call sites (l.42, 70) pass withindex_value, implying it changes output, but it does not. - Failure mode: A maintainer adding 'with index' formatting will assume the parameter is wired and may edit call sites expecting an effect; readers can't tell the selected-string format is independent of withindex.
- Fix: Drop the unused withindex parameter (and the args at l.42, 70), or actually use it if index-prefixed output was intended.
- Evidence:
def _selected_string(values: list[str], withindex: str) -> str: (l.139) whose body uses only values (l.140-145).
- Why: _selected_string(values, withindex) never references
2. Montage resource path resolved via file dirname chain instead of canonical importlib.resources
-
functions/popfunc/pop_load_frombids.py(lines 934-938)- Why: readegilocs.py:42-43 already resolves the exact same packaged directory (resources/montages) with the project's canonical accessor:
files("eegprep").joinpath("resources").joinpath("montages"). pop_load_frombids reinvents that path with a triple os.path.dirname climb off file, duplicating canonical logic with a more brittle mechanism. - Failure mode: The triple-dirname assumes a fixed filesystem layout relative to this module. The in-code comment (lines 935-936: 'Resources live at the package root ... not next to this file which was moved during the EEGLAB-style reorg.') documents that this exact pattern already broke once when the file was relocated. Any future module move re-breaks it; under a zip/non-β¦
- Fix: Resolve the montage directory through importlib.resources (e.g. reuse readegilocs._montage_path or files("eegprep").joinpath("resources","montages")) instead of os.path.dirname(os.path.dirname(os.path.dirname(file))).
- Evidence:
pop_load_frombids.py:937 _pkg_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) then :938 montage_path = os.path.join(_pkg_root, 'resources', 'montages'); vs readegilocs.py:43 paβ¦
- Why: readegilocs.py:42-43 already resolves the exact same packaged directory (resources/montages) with the project's canonical accessor:
3. Dead no-op validator _reject_unsupported_options
-
functions/popfunc/pop_newcrossf.py(lines 59, 185-186)- Why:
_reject_unsupported_options(options)is called at l.59 but its body is_ = optionsand a return of None (l.185-186) β it validates nothing. It reads like a guard that was stubbed and never implemented, misleading a maintainer into thinking unsupported newcrossf options are rejected. - Failure mode: A reader assumes unsupported options are caught; in reality they pass straight to newcrossf(**options), so a bad option surfaces as a confusing low-level error instead of a clear message β the opposite of what the call site implies.
- Fix: Either implement a real allow-list rejection (like pop_erpimage._raise_for_unsupported_kwargs) or delete the function and its call site.
- Evidence:
def _reject_unsupported_options(options: dict[str, Any]) -> None: / _ = options (l.185-186), invoked as _reject_unsupported_options(options) (l.59).
- Why:
4. Executable script with import-time filesystem I/O living inside the runtime popfunc package
-
functions/popfunc/pop_reref_helper.py(lines 9-22)- Why: This module runs top-level code at import: it reads sys.argv, falls back to a hardcoded CWD-relative path, then calls pop_loadset/pop_reref/pop_saveset directly. It is a dev script, not a pop_* module, yet it sits in the importable functions/popfunc/ package. Grep confirms nothing imports it, so it is dead inside the package.
- Failure mode: Importing eegprep.functions.popfunc.pop_reref_helper (e.g. via any future module-discovery/glob over popfunc, or
python -minvocation without args) executes pop_loadset('./eeglab_data_with_ica_tmp.set') against the current working directory at import time and crashes with a file-not-found error. A library package should never perform filesystem I/O as an i⦠- Fix: Move this helper out of the runtime package (e.g. into scripts/ or tools/), or guard the body under
if __name__ == "__main__":so import is side-effect free. - Evidence:
pop_reref_helper.py:13 eeglab_file_path_in = './eeglab_data_with_ica_tmp.set' and :16 EEG = pop_loadset(eeglab_file_path_in) executed at module top level; grep -rn pop_reref_helper src/eegprep rβ¦
5. Dead helper _currentset_list duplicates session.normalize_dataset_indices and has no callers
-
functions/guifunc/menu_actions.py(lines 1720-1736)- Why: _currentset_list() is a 17-line value-normalizer (handles str/bool/int/float/iterable -> list[int]) that is never called anywhere in src or tests (grep finds only its definition). It also re-implements, less strictly, the canonical session.normalize_dataset_indices() contract that the rest of menu_actions already relies on via store_current/retrieve. It accepts inputs (e.g. bool True -> [1], floatβ¦
- Failure mode: A future maintainer wires _currentset_list into a CURRENTSET path believing it is the project's index normalizer; it silently accepts bool/mixed inputs that normalize_dataset_indices rejects, producing 1-based index handling that disagrees with the session and corrupts dataset selection.
- Fix: Delete _currentset_list; callers needing CURRENTSET normalization should use session.normalize_dataset_indices / session.current_set_value, the single canonical contract.
- Evidence:
def _currentset_list(value: Any) -> list[int]:\n ...\n if isinstance(value, bool):\n return [1] if value else []
6. Dev/parity screenshot CLI ships inside the installed package and eagerly imports matplotlib plus ~80 dialog-spec modules
-
functions/guifunc/visual_capture.py(lines 1-96, 1497-1511)- Why: visual_capture.py is a pure developer/parity tool (argparse main + main, only referenced by tools/visual_parity/capture.py and tests/test_visual_parity.py β no runtime importer in src/). Yet it lives under src/eegprep/functions/guifunc/, so it is packaged into the installed wheel (packages.find only excludes eegprep.eeglab*). At module top it does
import matplotlib.pyplot as pltand imports⦠- Failure mode: Anything that imports the module (test collection, an accidental
from eegprep.functions.guifunc import visual_capture, or a tool that walks the package) forces matplotlib and the entire dialog-spec graph to load, coupling install size and import cost to a non-runtime concern. The dev tool is also redistributed to end users who never run parity captures. - Fix: Move visual_capture.py under tools/visual_parity/ alongside its only caller (tools/visual_parity/capture.py) and update tests to import from there, keeping the runtime guifunc package free of the parity harness and its matplotlib top-levelβ¦
- Evidence:
import matplotlib.pyplot as plt ... def main(argv: list[str] | None = None) -> int: ... if __name__ == "__main__":\n sys.exit(main())
- Why: visual_capture.py is a pure developer/parity tool (argparse main + main, only referenced by tools/visual_parity/capture.py and tests/test_visual_parity.py β no runtime importer in src/). Yet it lives under src/eegprep/functions/guifunc/, so it is packaged into the installed wheel (packages.find only excludes eegprep.eeglab*). At module top it does
7. Dev/test MATLAB-parity helper is imported at module load by core runtime code and creates a temp dir as an import side effect
-
functions/adminfunc/eeglabcompat.py(lines 27-34 (with callers pop_resample.py:14, plugins/clean_rawdata/private/ransac.py:7))- Why: eeglabcompat is a MATLAB/Octave parity helper that AGENTS treats as dev/test-only. Its module body unconditionally creates a
temp/directory at import time when TMPDIR/TEMP_DIR are unset, and core runtime modules import it at module level, so the side effect fires during normal use. ICLabel (iclabel.py:38) and EEG_BIDS (stage_comparison.py:105) already import it lazily inside the matlab/octave b⦠- Failure mode: Importing the public popfunc
pop_resample(orclean_rawdata/private/ransac) executesfrom eegprep.functions.adminfunc.eeglabcompat import get_eeglab, which runs the module-level blocktemp_dir = str(REPO_ROOT / 'temp'); os.makedirs(temp_dir, exist_ok=True). In an installed wheel, REPO_ROOT resolves to the site-packages parent (e.g. .../lib/python3.11β¦ - Fix: Move the
get_eeglabimports in pop_resample.py and ransac.py inside the function bodies (matching the lazy pattern already used by ICLabel/EEG_BIDS), and make eeglabcompat's temp-dir resolution lazy (compute/create the temp dir only when⦠- Evidence:
eeglabcompat.py module level: else: temp_dir = str(REPO_ROOT / 'temp')\n if not os.path.exists(temp_dir):\n os.makedirs(temp_dir, exist_ok=True); pop_resample.py:14 from eegprep.functions.adminfuncβ¦
- Why: eeglabcompat is a MATLAB/Octave parity helper that AGENTS treats as dev/test-only. Its module body unconditionally creates a
8. _is_boundary_event swallows an exception that the guarded code cannot raise
-
functions/sigprocfunc/eegrej.py(lines 8-17)- Why: Inside the
isinstance(t, (int, float))branch the code doestry: return int(t) == -99 except Exception: return False. int() of an int or float never raises, so the except is dead defensive handling for an impossible state, which AGENTS.md explicitly lists as a failure pattern to avoid. - Failure mode: No functional bug; the cost is a misleading suggestion that numeric event types can fail conversion, and it hides any real surprise (e.g. a NaN float type slipping through β int(nan) raises ValueError and would be silently treated as not-boundary rather than surfaced).
- Fix: Drop the try/except:
if isinstance(t, (int, float)): return int(t) == -99. If NaN types are a real concern, handle them explicitly instead of via a blanket except. - Evidence:
L12-17 if isinstance(t, (int, float)): try: return int(t) == -99 except Exception: return False.
- Why: Inside the
9. custom_randperm is a no-op pass-through wrapper; time imported inside the function body
-
functions/sigprocfunc/runica.py(lines 648-662, 624-626)- Why: custom_randperm(n, rng_state) is a nested function whose entire body is
return rand_permutation(n, rng_state)(line 662) wrapped in a long docstring. It adds an indirection with no behavior over the already-imported rand_permutation (line 25). Separately,import time(line 624) is a function-body import for a top-level stdlib module, contrary to AGENTS.md (all imports at top, local imports onl⦠- Failure mode: No runtime bug, but readers must chase custom_randperm to discover it does nothing, and the in-body import obscures dependencies. Real (if small) cost to legibility in the largest function in the scope.
- Fix: Call rand_permutation directly at the loop sites and delete custom_randperm; move
import timeto the module top with the other imports. - Evidence:
L649-662 def custom_randperm(n, rng_state): """...""" return rand_permutation(n, rng_state); L624 import time inside the RNG-init branch; rand_permutation already imported at L25 from ...plugins.β¦
- Why: custom_randperm(n, rng_state) is a nested function whose entire body is
10. ensure_study seeds a top-level STUDY['preclust'] that nothing reads; real state is STUDY['etc']['preclust']
-
functions/studyfunc/_study_utils.py(lines 112,382-388)- Why: Every reader and writer of preclustering state uses study['etc']['preclust'] (std_preclust writes it; pop_clust and std_createclust read preclustdata/preclustparams/clustlevel from it). The top-level study['preclust'] set by ensure_study via _default_preclust() is never read, and its shape (erpclusttimes/specclustfreqs/...) does not even match the etc.preclust shape, so it is misleading dead stateβ¦
- Failure mode: A future contributor reasonably reads or writes study['preclust'] expecting it to drive clustering, gets stale/empty data, and clusters silently on the wrong matrix. The mismatch makes the data model harder to trust during STUDY round-trips and JSON save/load.
- Fix: Drop the top-level setdefault('preclust', ...) and the _default_preclust helper, or fold its keys into etc.preclust so there is a single source of truth.
- Evidence:
study.setdefault("preclust", _default_preclust())
11. MATLAB-parity comparison tool lives in the runtime plugin package
-
plugins/EEG_BIDS/stage_comparison.py(lines 1-728)- Why: AGENTS.md says parity/dev tooling belongs in tools/ or tests/, and src/eegprep/utils is 'Python-only test/development support'. This 728-line module is pure Python-vs-MATLAB comparison scaffolding: it loads paired _py/_mat .set files, Hungarian-matches ICA components, builds comparison tables, and writes comparison reports. It is shipped inside the importable runtime package plugins/EEG_BIDS/ alonβ¦
- Failure mode: It is only referenced by tests/test_bids_preproc.py (generate_comparison_table, save_comparison_report); no runtime/menu/init path uses it. Shipping it in the package bloats the runtime surface, invites accidental imports, and blurs the line between BIDS runtime and parity scaffolding. run_staged_pipeline_python additionally re-runs the entire bids_preprβ¦
- Fix: Move stage_comparison.py to tools/ (or tests/matlab/) and update the import in tests/test_bids_preproc.py. Keep MATLAB-parity comparison code out of the installed eegprep package.
- Evidence:
Module docstring: '"""\nUtility for stage-by-stage pipeline comparison between Python and MATLAB.\n"""'. run_staged_pipeline_python: 'print(f"Running Python pipeline to generate {stage_file}...")' andβ¦
12. Near-duplicate copy of ICLabelNet living in the runtime package
-
plugins/ICLabel/iclabel_net_load_py_measures.py(lines 1-189)- Why: This module defines its own Reshape, Concatenate, and ICLabelNet classes that are an essentially line-for-line copy of the canonical iclabel_net.py (266 lines). Nothing in the Python package imports it; it is only invoked by two MATLAB test scripts via
system('... iclabel_net_load_py_measures.py'). - Failure mode: Two parallel definitions of the ICLabel network can drift: iclabel_net.py casts conv weights with
dtype=torch.float32while this copy uses plaintorch.tensor(...)(default dtype), so the duplicate can produce different numerical results from the production net. A weight-layout or parity fix applied to iclabel_net.py is silently missed here, and the dupli⦠- Fix: Delete iclabel_net_load_py_measures.py and have the MATLAB parity scripts import ICLabelNet from iclabel_net.py (e.g. a thin test entry point under tools/ or tests/), so there is one model definition.
- Evidence:
Both files define class Reshape, class Concatenate, class ICLabelNet(torch.nn.Module) with the same 20-parameter layer construction; only iclabel_net_load_py_measures.py is referenced, from testβ¦
- Why: This module defines its own Reshape, Concatenate, and ICLabelNet classes that are an essentially line-for-line copy of the canonical iclabel_net.py (266 lines). Nothing in the Python package imports it; it is only invoked by two MATLAB test scripts via
13. CI branch triggers reference non-existent 'main'; the docs-publish branch 'master' is never tested
-
.github/workflows/test.yml(lines 5-7)- Why: test.yml runs on push/PR to branches [main, develop], but the remote has only develop (default) and master (git ls-remote shows refs/heads/develop and refs/heads/master, no main). docs.yml triggers on [master, develop] and deploys GitHub Pages only on push to refs/heads/master (docs.yml:62).
- Failure mode: The 'main' trigger in test.yml is dead config. More concretely, master is the branch that publishes the public docs site (eegprep.org) yet master pushes never trigger test.yml, so docs can be deployed from an untested branch. The main/master/develop naming is inconsistent across the two workflows.
- Fix: Make the trigger branch set consistent with the real branches: replace 'main' with 'master' in test.yml (or rename the branch), so the docs-publish branch is covered by tests.
- Evidence:
test.yml:5 'branches: [ main, develop ]'; docs.yml:62 "if: github.event_name == 'push' && github.ref == 'refs/heads/master'"; git ls-remote --heads origin -> refs/heads/develop, refs/heads/master (noβ¦
14. README GitHub Pages badge points at a workflow that does not exist
-
README.md(lines 6)- Why: Line 6 renders a 'GitHub Pages' status badge from actions/workflows/pages.yml/badge.svg, but .github/workflows/ contains only claude-code-review.yml, claude.yml, docs.yml, and test.yml. There is no pages.yml.
- Failure mode: The badge on the project front page is permanently broken (404 SVG), giving researchers a broken/unknown signal about docs deployment on the first thing they see. The actual Pages deploy lives in docs.yml.
- Fix: Point the badge at docs.yml (the workflow that builds and deploys Pages) or remove the second badge.
- Evidence:
README.md:6 [](https://sccn.github.io/eegprep/) ; ls .github/workflows -> claude-code-review.yml claude.yml docs.yβ¦
15. Documented EEGobj() example cannot run β constructor requires a dict or path
-
docs/source/contributing.rst(lines 124-129)- Why: EEGobj.init (eegobj.py:35-47) raises TypeError unless given a dict or a str path. The contributing-guide example shows
eeg = EEGobj()with no arguments inside a sample test. - Failure mode: A contributor copying the documented pattern gets
TypeError: EEGobj requires a dict or a file path stringimmediately. This is a user-facing 'delight' regression for the scripting entry point EEGobj is meant to provide, and it contradicts the only public usage example for the class. - Fix: Update the example to construct from a real dataset, e.g.
eeg = EEGobj(eeg_dict)oreeg = EEGobj('sample.set'), matching the constructor contract. - Evidence:
eegobj.py:46 raise TypeError("EEGobj requires a dict or a file path string"); contributing.rst:129 eeg = EEGobj().
- Why: EEGobj.init (eegobj.py:35-47) raises TypeError unless given a dict or a str path. The contributing-guide example shows
16. Docs tell researchers to install eeglabio to read/write .set, which the code never uses
-
docs/source/user_guide/installation.rst(lines 112-119, 266-275)- Why: The installation guide presents eeglabio as the optional dependency that 'enable[s] reading and writing EEGLAB .set files' (lines 112-119) and the troubleshooting entry 'Cannot read .set files' instructs 'Install eeglabio: uv add eeglabio' (lines 266-275). EEGPrep reads .set via scipy.io.loadmat/h5py and writes via scipy.io.savemat; eeglabio is never imported and is already a hard dependency.
- Failure mode: A researcher whose .set load fails follows the documented fix (install eeglabio), which is already installed and does nothing, while the real cause (bad path / format, see finding 1) is left unaddressed. Misleading optional-dependency guidance for a core file-format journey.
- Fix: Remove the claim that eeglabio is required for .set I/O; describe the actual scipy/h5py-based read path and scipy.io.savemat write path, and rewrite the troubleshooting entry to point at path/format diagnostics.
- Evidence:
installation.rst:115 'To enable reading and writing EEGLAB .set files:' then 'uv add eeglabio'; installation.rst:269-275 'Cannot read .set files ... Solution: Install eeglabio: uv add eeglabio'
17. Documented conda-forge install path for a pre-release, unpublished-to-conda package
-
docs/source/user_guide/installation.rst(lines 50-64)- Why: The install guide documents 'conda install -c conda-forge eegprep' and a conda env recipe (lines 50-64). There is no conda recipe (meta.yaml / conda-forge.yml) anywhere in the repo, EEGPrep is explicitly pre-release (README:14, 'planned release ... end of 2025'), and the README only lists uv/pip for published releases (README:32-33).
- Failure mode: A researcher following the conda instructions most likely hits PackagesNotFoundError because the package is not on conda-forge yet, contradicting the README's published-install guidance.
- Fix: Remove the conda-forge section until a feedstock exists (or gate it behind a clear 'not yet available' note), and keep the documented install paths in sync with README.
- Evidence:
installation.rst:53-57 'install eegprep from the conda-forge channel: conda install -c conda-forge eegprep'; no meta.yaml/conda-forge.yml in repo; README.md:32-33 only documents pip for published releβ¦
18. eeglabio is a mandatory dependency AND a redundant optional extra, but is never imported
-
pyproject.toml(lines 27, 49-51, 74)- Why: eeglabio is declared both as a hard core dependency (line 27 'eeglabio>=0.1.2') and as an optional extra eeglabio = ['eeglabio>=0.1.2'] (lines 49-51) that the 'all' extra re-references (line 74). A grep of the entire source tree (excluding the vendored eeglab/ reference) finds zero imports of eeglabio; .set reading uses scipy.io.loadmat + h5py and .set writing uses scipy.io.savemat (pop_saveset.pyβ¦
- Failure mode: Every EEGPrep install (even the lean 'uv add eegprep') pulls eeglabio for no reason, and the optional extra is a no-op that duplicates a mandatory dependency. Dead dependency weight plus a contract that says 'install this extra to enable I/O' when the extra changes nothing.
- Fix: If eeglabio is genuinely unused, drop it from both dependencies and the optional-extras block (and from 'all'). If it is intended for a future writer path, keep it in exactly one place (extra OR core), not both, and wire an actual import.
- Evidence:
dependencies line 27: 'eeglabio>=0.1.2'; optional-dependencies lines 49-51: eeglabio = ['eeglabio>=0.1.2']; grep 'eeglabio' across src/eegprep (excl eeglab/) returns no matches; pop_saveset.py:495 sciβ¦
Generated by automated review; verify each finding from first principles before fixing.
Activity
claude commentedon Jun 12, 2026
π€ Plan:
develop(post commit8ba958e)Research
Scope is well above the 100-LOC self-contained-bugfix bar (18 findings touching ~14 files plus 2 file moves, 1 deletion,
pyproject.toml, CI, README, 2 docs files), so this comment proposes a batched plan instead of a single mega-PR. Re-verified each finding againstdevelop(09d5e5b); 17/18 still apply, 1 has shifted.Verification deltas vs. issue body (commit
8ba958e):_currentset_listdead): no longer dead ondevelop.grep -n _currentset_list src/eegprep/functions/guifunc/menu_actions.pyshows 4 callers at lines 911, 1050, 1365, 1582 (CURRENTSET sync paths). Recommend dropping this item, or re-scoping to "replace withsession.normalize_dataset_indices" as a separate task.Cross-cutting risks:
eeglabcompattemp-dir as import side effect) is the only behavioral change on a runtime path; everything else is dev-tooling moves, dead-code deletion, doc/CI/badge fixes, or dependency hygiene.src/eegprep/.../; tests import them by path (tests/test_visual_parity.py,tests/test_bids_preproc.py) and so dotools/visual_parity/capture.pyand the MATLAB scripts undertests/matlab/. Each move requires a coordinated import update in the same commit.eeglabiodep) is verified βgrep -rn eeglabio --include='*.py' .returns zero hits. Safe to remove from bothdependenciesandoptional-dependencies.Proposed Approach
Split into 4 PRs, smallest-blast-radius first, all targeting
develop. Each PR has its own regression test orpre-commit.py --fixpass; no PR exceeds ~150 LOC net.PR-A: Trivial dead-code / impossible-state cleanups (findings 1, 3, 8, 9, 10) β single-file, no API surface change.
pop_chansel._selected_string: dropwithindexparam + 2 call-site args.pop_newcrossf._reject_unsupported_options: delete function + call site (l.59, 185-186); the comparable allow-list inpop_erpimage._raise_for_unsupported_kwargsis the right home if a real check is wanted later (file separate issue).eegrej._is_boundary_event: drop impossibletry/exceptaroundint(t)(l.12-17).runica: inlinecustom_randpermto its 2 call sites; hoistimport time(l.624) to module top._study_utils.ensure_study: removesetdefault("preclust", _default_preclust())(l.112) and_default_preclust(l.382-388). Verified no top-levelstudy['preclust']readers; all preclust state lives instudy['etc']['preclust'].PR-B: Resource-path canonicalisation + import-time side effects (findings 2, 4, 7) β runtime correctness.
pop_load_frombidsmontage path: replaceos.path.dirnamechain (l.937-938) withfiles("eegprep").joinpath("resources","montages"), matchingreadegilocs._montage_path.pop_reref_helper.py: move totools/(it's a CLI dev script, never imported); update any references (currently none insrc/).eeglabcompat: move temp-dir resolution (l.27-34) into a lazy_temp_dir()helper called only insideget_eeglab; makefrom ...eeglabcompat import get_eeglablazy insidepop_resample.py:14andclean_rawdata/private/ransac.py:7to match the existing pattern iniclabel.pyandstage_comparison.py.PR-C: Move dev/parity tooling out of the runtime wheel (findings 6, 11, 12) β packaging hygiene.
functions/guifunc/visual_capture.pyβtools/visual_parity/visual_capture.py. Updatetests/test_visual_parity.py:14,27,31,53andtools/visual_parity/capture.pyto import from the new path.plugins/EEG_BIDS/stage_comparison.pyβtools/bids_parity/stage_comparison.py. Updatetests/test_bids_preproc.py:77.plugins/ICLabel/iclabel_net_load_py_measures.py: delete; updatetests/matlab/iclabel_compare_with_features_tmp.m:21andtests/matlab/eeg_iclabelcompare_features.m:22to invoke a thin entry point that importsICLabelNetfromiclabel_net.py(single source of truth).PR-D: Docs, CI, README, dependency hygiene (findings 13, 14, 15, 16, 17, 18) β first-impression polish.
.github/workflows/test.yml:5,7:[main, develop]β[master, develop]somaster(the docs-publish branch perdocs.yml:62) is under test.README.md:6: badge URLpages.ymlβdocs.yml.docs/source/contributing.rst:129:eeg = EEGobj()βeeg = EEGobj(sample_eeg_dict)(constructor requires dict or path, seeeegobj.py:46).docs/source/user_guide/installation.rst:112-119, 266-275: removeuv add eeglabioguidance; replace troubleshooting solution with path/format diagnostics forscipy.io.loadmat/h5py(the actual.setreader,pop_loadset.py).docs/source/user_guide/installation.rst:50-64: remove conda-forge section until a feedstock exists (nometa.yaml/conda-forge.ymlin repo; README only lists pip/uv).pyproject.toml:27, 49-51, 74: dropeeglabio>=0.1.2fromdependencies, drop theeeglabioextra, drop the entry fromall. Verified: zeroeeglabioimports across.pyfiles.Relevant code
src/eegprep/functions/guifunc/menu_actions.py#L1716-L1732-_currentset_list(now has 4 callers; reclassify finding 5)src/eegprep/functions/adminfunc/eeglabcompat.py#L27-L34- module-levelos.makedirs(finding 7)src/eegprep/functions/popfunc/pop_reref_helper.py- top-level I/O on import (finding 4)pyproject.toml#L27- unusedeeglabiocore dep (finding 18).github/workflows/test.yml#L5-L7- trigger on non-existentmain(finding 13)Asks before implementation:
_currentset_listcallers withsession.normalize_dataset_indices".tools/visual_parity/(already exists) andtools/bids_parity/(new) are acceptable homes.eeglabioentirely (not retaining as an optional extra for a future writer path).suraj-ranganath commentedon Jun 12, 2026
π€ Closing because Phase 5 was completed by merged PR #201 and is included in epic PR #206.
Phase 5: standalone packaging, deps, docs & dead-code cleanup