Skip to content

Refactor _escape_triage.py: split concerns and register pytest hooks explicitly #947

Description

@mwcraig

Follow-up from PR #942 (review items R1/R2, #942 (review)). Lowest priority of the follow-ups — pure internal cleanup, no behavior change.

ccdproc/tests/_escape_triage.py currently mixes three separable concerns:

  1. failure-triage grouping (collapse backend test failures by escape site),
  2. the live escape-log tally fed by the logger, and
  3. baseline load/write/enforce (the ratchet),

while the np.asarray/np.asanyarray/np.ma.asanyarray monkeypatching itself lives in ccdproc/conftest.py.

Suggested refactor:

  • Split into e.g. _escape_log.py (logger + tally) and _escape_ratchet.py (baseline load/write/enforce), keeping the failure-triage summary where it fits best.
  • Register the pytest hooks via pytest_plugins = ["ccdproc.tests..."] in conftest.py instead of the current load-bearing # noqa: F401 hook imports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions