Skip to content

refactor: retire unused QCPipeline and ReferencePanel abstractions - #248

Merged
dvitale199 merged 4 commits into
refactor/mainfrom
refactor/retire-dead-abstractions
Jul 17, 2026
Merged

refactor: retire unused QCPipeline and ReferencePanel abstractions#248
dvitale199 merged 4 commits into
refactor/mainfrom
refactor/retire-dead-abstractions

Conversation

@dvitale199

Copy link
Copy Markdown
Owner

Summary

  • Removes two confirmed-orphaned Python abstractions left over from the mid-cutover refactor. Deletion-only cleanup — neither is reachable at runtime, so there is no behavior change.
  • QCPipeline (qc/pipeline.py) + its QCResult return type + QCStepProtocol: an orchestration API the CLI runner never used (it reimplements orchestration in _run_single_step/_run_qc_pipeline). Its golden regression coverage was redundant with the direct step-function golden tests, which remain. FilterResult (returned by every step) is kept.
  • ReferencePanel (ancestry/reference.py, incl. get_default_model_path/validate_model_files): a public export referenced only in docstrings, never constructed in shipped code, zero test coverage. The new-ancestry path uses AncestryModel directly; the runner registered it in _new_modules but never read it. Also corrects the AncestryModel docstrings, which showed a stale ReferencePanel-based workflow (fit() actually takes a DataFrame + labels).

Intentionally NOT touched

  • genotools/container/ — orphaned, but kept as a historical reference for rebuilding containerized ancestry inference later (maintainer decision).
  • ancestry/results.py, qc/results.py::FilterResult, gwas/results.py — all live and tested.

What changed

  • genotools/qc/pipeline.py (deleted), genotools/qc/results.py (drop QCResult), genotools/qc/__init__.py (exports + docstring).
  • genotools/ancestry/reference.py (deleted), genotools/ancestry/__init__.py (exports + docstring), genotools/ancestry/model.py (docstrings), genotools/cli/runner.py (import + dead _new_modules registration).
  • Tests: tests/unit/test_qc/test_pipeline.py (deleted), TestQCResult removed from tests/unit/test_qc/test_results.py, TestQCPipeline* removed from tests/regression/test_qc_steps.py. All direct step/CLI golden tests retained.

Test plan

  • grep confirms zero remaining references to every removed symbol.
  • Import smoke: import genotools{,.qc,.ancestry,.cli,.gwas} OK.
  • Full tests/unit tests/regression: 374 passed (was 397; the 23 removed are the deleted QCPipeline/QCResult self-tests, not failures). Parity suite green with .venv-stable.
  • CLI smoke: python -m genotools --help exits 0.
  • CI green on the PR (unit+regression + old-vs-new parity).

Notes

  • Targets refactor/main, not main.
  • Design + plan: docs/superpowers/specs/2026-07-16-retire-dead-abstractions-design.md, docs/superpowers/plans/2026-07-16-retire-dead-abstractions.md.

Brainstormed design for removing two confirmed-orphaned Python abstractions
(QCPipeline + QCResult/QCStepProtocol, and the unadopted ReferencePanel
module). Deletion-only cleanup; targets refactor/main. genotools/container/
is intentionally retained as a historical reference for rebuilding
containerized inference later. See the spec for evidence, per-commit plan,
and verification.
QCPipeline (qc/pipeline.py) plus QCResult and QCStepProtocol were an
orchestration API the CLI runner never used (it reimplements orchestration
in _run_single_step/_run_qc_pipeline). Their golden coverage was redundant
with the direct step-function golden tests, which remain. Removes the class,
its QCResult return type, their exports, and their self-tests. FilterResult
(returned by every step) is kept.
ancestry/reference.py (ReferencePanel + get_default_model_path +
validate_model_files) was a public export referenced only in docstrings,
never constructed in shipped code, with zero test coverage. The new-ancestry
path uses AncestryModel directly, and the runner registered ReferencePanel in
_new_modules but never read it. Removes the module, its exports, and the dead
registration. Also fixes the AncestryModel docstrings, which showed a stale
ReferencePanel-based workflow (fit() actually takes a DataFrame + labels).
@dvitale199
dvitale199 merged commit ea81a17 into refactor/main Jul 17, 2026
2 checks passed
@dvitale199
dvitale199 deleted the refactor/retire-dead-abstractions branch July 17, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant