Skip to content

Preserve Samples identifier columns as text #411

Description

@thodson-usgs

What to build

Ensure both Samples CSV getters preserve code and identifier columns as text, including zero-padded parameter codes, hydrologic-unit codes, FIPS codes, and monitoring-location and organization identifiers. Measurement and count columns must retain their appropriate numeric types.

Use one shared response-parsing convention for Samples and WQP rather than importing one adapter from another or duplicating identifier detection. Preserve all existing getter signatures, return shapes, metadata, datetime shaping, and request behavior. Document the intentional dtype correction in the release notes.

Acceptance criteria

  • Both Samples getters return identifier and code columns as strings without dropping leading zeros.
  • Numeric measurement and count columns remain numeric.
  • Code-column detection and the two-pass CSV parse have one shared implementation used by Samples and WQP.
  • Existing WQP parsing behavior is unchanged and protected by its leading-zero regression coverage.
  • Offline tests cover zero-padded parameter, HUC, and FIPS values through the public Samples getters, including the summary path.
  • Public APIs, request URLs, metadata, frame columns, datetime shaping, and sort behavior are unchanged apart from corrected dtypes.
  • The full offline suite, coverage gate, type checker, linter, architecture tests, and dependency contracts pass.

Blocked by

None — can start immediately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified and ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions