Skip to content

Commit 004370c

Browse files
committed
docs: clarify homepage smoke test setup
1 parent a0af5ac commit 004370c

4 files changed

Lines changed: 19 additions & 5 deletions

File tree

CURRENT_STATE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This repository is a small GitHub Pages static site that publishes a single oral
1313
- A committed `Gemfile` and `.ruby-version` pin the GitHub Pages toolchain for local builds.
1414
- `Figure2-Teeth_v4.1.pdf` and `scripts/render_heatmap.py` provide a reproducible source-to-raster path for `oral-health-heatmap.png`.
1515
- `scripts/check_homepage.py` provides a non-UI smoke test for the rendered homepage.
16+
- `scripts/check_homepage.py` now explains the fresh-checkout default: `_site/index.html` is generated by `bundle exec jekyll build`, or callers can pass a rendered HTML path or live URL.
1617
- The Jekyll config excludes `vendor/`, so the bundled gem tree is kept out of the public site build.
1718
- The validate workflow uses Node 24-compatible `actions/checkout@v6` and `actions/setup-python@v6`.
1819
- `README.CRAWL.md` is explicitly documented as a retained historical artifact in `docs/historical-artifacts.md`.
@@ -25,6 +26,7 @@ This repository is a small GitHub Pages static site that publishes a single oral
2526
- Provenance refinement branch QA passed on 2026-05-19: `docs/heatmap-provenance.md` clearly states that the raw/analysis-ready source dataset is not published, distinguishes PDF/figure-to-PNG regeneration from full data-to-figure regeneration, and documents the Windows/MiKTeX `pdftoppm` temp/log permission blocker.
2627
- `python scripts/validate_repo.py` passed on 2026-05-19 with only the known stale `README.CRAWL.md` warning.
2728
- `python -m compileall scripts` passed on 2026-05-19.
29+
- Homepage smoke-test documentation fix passed `python scripts/check_homepage.py https://mschwar.github.io/data-visualization/` on 2026-05-19.
2830
- A local homepage QA snapshot passed `python scripts/check_homepage.py` and was then captured at desktop and mobile widths in a browser-rendered view.
2931
- The browser captures showed the heatmap image, page heading, and download link in the expected positions with no visible layout regressions.
3032
- Historical artifact governance passed non-UI QA: `python scripts/validate_repo.py`, Python script compilation, policy-doc discoverability checks, and `_config.yml` exclusion checks.
@@ -37,7 +39,7 @@ This repository is a small GitHub Pages static site that publishes a single oral
3739
| `python scripts/validate_repo.py` | Repo validation | Pass with warning about stale `README.CRAWL.md` |
3840
| `python -m compileall scripts` | Python syntax/import compilation check | Pass |
3941
| `python scripts/render_heatmap.py` | Heatmap rebuild | Currently blocked locally by Windows/MiKTeX `pdftoppm` temp/log permission errors |
40-
| `python scripts/check_homepage.py` | Homepage smoke test | Requires `_site/index.html` from a Jekyll build, or an explicit rendered HTML path or URL |
42+
| `python scripts/check_homepage.py` | Homepage smoke test | Requires `_site/index.html` from a Jekyll build; on fresh checkout, pass an explicit rendered HTML path or URL |
4143
| `Invoke-WebRequest https://mschwar.github.io/data-visualization/` | Live site verification | 200 OK |
4244
| `bundle exec jekyll build` | Local Jekyll build | Not run in this environment because Ruby was unavailable at audit time |
4345

@@ -73,5 +75,6 @@ The pinned build path is now committed in-repo, so local build instructions are
7375

7476
## Immediate Next Moves
7577

76-
1. Track the follow-on fixes listed in [docs/agentic-first-buildout-plan.md](docs/agentic-first-buildout-plan.md).
77-
2. Keep historical artifacts documented in [docs/historical-artifacts.md](docs/historical-artifacts.md).
78+
1. QA `feat/homepage-smoke-docs`, update handoff docs with the QA result, then merge it to `main`.
79+
2. Build the deployment check or badge feature from the main buildout sequence after this branch merges.
80+
3. Keep historical artifacts documented in [docs/historical-artifacts.md](docs/historical-artifacts.md).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ bundle exec jekyll build
6565
python scripts/check_homepage.py
6666
```
6767

68-
You can also pass an explicit rendered HTML path or live URL:
68+
On a fresh checkout, `python scripts/check_homepage.py` expects `_site/index.html`, which is generated by `bundle exec jekyll build` and is not committed. If you have not built the site locally, pass an explicit rendered HTML path or the live site URL instead:
6969

7070
```bash
7171
python scripts/check_homepage.py _site/index.html

docs/agentic-first-buildout-plan.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ Start the remaining buildout here:
6868

6969
### 4. Provenance refinement
7070

71-
- Status: next.
71+
- Status: merged to main.
7272
- Goal: tighten the provenance story around the source PDF, the published PNG, and any constraints on regeneration.
7373
- Merge boundary: documentation only.
7474
- Verification: non-UI link/file validation.
7575
- Why fourth: it depends on the regeneration path already being committed.
7676

7777
### 5. Deployment check or badge
7878

79+
- Status: next in the main buildout sequence.
80+
7981
- Goal: add a lightweight live-deploy indicator or a Pages verification step if the repo still needs one.
8082
- Merge boundary: CI/docs only.
8183
- Verification: explicit non-UI command or GitHub Actions status.
@@ -87,6 +89,7 @@ These are known missing or non-working items discovered during repo audit. Keep
8789

8890
### A. Homepage Smoke-Test Documentation Fix
8991

92+
- Status: implemented on `feat/homepage-smoke-docs`; pending QA and merge.
9093
- Problem: `python scripts/check_homepage.py` fails on a fresh checkout until `_site/index.html` exists.
9194
- Fix: document that the command requires `bundle exec jekyll build` first, or pass an explicit rendered HTML path or live URL.
9295
- Verification: run `python scripts/check_homepage.py <rendered-html-or-url>`.

scripts/check_homepage.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111

1212
ROOT = Path(__file__).resolve().parents[1]
1313
DEFAULT_SOURCE = ROOT / "_site" / "index.html"
14+
DEFAULT_SOURCE_HELP = (
15+
"Default homepage HTML is generated by Jekyll and is not committed. "
16+
"Run `bundle exec jekyll build` first, or pass an explicit rendered HTML path "
17+
"or URL such as `python scripts/check_homepage.py "
18+
"https://mschwar.github.io/data-visualization/`."
19+
)
1420
EXPECTED_TITLE = "Oral Health Heatmap | Matthew Schwartz Data Visualization"
1521
EXPECTED_HEADING = "Oral Health Heatmap"
1622
EXPECTED_IMAGE_ALT = (
@@ -77,6 +83,8 @@ def main() -> int:
7783
html = load_html(args.source)
7884
except FileNotFoundError as exc:
7985
print(f"Homepage HTML not found: {exc}", file=sys.stderr)
86+
if Path(args.source) == DEFAULT_SOURCE:
87+
print(DEFAULT_SOURCE_HELP, file=sys.stderr)
8088
return 1
8189

8290
errors = check_homepage(html)

0 commit comments

Comments
 (0)