Skip to content

feat(source): add deterministic fieldops fixture api - #3

Merged
jaeyeopme merged 1 commit into
mainfrom
source-fixture-api
Jun 6, 2026
Merged

feat(source): add deterministic fieldops fixture api#3
jaeyeopme merged 1 commit into
mainfrom
source-fixture-api

Conversation

@jaeyeopme

Copy link
Copy Markdown
Owner

Motivation

Add the deterministic source data and local fixture API needed before mapping and validation work starts.

Scope

  • Add FieldOps Desk job and job update fixture files.
  • Add a local source API for date-range filtering, pagination, and related job updates.
  • Add tests that lock fixture counts, record types, pagination, and filtering behavior.
  • Expand CI so the full test suite and coverage gate run on this PR branch.

Out of Scope

  • Mapping source records into clean output rows.
  • Validation and duplicate handling rules.
  • Report writing.
  • SQLite run history.
  • API or CLI export behavior.

Modifications

  • Add source job records with valid, invalid, duplicate, and out-of-range cases.
  • Add related job update records used by later workflow steps.
  • Add a typed source API that returns fixture-order pages and filters updates by requested job ids.
  • Add failure checks for invalid pagination and malformed fixture files.

Test Plan

  • uv run pytest tests/test_sample_data.py tests/test_source_api.py -v
  • uv run ruff check sample_data src tests
  • uv run basedpyright
  • uv run pytest tests/test_source_api.py --cov=clean_data_export_api.source_api --cov-report=term-missing
  • uv run pytest -v
  • uv run pytest --cov=clean_data_export_api --cov-report=term-missing --cov-fail-under=90
  • uv run python -m compileall src tests

Docs Impact

none

ADR Check

  • No architecture or scope decision needs a new or updated ADR.

Result

The demo date range returns exactly 9 source jobs, pagination is deterministic, and related updates are returned only for requested job ids.

Add deterministic FieldOps Desk job and job update fixtures, a paginated local source API, fixture contract tests, source API tests, and CI coverage for the expanded test suite.

Tested: uv run pytest tests/test_sample_data.py tests/test_source_api.py -v

Tested: uv run ruff check sample_data src tests

Tested: uv run basedpyright

Tested: uv run pytest tests/test_source_api.py --cov=clean_data_export_api.source_api --cov-report=term-missing

Tested: uv run pytest -v

Tested: uv run pytest --cov=clean_data_export_api --cov-report=term-missing --cov-fail-under=90

Tested: uv run python -m compileall src tests
@jaeyeopme
jaeyeopme merged commit 663cb0d into main Jun 6, 2026
4 checks passed
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