Skip to content

Replace SOAP DataInventory with non-SOAP solution (drop zeep) #90

@GClunies

Description

@GClunies

What & Why

Station.data_inventory is today the sole consumer of SOAP in this library. It calls zeep.Client(INVENTORY_WSDL_URL) against opendap.co-ops.nos.noaa.gov — a legacy endpoint the README already labels "legacy" and best-effort (README.md:79-82), with failure silently degrading to {} (station.py:63-82). Migrating this to mdapi/datagetter (or dropping the feature if no equivalent exists) lets us drop zeep entirely and remove the last SOAP surface.

This ticket is intentionally research + assess + implement in one go — not a separate spike.

Part of #89.

Acceptance Criteria

  • zeep removed from pyproject.toml runtime dependencies.
  • INVENTORY_WSDL_URL, _SOAP_SESSION, _SOAP_RETRY, and _build_soap_session() deleted.
  • Station.get_data_inventory() / data_inventory attribute is either (a) reimplemented against mdapi or datagetter with equivalent or documented-reduced output, or (b) deprecated with a clear migration note in README/CHANGELOG.
  • Cassette-backed test(s) cover the new path; the existing @pytest.mark.live SOAP test is deleted or rewritten.
  • No references to soap, wsdl, zeep, or opendap.co-ops remain in noaa_coops/ source.
  • Station docstring (station.py:42-45) and CHANGELOG updated.

Approach

Phase 1 — Research (time-box: ~1 day).
Investigate the three candidate paths and pick one. Post the decision in a comment on this issue before coding.

  1. Derive data_inventory from mdapi fields already returned in the expand=products,deployments,bins response — check whether per-product first/last coverage dates are present.
  2. Probe the datagetter with sentinel queries per product to discover coverage bounds.
  3. Deprecate data_inventory entirely if no first-class equivalent exists; document the removal.

Decision criteria: coverage fidelity vs. latency cost of whatever replaces it.

Phase 2 — Implement.
Files in play:

  • noaa_coops/_endpoints.py — remove INVENTORY_WSDL_URL.
  • noaa_coops/_http.py:42,54-67 — remove _SOAP_RETRY, _SOAP_SESSION, _build_soap_session.
  • noaa_coops/station.py:17,19,21,44-49,63-82,92-122 — drop zeep import, SOAP call path, docstring.
  • pyproject.toml:28 — drop zeep>=4.2.1.
  • tests/test_station.py — remove/rewrite @pytest.mark.live SOAP test.
  • tests/test_http.py — remove SOAP degradation tests (or repurpose for the new code path).

Phase 3 — Verify.

  • Test suite green without zeep installed in the environment.
  • uv lock refresh shows no zeep chain.

Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions