Skip to content

chore(release): attach the NWS zone dataset from publish.sh - #450

Merged
seevee merged 1 commit into
mainfrom
chore/publish-zone-asset
Nov 28, 2026
Merged

seevee merged 1 commit into
mainfrom
chore/publish-zone-asset

Conversation

@seevee

@seevee seevee commented Nov 28, 2026

Copy link
Copy Markdown
Owner

The zone dataset for #316 isn't committed and isn't in cap_alerts.zip. It goes out as a second asset on the code release that first lists its SHA-256 in KNOWN_ZONE_DATA, and publish.sh could only upload the zip. This adds the flag, so the asset isn't a manual gh release upload each time.

./scripts/publish.sh 0.9.0-alpha.4 --zone-data path/to/nws_zones.jsonl.gz

What it does

  • Uploads the file as cap_alerts.nws_zones.jsonl.gz whatever the built file is called, the same name as ZONE_DATA_FILENAME.
  • Looks the file's hash up in nws_zone_data.py at the commit being tagged, before the tag exists. A file the reader would refuse stops the run with nothing to undo.
  • On a release that already exists, attaches each asset only if it's missing.
  • Without the flag, nothing changes.

CONTRIBUTING.md gets a paragraph on the flag and the build and check steps to run first.

What I tested

Rebuilt the April dataset today from the five shapefiles with --tail-eps 0.02 --gzip. It came out as c985ed4f again, check_zone_dataset.py passed all ten questions, and verify_zone_data loads it. The hash check in the script accepts that file against main and refuses a junk one. I have NOT run a real publish with the flag, CI doesn't exercise this script, so the first alpha cut with it is the real test.

verify @ c4718cc: pytest 2564 passed, 18 skipped, 1 warning; cov 98% (floor 96); flow cov 100%; ruff check ok; ruff format ok; mypy ok; flow_walk skipped

@systems-monitor for your information, this is how the asset from #449 gets onto a release. Nothing needed from you.

Assisted-by: Claude:claude-fable-5-2

The local zone dataset (#316) is not committed and is not part of
cap_alerts.zip: it is published as a second asset on the code release
that first lists its SHA-256 in KNOWN_ZONE_DATA, and the integration
downloads it only when a user asks. publish.sh could only upload the
zip, so the asset would have been a manual gh call on every release
that carries one.

publish.sh <version> --zone-data <file> now attaches it under the fixed
name cap_alerts.nws_zones.jsonl.gz. The file's hash is looked up in
nws_zone_data.py at the commit being tagged, before the tag exists, so
a file the reader would refuse stops the run with nothing to undo. On
a release that already exists each asset is attached only if missing.
Without the flag the script does what it did before.

Assisted-by: Claude:claude-fable-5-2
@seevee
seevee merged commit 229762b into main Nov 28, 2026
9 checks passed
@seevee
seevee deleted the chore/publish-zone-asset branch November 28, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant