2026-06-10 20:22:38 +00:00
|
|
|
|
// File: standards/doc.go
|
2026-01-13 18:14:21 -06:00
|
|
|
|
//
|
2026-01-15 10:47:59 -06:00
|
|
|
|
// Package standards defines weatherfeeder’s provider-agnostic “project law”:
|
|
|
|
|
|
//
|
|
|
|
|
|
// - Schema identifiers and versioning conventions (see schema.go).
|
|
|
|
|
|
// - Canonical interpretations / cross-provider mappings that are not specific to a
|
|
|
|
|
|
// single upstream API (e.g., shared code tables, text heuristics, unit policy).
|
feat(nws, normalizers): add NWS hourly forecast normalization and enforce canonical float rounding
- Implement full NWS hourly forecast normalizer (raw.nws.hourly.forecast.v1 → weather.forecast.v1)
- Add GeoJSON forecast types and helpers for NWS gridpoint hourly payloads
- Normalize temperatures, winds, humidity, PoP, and infer WMO condition codes from forecast text/icons
- Treat forecast IssuedAt as EffectiveAt for stable, dedupe-friendly event IDs
- Introduce project-wide float rounding at normalization finalization
- Round all float values in canonical payloads to 2 decimal places
- Apply consistently across pointers, slices, maps, and nested structs
- Preserve opaque structs (e.g., time.Time) unchanged
- Add SchemaRawNWSHourlyForecastV1 and align schema matching/comments
- Clean up NWS helper organization and comments
- Update documentation to reflect numeric wire-format and normalization policies
This establishes a complete, deterministic hourly forecast pipeline for NWS
and improves JSON output stability across all canonical weather schemas.
2026-01-16 10:28:32 -06:00
|
|
|
|
// - Wire-format conventions for canonical payloads.
|
2026-01-15 10:47:59 -06:00
|
|
|
|
//
|
|
|
|
|
|
// Standards are used by both sources and normalizers. Keep this package free of
|
|
|
|
|
|
// provider-specific logic and free of dependencies on internal/sources/* or
|
|
|
|
|
|
// internal/normalizers/* to avoid import cycles.
|
|
|
|
|
|
//
|
feat(nws, normalizers): add NWS hourly forecast normalization and enforce canonical float rounding
- Implement full NWS hourly forecast normalizer (raw.nws.hourly.forecast.v1 → weather.forecast.v1)
- Add GeoJSON forecast types and helpers for NWS gridpoint hourly payloads
- Normalize temperatures, winds, humidity, PoP, and infer WMO condition codes from forecast text/icons
- Treat forecast IssuedAt as EffectiveAt for stable, dedupe-friendly event IDs
- Introduce project-wide float rounding at normalization finalization
- Round all float values in canonical payloads to 2 decimal places
- Apply consistently across pointers, slices, maps, and nested structs
- Preserve opaque structs (e.g., time.Time) unchanged
- Add SchemaRawNWSHourlyForecastV1 and align schema matching/comments
- Clean up NWS helper organization and comments
- Update documentation to reflect numeric wire-format and normalization policies
This establishes a complete, deterministic hourly forecast pipeline for NWS
and improves JSON output stability across all canonical weather schemas.
2026-01-16 10:28:32 -06:00
|
|
|
|
// Wire-format conventions
|
|
|
|
|
|
// -----------------------
|
|
|
|
|
|
// For readability and stability, canonical payloads (weather.* schemas) should not emit
|
|
|
|
|
|
// noisy floating-point representations. weatherfeeder enforces this by rounding float
|
2026-02-08 09:15:07 -06:00
|
|
|
|
// values in canonical payloads to 4 digits after the decimal point at normalization
|
feat(nws, normalizers): add NWS hourly forecast normalization and enforce canonical float rounding
- Implement full NWS hourly forecast normalizer (raw.nws.hourly.forecast.v1 → weather.forecast.v1)
- Add GeoJSON forecast types and helpers for NWS gridpoint hourly payloads
- Normalize temperatures, winds, humidity, PoP, and infer WMO condition codes from forecast text/icons
- Treat forecast IssuedAt as EffectiveAt for stable, dedupe-friendly event IDs
- Introduce project-wide float rounding at normalization finalization
- Round all float values in canonical payloads to 2 decimal places
- Apply consistently across pointers, slices, maps, and nested structs
- Preserve opaque structs (e.g., time.Time) unchanged
- Add SchemaRawNWSHourlyForecastV1 and align schema matching/comments
- Clean up NWS helper organization and comments
- Update documentation to reflect numeric wire-format and normalization policies
This establishes a complete, deterministic hourly forecast pipeline for NWS
and improves JSON output stability across all canonical weather schemas.
2026-01-16 10:28:32 -06:00
|
|
|
|
// finalization time.
|
|
|
|
|
|
//
|
2026-01-15 20:40:53 -06:00
|
|
|
|
// Provider-specific decoding helpers and quirks live in internal/providers/<provider>.
|
|
|
|
|
|
// Normalizer implementations and canonical mapping logic live in internal/normalizers/<provider>.
|
2026-01-13 18:14:21 -06:00
|
|
|
|
package standards
|