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.jsonin 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.tsenforces the main phrases. - Constants live in one place. Method constants belong in
processing/sartale/config.py; the build copies them intolakes.jsonfor 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
~/.netrclocally and in theearthdataenvironment 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.jsonby 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 change | Edit |
|---|---|
| Page text | app/src/content/*.json |
| The look of the app | app/src/styles.css, app/src/storyPage.css |
| The lakes watched | processing/lakes_in.json, then the pipeline |
| Method constants | processing/sartale/config.py, then lakes-build |
| This guide | docs/guide/pages/*.html, then python docs/guide/build.py |
| Data sources and licences | docs/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.
SARtale Guide