Skip to content

Test coverage: analysis pipelines (farm/analysis) #568

@cursor

Description

@cursor

Context

CI enforces ≥90% line coverage on a scoped subset of farm/ via .coveragerc ([report] omit). The modules below are currently excluded from that report so the gate can focus on the simulation core (environment, action, decision, database, observations, agent, etc.).

This issue tracks bringing test coverage to these analysis modules and, when ready, removing them from [report] omit in .coveragerc.

Scope (paths)

  • farm/analysis/** (orchestrators, loaders, processors, dominance/advantage/genesis/social/spatial/temporal pipelines, protocols, mocks, etc.)

Suggested approach

  • Prefer unit tests with small fixtures and mocked I/O (filesystem, DB, matplotlib plt.savefig where needed).
  • Add @pytest.mark.analysis where appropriate (see pytest.ini).
  • After meaningful coverage, shrink .coveragerc [report] omit for the files you cover and confirm pytest --cov=farm --cov-config=.coveragerc --cov-fail-under=90 still passes.

Acceptance criteria

  • New tests under tests/ covering the above behavior without requiring full production data.
  • Optional: document in the PR which omit entries were removed and why.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions