Skip to content

fix(data): only rewrite the climate and carbon mirrors when the data … - #61

Merged
Hotragn merged 1 commit into
mainfrom
world-40-sea-level
Aug 22, 2026
Merged

fix(data): only rewrite the climate and carbon mirrors when the data …#61
Hotragn merged 1 commit into
mainfrom
world-40-sea-level

Conversation

@Hotragn

@Hotragn Hotragn commented Aug 22, 2026

Copy link
Copy Markdown
Owner

…changed

Both payloads carry a build timestamp, so every scheduled run produced a diff whether or not NASA, the Met Office, or NOAA had published anything. That made the "No change" branch in climate-data.yml and carbon-data.yml dead code and cost the repository a commit a month per mirror.

Same guard fetch_seaice.py already uses: load the existing file, compare everything except the timestamp, return without writing if they match. The timestamp sits under "meta" in these two rather than at the top level, so it is the meta block that gets stripped for the comparison. Wrapped in try/except (OSError, ValueError) so an unreadable or non-JSON file is simply overwritten.

Verified by running each script twice: the second run reports the file is already current and leaves it byte-identical.

What & why

How to test

Checklist

  • npm run build passes locally.
  • npx vitest run passes (added or updated tests for new logic where it makes sense).
  • No fake data. Every number this PR puts on screen traces to a data source or a documented calculation.
  • Anything simulated is labeled as simulated in the UI, right where it appears.
  • If this adds or changes a data source, its license and endpoint are logged in docs/DATA_SOURCES.md in this same PR.
  • The project stays keyless — no new required API keys or .env config (a new source needing a key ships with a keyless fallback).
  • Positioning still goes through lib/geo.ts; the globe mesh is not rotated (coordinate convention is locked).
  • No new per-frame allocations in useFrame loops; heavy scenes stay dynamically imported (60fps budget on integrated graphics).

The honesty rule

This project's credibility rests on one rule: every number on screen traces to a real data source or a documented calculation, and anything simulated is labeled as simulated. By opening this PR you confirm your change respects it.

Screenshots / recording

…changed

Both payloads carry a build timestamp, so every scheduled run produced a diff
whether or not NASA, the Met Office, or NOAA had published anything. That made
the "No change" branch in climate-data.yml and carbon-data.yml dead code and
cost the repository a commit a month per mirror.

Same guard fetch_seaice.py already uses: load the existing file, compare
everything except the timestamp, return without writing if they match. The
timestamp sits under "meta" in these two rather than at the top level, so it
is the meta block that gets stripped for the comparison. Wrapped in
try/except (OSError, ValueError) so an unreadable or non-JSON file is simply
overwritten.

Verified by running each script twice: the second run reports the file is
already current and leaves it byte-identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
h-o-t-earth Ready Ready Preview Aug 22, 2026 6:27am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hot-earth-docs Ignored Ignored Aug 22, 2026 6:27am

@Hotragn
Hotragn merged commit 2781624 into main Aug 22, 2026
9 checks passed
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