Skip to content

Fix documentation and data integrity safeguards - #25

Merged
dshkol merged 1 commit into
mainfrom
fix/docs-and-data-integrity
Jul 10, 2026
Merged

Fix documentation and data integrity safeguards#25
dshkol merged 1 commit into
mainfrom
fix/docs-and-data-integrity

Conversation

@dshkol

@dshkol dshkol commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix Sphinx-Gallery thumbnail links and restore geographic example plots
  • make get_census() cache keys canonical, schema-versioned, and sensitive to geometry resolution and label mode
  • preserve CensusAPIError subclasses across public API entry points and add NetworkError for exhausted connection failures
  • require complete, unique geographic identifiers when combining geometry and vector responses

Root causes

Generated notebooks were being discovered as the canonical Sphinx documents, which left the gallery's RST reference targets unresolved. The geographic example also used NumPy without importing it.

The census cache key omitted output-affecting options, public wrappers replaced resilience exceptions with generic RuntimeError instances, and geometry/vector responses fell back to positional alignment when identifiers were unavailable.

Impact

Gallery thumbnails now open their example pages and the geographic plots execute correctly. Cached high-resolution and label-mode variants cannot collide. Callers can catch the documented API exception hierarchy, and ambiguous geography/vector combinations fail explicitly instead of returning potentially misaligned census data.

Validation

  • 114 deterministic tests passed
  • black --check passed
  • critical flake8 checks passed
  • git diff --check passed
  • full Sphinx HTML build completed with all gallery examples executed

Closes #24

@github-actions

Copy link
Copy Markdown

🧪 R Equivalence Validation Results

VALIDATION SUMMARY
======================================================================

See full validation report in artifacts.

@dshkol
dshkol marked this pull request as ready for review July 10, 2026 02:29
@dshkol
dshkol merged commit 7b53fc1 into main Jul 10, 2026
6 checks passed
@dshkol
dshkol deleted the fix/docs-and-data-integrity branch July 21, 2026 05:17
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.

Examples are broken in documentation

1 participant