Skip to content

algorithm-catalog: event pages, places at any level, Disasters Portal PRs - #250

Merged
kyle-lesinger merged 1 commit into
mainfrom
algorithm-catalog/event-pages
Oct 20, 2026
Merged

kyle-lesinger merged 1 commit into
mainfrom
algorithm-catalog/event-pages

Conversation

@kyle-lesinger

Copy link
Copy Markdown
Member

What

One record now covers an event's public page on science.data.nasa.gov and its algorithm layers. It replaces the hand-kept hazard_event_info.xlsx.

  • Page content in the Submit form: sub-title, Need, intro, US-gov link, region and portal id. It comes with a live preview in the portal's own section order. Events gets Page preview, Copy Markdown, Page JSON and Edit page. Page text is newest-wins over the published event.
  • Locations at any level of interest. A bundled gazetteer sits behind a picker with Narrow / Broaden (Alabama → Montgomery, Alabama), and picked places fill the bbox. The gazetteer has 3.5k eager entries plus 32k US cities loaded lazily, built stdlib-only from Natural Earth + Census.
  • Disasters Portal PR. A request PR whose file carries a page opens a matching PR on Disasters-Learning-Portal/disasters-portal with the event file and its index.ts entry. This is done by .github/workflows/algorithm-catalog-portal-pr.yml → scripts/portal_pr.mjs → src/portal.ts, the same generator the app previews. The PR is opened only after the portal's own biome check, lint:ci and typecheck pass in a checkout. Hand-written portal pages are never overwritten.
  • Portal standards are enforced in rules.ts and validate_data.py, and parity-tested: theme ids, CONTENT_CATEGORIES, 20xx DateString, portal id slug.
  • One-time import of spreadsheet sheet 1 (scripts/import_xlsx.py): 5 events added, 3 gain portal ids. It reports anything it can't map instead of guessing.

Verified

  • validate_data.py and rules_parity_test.py pass, as do npm run typecheck and npm run build.
  • scripts/e2e.mjs passes 30/30 in Chromium. The new checks cover Alabama → Montgomery → back, bbox auto-fill and hand-edit protection, page preview, Edit page, and a PR URL that carries page + places.
  • Against a real disasters-portal@develop checkout, the generated page passes biome ci, lint:ci, typecheck and pnpm build, and renders at /news-events-stories/hurricane-isaias-oct-2026.
  • Dry runs confirmed three cases: a new page is written, a hand-written page (.tsx) is skipped, and a regenerate is idempotent.

Notes

  • The workflow only fires on PRs touching algorithm-catalog/data/requests/**, so this PR doesn't trigger it.
  • Its token is DISASTERS_PORTAL_TOKEN, falling back to PROJECT_TOKEN_FOR_BOARD_READS. Fork PRs are skipped.
  • Generated pages use the portal's placeholder hero (/img/event/template-hero.webp).

… PRs

One record now covers an event's public page on science.data.nasa.gov and its
algorithm layers, replacing the hand-kept hazard_event_info.xlsx.

- Submit form gains "Page content" (sub-title, Need, intro, US-gov link, region,
  portal id) with a live page preview in the portal's section order; Events gets
  Page preview, Copy Markdown, Page JSON and "Edit page". Page text is
  newest-wins over the published event.
- Locations at any level of interest: a bundled gazetteer (Natural Earth +
  Census, stdlib-built) behind a picker with Narrow/Broaden (Alabama ->
  Montgomery, Alabama); picking places fills the bbox until one is typed.
- A request PR carrying a page opens a matching PR on
  Disasters-Learning-Portal/disasters-portal (event file + index.ts entry),
  only after the portal's own Biome lint:ci and typecheck pass in a checkout.
  Hand-written portal pages are never overwritten.
- Portal standards enforced in rules.ts + validate_data.py (theme ids,
  CONTENT_CATEGORIES, 20xx DateString, portal id slug), parity-tested.
- One-time sheet-1 import of the spreadsheet: 5 events added, 3 gain portal ids.
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