Repository navigation
wx 1.2.0
Quality pass on the 1.1.0 aviation feature: bug fixes, hardening, and a real test suite. No public CLI surface changed beyond the broadened station-ID validator.
Added
- Pytest suite under
tests/(29 tests) covering parser, renderers, and CLI integration for METAR/TAF, with mocked HTTP fixtures. AGENT.md— architecture invariants and conventions for AI coding agents.- TAF rendering now handles combined change codes like
PROB30 TEMPO. - TAF wind-shear groups are now rendered when present.
Changed
- Station-ID validator accepts alphanumeric identifiers (e.g.
K1G3,0R0) instead of alpha-only, matching FAA conventions. - Multi-record responses now prefer
mostRecent=1, falling back to the newest observation/issue time, instead of positional[0]. - HTTP requests use
params={...}dicts instead of f-string URL building — defense in depth against injection. - Wind-direction
0°and wind-speed0 ktare no longer treated as missing (explicitis not Nonechecks instead of falsyorchains). wx.unitsis the single source for the inHg conversion factor; the hardcoded0.02953constant was removed from the aviation renderer.- Location-alias lookups in
[locations]are now case-insensitive. --days 0and--hours 0are respected instead of falling through to config defaults.- JSON output:
rawno longer duplicated inside thedecodedblock.
Fixed
PROBchange groups withNoneprobability no longer render asPROB0.- Visibility renderer: removed dead code that stripped and re-appended
+. - Wind shear with
Nonedirection no longer prints a misleading000°. - Extra positional arguments after the ICAO code now produce a warning instead of being silently ignored.
Internal
- Dropped
typing.Optionalin favor ofX | None. - Added
WindDir = int | Literal["VRB"] | Nonetype alias. - Inlined the trivial
_roundhelper in the NWS provider. - Documented aviationweather.gov field semantics in the provider docstring.
Full changelog: https://github.com/aeroperf/wx/blob/main/CHANGELOG.md