Skip to content

Create models/ subpackage with backward-compatible imports #11

Description

@Hugo-W

Create models/ subpackage with backward-compatible imports

Description

pyeeg/models.py is large (1102 lines) and contains multiple model families. Need to split it while maintaining backward compatibility.

Tasks

  • Create pyeeg/models/ subpackage directory
  • Create pyeeg/models/init.py
  • Split pyeeg/models.py into:
    • pyeeg/models/trf.py (TRF-specific logic including TRFEstimator)
    • pyeeg/models/var.py (VAR model fitting logic)
    • Other modules as needed for clean separation
  • In pyeeg/models/init.py, re-export all classes and functions to maintain pyeeg.models.TRFEstimator and similar import paths
  • Update pyeeg/init.py imports if needed

Acceptance Criteria

  • pyeeg.models.TRFEstimator still works (backward compatible)
  • All existing import paths preserved
  • models.py either becomes a compatibility shim or is removed
  • Code is better organized with clear responsibilities

Priority

Medium

Dependencies

Epic

Modularization

Source

NEXT_STEPS.md Step 4, TODO.md Section 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions