Skip to content

Phase 7: Remaining long-tail core helpers and missing pop_* wrappers #138

Closed

Description

@suraj-ranganath

🤖

Phase 7: Remaining Long-Tail Core Helpers And Missing pop_* Wrappers

Summary

Close the remaining audit-approved helper and wrapper gaps after Phases 2-6 expose what is actually needed. This phase should avoid duplicate implementations and avoid importing stale MATLAB bloat.

Runs after Phases 2-6.

Scope

Port or classify remaining Phase 1 matrix rows for:

  • admin/misc/sigproc helpers required by real workflows
  • missing pop_* wrappers that are documented, user-facing, or thin aliases to implemented modern behavior
  • rejection/ICA helper calculations needed by current menus or parity tests
  • compatibility aliases users are likely to type

Do not one-for-one port MATLAB-only GUI shims such as questdlg2 unless a real EEGPrep path needs them.

Acceptance Criteria

  • No matrix row remains port without implementation or a follow-up issue.
  • Legacy aliases call modern EEGPrep functions, have tests, and produce valid history, or are explicitly marked stale.
  • Public APIs are exported only when user-facing.
  • Tests cover wrapper behavior, console history, sample data, and MATLAB parity where useful.
  • No broad runtime dependency or bloat from unused MATLAB helper ports.

Verification

Run focused tests for wrappers/helpers, console workspace tests where history is affected, MATLAB parity where useful, then:

  • uv run --no-sync ruff check .
  • uv run --no-sync ruff format --check .
  • uv run --no-sync ty check
  • non-slow pytest as risk requires

/goal Prompt

/goal Close the remaining audit-approved long-tail helper and missing pop_* wrapper gaps. Port only functions that are user-facing, workflow-required, documented, or parity-test-required; classify stale MATLAB-only helpers instead of adding bloat; verify API, console history, sample_data, MATLAB parity where useful, lint/type/tests, and update the parity matrix so no approved row remains unresolved.

Activity

  1. added
    phase
    on Jun 5, 2026
  2. claude commented on Jun 5, 2026

    @claude
    Contributor

    🤖 Plan:

    Research

    Phase 7 is the audit cleanup pass for the parity epic (#131). Its scope is defined by inputs that do not yet exist: it can only port what Phase 1's parity matrix marks port and what Phases 2-6 expose what is actually needed (issue body). The epic spells out the merge order as 1 -> 2 + 3 + 4 -> 5 + 6 -> 7 -> 8 (#131 body, "Parallelization And Merge Order").

    State today:

    Phase 7's acceptance criterion No matrix row remains 'port' without implementation or a follow-up issue is unresolvable until that matrix is committed by Phase 1.

    Relevant code

    Proposed Approach

    Not actionable as a PR yet — this is design/sequencing work, not a <100 LOC bug fix. Recommendation for the human owner:

    1. Merge Phase 1 (Phase 1: Parity matrix, staleness triage, and porting contracts #132) first. Without the matrix and its row statuses (port / consolidated / stale_skip / matlab_runtime_skip / external_dependency_skip), Phase 7 has no concrete work-list and can only invent scope — exactly what the epic's "do not port stale functions just because same-name MATLAB files exist" rule forbids.
    2. Land Phases 2-6 against feature/eeglab-core-parity-completion so each phase can mark its rows implemented and demote rows that turn out to live elsewhere to consolidated.
    3. Re-open Phase 7 once the matrix shows the residual port set. At that point Phase 7's PR should be opened per audit row, not per MATLAB filename: each row gets a pop_<name>.py (in functions/popfunc/), an EEGPrep-owned help Markdown under resources/help/, console-history coverage in tests/test_console_workspace.py, and an entry update in menu_placeholders.py when relevant. Stale rows get a one-line rationale committed to the matrix instead of code.
    4. Split Phase 7 into one PR per category (helpers vs missing pop_* wrappers vs rejection/ICA helpers vs compatibility aliases) so each PR stays under the 500-LOC spec threshold from .agents/skills/pull-request/SKILL.md.

    If the intent is for an agent to attempt Phase 1 first and produce the matrix, that should be filed against #132, not #138. I am stopping here rather than opening a Phase 7 PR that would either guess at scope or duplicate work that Phases 2-6 will later supersede.

  3. suraj-ranganath commented on Jun 5, 2026

    @suraj-ranganath
    MemberAuthor

    🤖 Phase 4 handoff from #135 / PR #143 for the Phase 7 work-list.

    Phase 4 intentionally kept two time-frequency areas out of scope and classified them as Phase 7 follow-ups in docs/parity/eeglab_core_parity_matrix.json:

    • Time-warped ERSP/ITC workflows: pop_newtimef now rejects timewarp, timewarpms, and timewarpidx clearly, and the angtimewarp helper row remains port for a later timewarp-focused implementation. Phase 7 should decide whether to port the full marker/angle-warp path or classify it with final rationale.
    • Exact EEGLAB correct_mc distribution fitting: Phase 4 provides a standalone neighbor-correlation estimator, but does not port the Ramberg-Schmeiser / rsfit stack (correctfit, fit, rsget, rsgetoutput, rsgetoutputval, rspfunc). Phase 7 should either port that stack for exact correct_mc parity or keep the standalone path and mark the distribution-fitting helpers with final rationale.

    The Phase 4 matrix rows and tests now make those boundaries explicit, so Phase 7 should treat these as known residual rows rather than rediscovering them during closeout.

  4. suraj-ranganath commented on Jun 7, 2026

    @suraj-ranganath
    MemberAuthor

    🤖 Resolved by the work now included in PR #152. Closing this constituent phase/follow-up issue now; parent epic #131 remains open until the epic PR merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions