Skip to content

Make reader notebooks visual, concise, and self-contained - #54

Merged
noelEOS merged 1 commit into
mainfrom
docs/visual-notebooks
Nov 22, 2026
Merged

noelEOS merged 1 commit into
mainfrom
docs/visual-notebooks

Conversation

@noelEOS

@noelEOS noelEOS commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Summary

Updates the three Colab reader notebooks in notebooks/ to be more visual, concise, and readable on GitHub while staying self-contained in Colab and keeping all technical accuracy intact:

  • Committed offline figures and outputs: 02_is_my_model_supported.ipynb and 03_bring_your_own_cnn.ipynb now ship with executed offline stdout and lightweight matplotlib PNG figures (57 to 90 KB each), while 01_quickstart.ipynb displays the validated Sun Moon Lake 3-panel figure right at the top and adds live preview and 3-panel matplotlib plots in Colab.
  • Self-contained Colab helpers: Moved boilerplate (Stop, wait_for, offline ApiTestCase switching, export polling, and plotting helpers) into one collapsed form cell per notebook, cutting visible code in 03_bring_your_own_cnn.ipynb by 56% (389 to 173 lines).
  • Concise, direct prose: Rewrote all prose to be shorter and more natural (total prose across the three notebooks dropped from 2,165 words to 937 words, -57%), kept caveats clear and concise, and removed all em-dashes.
  • Output hygiene tests: Replaced the blank-outputs rule in tests/test_notebooks.py with hygiene checks verifying empty install cells, zero error outputs, valid PNGs under 300 KB, no private values in cell sources or outputs, and zero em-dashes.

Base revision

d7e9214 (origin/main)

Changed files

  • Notebooks:
    • notebooks/01_quickstart.ipynb
    • notebooks/02_is_my_model_supported.ipynb
    • notebooks/03_bring_your_own_cnn.ipynb
  • Tests:
    • tests/test_notebooks.py

Verification

Run on the final rebased commit 37d5d2c:

  • PYTHONPATH=. python tools/graph_identity.py --check docs/evidence/l00-golden-graphs.json --resources .: 45 of 45 graphs equal (36 fixture + 9 trained, 0 cloud calls)
  • PYTHONPATH=. python tools/graph_identity.py --check-ext docs/evidence/x00-g1ext-golden-graphs.json: 19 of 19 graphs equal
  • PYTHONPATH=. python tools/block_catalogue.py --check: docs/building-blocks.md is in sync with the blocks' METADATA
  • PYTHONPATH=. python -m pytest -q tests/test_notebooks.py: 26 passed in 5.18s

Full offline suite run prior to the 2-commit rebase onto origin/main (neither upstream commit touched notebooks/ or tests/test_notebooks.py):

  • PYTHONPATH=. python -m pytest -q: 4185 passed, 11 skipped, 190 subtests passed (hosted CI will run the full offline suite on 37d5d2c)

No live fixtures or Earth Engine calls were run (no library blocks or converter rules changed).

Limitations and open questions

  • Live Earth Engine cells (01 steps 5 and 8, 03 step 10) keep empty outputs in this PR because no Earth Engine calls were run here; 01 embeds the already-validated docs/images/water_chip_224.png at the top so GitHub visitors immediately see the result.
  • If you run 01_quickstart.ipynb in Colab later and want to save its live PNG outputs into the notebook, tests/test_notebooks.py will verify they remain clean of private project IDs, paths, and oversized blobs.

@noelEOS
noelEOS merged commit 56cb457 into main Nov 22, 2026
3 checks passed
@noelEOS
noelEOS deleted the docs/visual-notebooks branch November 22, 2026 06:58
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