Skip to content

refactor(ogc): stabilize module boundaries - #348

Merged
thodson-usgs merged 1 commit into
DOI-USGS:mainfrom
thodson-usgs:refactor/phase-1-ogc-boundaries
Aug 3, 2026
Merged

refactor(ogc): stabilize module boundaries#348
thodson-usgs merged 1 commit into
DOI-USGS:mainfrom
thodson-usgs:refactor/phase-1-ogc-boundaries

Conversation

@thodson-usgs

@thodson-usgs thodson-usgs commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Commit

This branch is based directly on main at 44f2aeec and contains one commit:

  • 69a9d1bdrefactor(ogc): stabilize module boundaries

Summary

  • move OgcDialect and endpoint defaults into the low-level ogc.policy leaf
  • move argument normalization, request construction, and queryables/schema lookup into ogc.requests
  • keep pagination and sync/async orchestration in ogc.engine, with a frozen compatibility surface for previous private imports
  • remove shaping-to-engine dependencies and enforce an acyclic OGC runtime graph
  • expose a four-symbol OGC service-adapter facade and route NGWMN through it exclusively
  • stop using waterdata.utils as a bulk re-export of private OGC helpers
  • scope API_USGS_PAT to api.waterdata.usgs.gov, including stripping it before sync or async cross-host redirects
  • update ADR 0003, the current-state architecture overview, NEWS, and executable fitness functions

Why

The architecture baseline identified private cross-package contracts, a logical
ogc.engine/ogc.shaping cycle, and generic OGC requests that could receive
Water Data credentials without considering the destination host. This change
stabilizes those existing boundaries without introducing the separate
API-neutral transport layer in downstream PR #350.

Compatibility

Public service imports, function signatures, return shapes, metadata,
deprecations, pagination, chunking, retry, and resume behavior are unchanged.
Previous underscore-prefixed OGC paths remain available where compatibility is
required, and an architecture fitness function prevents that legacy surface
from expanding.

Validation

  • full suite: 636 passed with 56 expected warnings
  • coverage: 97%
  • all configured pre-commit hooks passed, including Ruff and strict mypy
  • Sphinx HTML build passed with the same four pre-existing warnings
  • isolated wheel build/install/import outside the checkout passed; includes ogc.policy and ogc.requests
  • exact four-symbol OGC facade verified from the installed wheel
  • complete GitHub Actions matrix previously passed; refreshed checks are running on the squashed commit

Scope

This PR stabilizes existing OGC boundaries. API-neutral transport extraction
and migration of Water Use away from private OGC pagination are isolated in
stacked draft PR #350.

Separate OGC policy and request construction from orchestration, expose a small service-adapter facade, and remove the shaping-to-engine dependency cycle.

Narrow Water Data and NGWMN dependencies, preserve legacy private compatibility paths, and scope API credentials to the authorized host across redirects. Add executable architecture and security guardrails plus current-state documentation.
@thodson-usgs
thodson-usgs force-pushed the refactor/phase-1-ogc-boundaries branch from 29b8b6c to 69a9d1b Compare August 3, 2026 14:43
@thodson-usgs thodson-usgs changed the title refactor(ogc): stabilize phase 1 boundaries refactor(ogc): stabilize module boundaries Aug 3, 2026
@thodson-usgs
thodson-usgs merged commit ec88cec into DOI-USGS:main Aug 3, 2026
10 checks passed
@thodson-usgs
thodson-usgs deleted the refactor/phase-1-ogc-boundaries branch August 3, 2026 14:44
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