From 05a133b6716efc6bfb3266c844f2eb157005ab0a Mon Sep 17 00:00:00 2001 From: anna-follestad-4ss Date: Tue, 18 Aug 2026 12:47:48 +0200 Subject: [PATCH] fix typos, update docs --- .github/pull_request_template.md | 3 +-- CLAUDE.md | 1 + CONTRIBUTING.md | 2 +- README.md | 11 ++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7ce6a3e..8996c65 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,8 +8,7 @@ ## Definition of done -CI covers the first two. The rest are yours — tick them because you did them, -not because they were already ticked. See `CONTRIBUTING.md` for why each is here. +CI covers the first two. See `CONTRIBUTING.md` for why each is here. - [ ] `pytest` passes - [ ] `black` is clean diff --git a/CLAUDE.md b/CLAUDE.md index 2562950..bf00de3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,6 +3,7 @@ python-dashboard-template/ ├── src/ │ ├── app.py # Main application file │ ├── theme.py # Colours, type scale and the Plotly template +│ ├── memory_log.py # Dev aid: prints RSS memory usage, see LOG_MEMORY │ ├── assets/ # Static files (CSS, images, sample data) │ └── pages/ # One module per page, each with dash.register_page │ ├── home.py diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ef4726..891b5a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ pre-commit install --hook-type pre-push cp .env.example .env # optional; defaults work as-is -python src/app.py # the app, on :8050 +python src/app.py # the app, on :5050 pytest # the tests black . # format pre-commit run --all-files # run configured hooks manually diff --git a/README.md b/README.md index 6a2119e..2840f59 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Requirements are split by purpose: `requirements.txt` is what the dashboard needs to run, `requirements-dev.txt` adds pytest, black and pre-commit, and `requirements-notebooks.txt` adds Jupyter for `notebooks/`. -Then open . Debug mode is on, so saving a file reloads +Then open . Debug mode is on, so saving a file reloads the app. Optional but recommended: `pre-commit install --hook-type pre-commit` runs @@ -32,15 +32,15 @@ they reach CI at all. See `CONTRIBUTING.md` for the full set of hooks. ## Configuration -There isn't much. Two variables come from `.env` (copy `.env.example` and +Five variables come from `.env` (copy `.env.example` and edit it; `.env` is gitignored): -- `DASH_DEBUG` - the only setting with a security consequence: its debug console can run arbitrary Python for anyone who reaches it. Keep it `true` - on your own laptop for hot reloading; set it `false` on anything anyone else can reach. +- `DASH_DEBUG` - the only setting with a security consequence: its debug console can run arbitrary Python for anyone who reaches it. Keep it `true` on your own laptop for hot reloading; set it `false` on anything anyone else can reach. +- `PORT` - which port to listen to. Defaults to 4insight's port (5050). - `MOCK_PLATFORM_HEADER` (and `MOCK_PLATFORM_SPACER`) - see "Fitting the 4insight frame" below. +- `LOG_MEMORY` - toggles the memory logger, which prints the app's RSS memory to terminal every time the user navigates between pages. Defaults to false. -`app.run(debug=DASH_DEBUG)` uses Dash's own defaults (`127.0.0.1:8050`). ## Layout @@ -48,6 +48,7 @@ edit it; `.env` is gitignored): src/ ├── app.py Dash shell: side navigation, mock 4insight header ├── theme.py colours, type scale and the Plotly template +├── memory_log.py dev aid: prints RSS memory usage, see LOG_MEMORY ├── pages/ │ ├── home.py example: an AgGrid over the sample data │ └── analytics.py example: a slicer driving a filtered Plotly chart