Skip to content

Resolve test-layout parity for the 7 Pydantic response models #65

Description

@tschm

Subcategory: Test-layout parity
Score: 5 → 10

Rhiza's check_test_layout.py requires every source class A to have a mirrored TestA. Seven Pydantic response models have none. All seven are declarative data models with cyclomatic complexity 1 and no behaviour of their own, so seven stub test classes would be busywork.

The proportionate fix is a documented opt-out: add a [tool.check_test_layout] table to pyproject.toml with enforce = false and a reason citing the 100% coverage gate that already guarantees per-module coverage. (Adding the seven Test* classes is the alternative if strict mirroring is preferred.)

What to change

  • src/pycharting/api/interface.py:35PlotResult
  • src/pycharting/api/interface.py:53ServerStatus
  • src/pycharting/api/routes.py:54InitDataResponse
  • src/pycharting/api/routes.py:63SessionInfo
  • src/pycharting/api/routes.py:72SessionListResponse
  • src/pycharting/api/routes.py:79DeleteSessionResponse
  • src/pycharting/api/routes.py:87StatusResponse

…or pyproject.toml for the documented opt-out.

done when

check_test_layout.py exits 0 — either by mirroring or via a documented [tool.check_test_layout] opt-out.

Evidence

Test-layout check failed:
  ✗ missing class TestPlotResult in tests/pycharting/api/test_interface.py for class PlotResult in src/pycharting/api/interface.py

Surfaced by the Rhiza quality gates during the template bump to jebel-quant/rhiza@v1.2.2, which enabled the stricter ruff rule families (ANN, A, BLE, ARG) and TYPECHECKER=both. Gate status at time of filing: make fmt FAIL, make typecheck FAIL, make docs-coverage FAIL, test-layout FAIL; make deptry, make security, make test PASS (154 tests, 100% coverage).

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