Skip to content

fix(models): handle zero fallbacks, degenerate rings, and categorical dn - #57

Merged
Reddimus merged 1 commit into
mainfrom
fix/parser-edge-cases
Nov 22, 2026
Merged

Reddimus merged 1 commit into
mainfrom
fix/parser-edge-cases

Conversation

@Reddimus

Copy link
Copy Markdown
Owner

Summary

Fixes five parser edge cases reported in #52–#56:

Testing

  • make format && make lint && make lint-md && make fixtures-check
  • make test CMAKE_ARGS=-DSPC_WARNINGS_AS_ERRORS=ON (all golden and parity tests unchanged)
  • make test-consumers
  • ASan/UBSan and TSan (201/201 each)
  • Live end-to-end: tools/verify_arcgis_metadata.py (39/39 layers) and all 6 live examples

Fixes #52
Fixes #53
Fixes #54
Fixes #55
Fixes #56

@Reddimus
Reddimus merged commit 4f6bbaa into main Nov 22, 2026
14 checks passed
@Reddimus
Reddimus deleted the fix/parser-edge-cases branch November 22, 2026 08:24
@Reddimus Reddimus mentioned this pull request Nov 22, 2026
3 tasks done
Reddimus added a commit that referenced this pull request Nov 22, 2026
## Summary

Sets the version to 0.4.10, dates the changelog section, and moves the
README `GIT_TAG` to `v0.4.10`. The fixes are in #57.

## Testing

- [x] `make test-consumers` passes (checks both README versions)
- [x] `make lint` and `make lint-md` pass
- [x] Public API changes: none beyond #57
Reddimus added a commit that referenced this pull request Nov 23, 2026
## Summary

`parse_storm_reports` took a `(0, 0)` location to mean the Point was
missing (`LonLat` defaults to `(0, 0)`). So a Point at exactly `(0, 0)`
was replaced by the `lon`/`lat` in the properties. A `has_point` flag
now records whether the Point's coordinates were read, and the
properties are used only when they weren't. #57 fixed the same
0-as-absent bug for `magf` and `LABEL`; this is the case it missed.

Nothing else changes: a missing, null, or non-numeric Point still falls
back to the property `lon`/`lat`, and the golden IEM fixture (624
reports, none at `(0, 0)`) gives the same output.

## Testing

- [x] Added `Parser.StormReportPointAtOriginIsKept`. It failed before
the fix (feature 0 came back as `(-97.5, 37.7)`) and passes after it.
- [x] `make test` (210/210, golden and parity unchanged), `make lint`,
`make lint-md`, `make fixtures-check`, `make test-consumers`
- [ ] clang-tidy: not run locally, because Homebrew LLVM 18 can't link
against this Mac's SDK. CI's tidy job covers it.

Fixes #59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment