SARtale Guide

Contributing

Small, tested changes with a clear reason are the easiest to review. Every number on the site must trace back to the data or a cited source.

Before you open a pull request#

npm --prefix app test -- --run
npm --prefix app run build
cd processing && conda run -n sartale pytest tests -q

All three must pass. Add a test for each change in behaviour, next to the code it covers: app/src/*.test.ts or processing/tests/test_*.py.

Ground rules#

  • Numbers come from the data. Use a token from lakes.json in page text rather than typing a figure. If a number is not in the data, cite its source next to it.
  • Screening, not official warning. "Watch" and "Alert" are the names of levels, never a flood, GLOF or outburst alert. Do not describe a status as a hazard, a risk or a prediction, or a lake as safe, and keep "official warnings come from PMD, NDMA, GBDMA and PDMA". The wording check in content.ts enforces the main phrases.
  • Constants live in one place. Method constants belong in processing/sartale/config.py; the build copies them into lakes.json for the app.
  • Same track only. Never compare areas across tracks or viewing directions: each pass is compared with its own track's baseline (an Alert's two passes may be on different tracks, each against its own).
  • No secrets in the repository. Earthdata logins stay in ~/.netrc locally and in the earthdata environment on GitHub; other keys in a git-ignored .env.local.
  • Data stay out of git. Downloaded windows live in data/, which is ignored.
  • Lake requests are issues. Accept or reject them on GitHub as described in Lake requests; do not edit requests.json by hand, because the workflow rewrites it.

Changing the method#

A change to the water rule, the DEM mask, the zone or the level rule changes every number on the site and in both videos. Run the whole pipeline, check that the Attabad gate still passes, compare the new lakes.json with the old one, and say in the pull request which lakes changed status and why.

Where to look#

To changeEdit
Page textapp/src/content/*.json
The look of the appapp/src/styles.css, app/src/storyPage.css
The lakes watchedprocessing/lakes_in.json, then the pipeline
Method constantsprocessing/sartale/config.py, then lakes-build
This guidedocs/guide/pages/*.html, then python docs/guide/build.py
Data sources and licencesdocs/DATA_SOURCES.md

AI tools#

AI tools helped write the code, the copy and the videos; none runs in the pipeline or the app. What each tool did is recorded in SI_USE.md. Update it when you use one for a contribution.

Licence#

Code is under the Apache License 2.0. By contributing, you agree that your contribution is licensed the same way.