Skip to content

Add unit tests for persistence layer #12

@RBhupi

Description

@RBhupi

Context
The persistence layer has minimal test coverage. Failure paths, schema evolution, and cross-module contract validation are untested.

Persistence layer

  • Write + read round-trip returns identical data
  • Parquet schema evolution — new column in append does not corrupt existing rows (NaN fill)
  • Duplicate insert raises, does not silently overwrite
  • Missing file path raises immediately on read
  • Catalog path stored relative to radar_dir, not base_dir
  • Registry correctly records and retrieves radar location

More Contract boundaries test

  • Passing a wrong type at a contract boundary raises immediately
  • Missing required field in contract dataclass raises on construction
  • Each module's run() output satisfies the downstream module's input contract
  • No module imports directly from another module (static import check)

Constraints

  • Temporary in-memory or tmp_path SQLite — no shared test databases
  • Synthetic DataFrames only — no real Parquet fixtures
  • Pure unit tests — no pipeline execution, no real data
  • Import boundary test can use ast or importlib to inspect statically

Priority
Low

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions