prop/test/microwaveprop_web
Graham McIntire 764643bc62
test: expand coverage and refactor to idiomatic style
Changes under lib/ (source):
- iemre_fetch_worker: replace `if transient_failure?/1` boolean predicate
  + `if/else` with a classifier that pattern-matches the error reason
  directly, returning `:transient | :permanent`, and dispatch via
  `case`. Three-clause head is clearer than the boolean predicate.
- scores_file.extract_points and nexrad_client.extract_box: force `//1`
  step on the row/col comprehensions so an image box whose centre
  lands outside the raster collapses to an empty iteration instead
  of firing Elixir 1.19's ambiguous-range warning. Adds a regression
  test for the right-edge box.

Test coverage added:
- Feature wrappers in Backtest.Features (theta_e_jump, shear_at_top,
  duct_thickness, best_duct_freq, duct_usable_for_band,
  distance_to_front / parallel_to_front stubs, all_features/0).
- NotifyListener handle_info tolerance for malformed payloads +
  unknown messages, plus the PubSub broadcast side effect.
- Viewshed.effective_reach_km across every verdict / diffraction
  tier / ducting-score tier combination.
- SnmpClient parse_af60_output unit conversions + unknown-column
  handling; parse_snmpget_output OID normalisation and junk-line
  tolerance.
- HrrrNativeClient native_level_count, native_variables,
  native_messages shape, duct_messages / duct_byte_ranges.
- Changeset coverage for GeomagneticObservation, SolarFluxObservation,
  SolarXrayObservation, Ionosphere.Observation, HrrrClimatology, and
  Metar5minObservation — lifted each from ~50% / 0% to 100%.
- Property tests: GefsClient.dewpoint_from_rh invariants (Td ≤ T,
  monotonic in RH, finite across the operating envelope) + idempotent
  nearest_run. NexradClient.pixel_to_dbz monotonicity + bounded
  output; latlon_to_pixel round-trip for every grid cell.

Also cleared several unrelated compiler/linter warnings:
- Three private test helpers (create_contact, insert_contact,
  current_hour) had `\\ %{}` / `\\ 0` defaults that no caller used.
- profiles_file_test bound `dir` in a pattern match without using it.

Suite: 2,359 tests + 146 properties pass (was 2,300 / 139); coverage
70.38% → 70.89%; credo strict clean.
2026-04-23 13:28:42 -05:00
..
controllers fix(probes): stop DB saturation from SIGKILLing every pod 2026-04-21 16:00:04 -05:00
live test: expand coverage and refactor to idiomatic style 2026-04-23 13:28:42 -05:00
plugs test(property): add property tests for propagation scoring + CIDR matcher 2026-04-21 13:57:12 -05:00
analytics_test.exs feat: harden /map analysis breakdown + move Plausible to root layout 2026-04-21 15:56:30 -05:00
live_table_footer_test.exs Show windowed page list in live_table footer 2026-04-13 10:02:19 -05:00
metrics_log_suppression_test.exs fix(web): suppress HEAD request logs 2026-04-22 16:50:58 -05:00
skew_t_property_test.exs test(property): add property tests for terrain + atmospheric math 2026-04-21 13:56:39 -05:00
skew_t_test.exs Fix credo warnings: length/1 on list and nested module aliases 2026-04-16 08:49:25 -05:00
user_auth_test.exs Beacon power in mW, settings tweaks 2026-04-08 12:45:35 -05:00