Skip to content

mostlyright.core.schemas.observation

Canonical METAR/SPECI observation schema (schema.observation.v1).

Mirrors the §A “Observations schema” table in docs/design.md exactly: 20 metric columns, with the imperial-mode rename map preserving the mostly-light/metar_parser.py 9-column contract as its projection.

Adapters (IEM, AWC) normalise their raw responses to these columns before emitting rows. source, knowledge_time and retrieved_at are overlay columns added by the schema layer (not part of COLUMNS); they are stamped on every fetch and validated independently.

ObservationSchema()schema.observation.v1 — canonical METAR/SPECI rows.

class mostlyright.core.schemas.observation.ObservationSchema

Section titled “class mostlyright.core.schemas.observation.ObservationSchema”

Bases: Schema

schema.observation.v1 — canonical METAR/SPECI rows.

Metric column set per docs/design.md §A; imperial-mode rename map per the same section preserves the existing mostly-light contract (the 9-column anti-duplication projection: station, utc_datetime, temp_f, dewpoint_f, sea_level_pressure_hpa, wind_speed_kt, wind_direction_degrees, wind_gust_kt, visibility_miles). sea_level_pressure_hpa is canonical aviation units and unchanged across modes; wind_direction_degrees is dimensionless degrees.

Metric → imperial column-name map (docs §A imperial-mode table). station, observation_type, wind_direction_degrees, sea_level_pressure_hpa, sky_cover_N and raw_metar are unchanged across modes.