Skip to content

wx 1.2.0

Choose a tag to compare

@aeroperf aeroperf released this 18 May 07:03
· 4 commits to main since this release

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-speed 0 kt are no longer treated as missing (explicit is not None checks instead of falsy or chains).
  • wx.units is the single source for the inHg conversion factor; the hardcoded 0.02953 constant was removed from the aviation renderer.
  • Location-alias lookups in [locations] are now case-insensitive.
  • --days 0 and --hours 0 are respected instead of falling through to config defaults.
  • JSON output: raw no longer duplicated inside the decoded block.

Fixed

  • PROB change groups with None probability no longer render as PROB0.
  • Visibility renderer: removed dead code that stripped and re-appended +.
  • Wind shear with None direction no longer prints a misleading 000°.
  • Extra positional arguments after the ICAO code now produce a warning instead of being silently ignored.

Internal

  • Dropped typing.Optional in favor of X | None.
  • Added WindDir = int | Literal["VRB"] | None type alias.
  • Inlined the trivial _round helper in the NWS provider.
  • Documented aviationweather.gov field semantics in the provider docstring.

Full changelog: https://github.com/aeroperf/wx/blob/main/CHANGELOG.md