Skip to content

Replace legacy client with generated typed Public Reports API - #7

Merged
kvkenyon merged 2 commits into
mainfrom
feat/typed-public-client
Sep 8, 2026
Merged

Replace legacy client with generated typed Public Reports API#7
kvkenyon merged 2 commits into
mainfrom
feat/typed-public-client

Conversation

@kvkenyon

@kvkenyon kvkenyon commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Replace the process-wide client and partially covered generated API with a small instance-based Client, generated typed filters and Pydantic rows for all 242 Public Reports endpoints. Shared transport handles authentication, token refresh, retries, sync/async pagination, and typed product/archive/bundle metadata. Anonymous dashboards are typed as well.

This is a breaking API redesign: callers use Client and typed rows instead of the legacy global configuration and DataFrame interface. Runtime dependencies are httpx, httpx-retries, and pydantic. Historical CSV readers are in a separate stacked PR; this PR's file downloads return ZIP bytes. MIS and the separate ESR API are excluded.

Review the handwritten transport, generator, and tests first. Most of the diff is generated methods and captured public response metadata. Each of the 242 generated methods is exercised against its captured response through mocked HTTP; those samples prove row decoding, not complete historical coverage.

Validation of the exact staged core snapshot: 259 tests passed, strict mypy passed, Ruff passed, and git diff check passed. Earlier live requests supplied the captured schemas; no credentials are included.

Replaces the earlier worker's PR stack #1#6 as the implementation direction. Their branches are retained for useful source discoveries and remaining historical formats.

@kvkenyon
kvkenyon merged commit fb37857 into main Sep 8, 2026
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