You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
9. Add the same Streamlit URL into `quarto/index.qmd` under the "Static site vs interactive app" section so users on Pages can jump to the live app.
83
83
84
+
### Streamlit deployment notes (lessons learned)
85
+
86
+
These defaults now reflect issues encountered during deployment and the fixes applied in-repo:
87
+
88
+
-**Pin Python for Cloud builds:** keep both [`runtime.txt`](runtime.txt) and [`.python-version`](.python-version) set to `3.12`. This avoids unsupported runtime combinations where dependencies (for example `pyarrow`) may fall back to source builds.
89
+
-**Dependency files:** Streamlit installs Python deps from [`requirements.txt`](requirements.txt). Keep `packages.txt` for apt/system packages only; do **not** put pip specifiers there.
90
+
-**CSV schema guardrails:** the app expects HDB-like resale columns (at least `month`, `resale_price`). If you point the sidebar to a non-HDB CSV, the app now warns clearly and avoids silent bad fallbacks.
91
+
-**Fallback order:** when the default raw resale file is missing, the app tries auto-download (if enabled), then safe built-in alternatives, and uses tiny fixtures only as a last resort.
92
+
-**Map and rent auto-bootstrap:** optional Cloud toggles can auto-fetch full planning-area GeoJSON and official median-rent CSV so **Map & blocks** and **Rental yield** do not stay on minimal fixtures.
93
+
94
+
Recommended Streamlit Cloud secrets (copy from [`.streamlit/secrets.toml.example`](.streamlit/secrets.toml.example)):
95
+
96
+
```toml
97
+
SINGAPORE_EDA_AUTO_DOWNLOAD_ON_MISSING = "1"
98
+
SINGAPORE_EDA_BOOTSTRAP_MAX_ROWS = "20000"
99
+
SINGAPORE_EDA_AUTO_DOWNLOAD_RENT_ON_MISSING = "1"
100
+
SINGAPORE_EDA_RENT_BOOTSTRAP_MAX_ROWS = "200000"
101
+
SINGAPORE_EDA_AUTO_FETCH_GEO_ON_TINY = "1"
102
+
```
103
+
84
104
## Production: data.gov.sg limits, cache, health API, ops UI
85
105
86
106
Official **per-10-second** limits (see [`API rate limits`](https://guide.data.gov.sg/developer-guide/api-overview/api-rate-limits)) depend on whether you use an API key and its **tier**:
0 commit comments