Skip to content

Commit 8b6c4a0

Browse files
committed
feat: add homepage smoke test
1 parent 0c48533 commit 8b6c4a0

17 files changed

Lines changed: 746 additions & 1 deletion

.DS_Store

-6 KB
Binary file not shown.

.github/workflows/validate.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Validate
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
validate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.12"
18+
19+
- name: Run repository validation
20+
run: python scripts/validate_repo.py
21+
22+
- name: Set up Ruby
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: "3.3.4"
26+
bundler-cache: true
27+
28+
- name: Build the Jekyll site
29+
run: bundle exec jekyll build
30+
31+
- name: Smoke test homepage
32+
run: python scripts/check_homepage.py

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
Thumbs.db
3+
_site/
4+
Gemfile.lock
5+
__pycache__/
6+
*.pyc

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.4

AGENTS.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# AGENTS
2+
3+
## How To Orient In This Repo
4+
5+
Start with `CURRENT_STATE.md` for the current audit summary, then read `docs/agentic-first-buildout-plan.md` for the branch/PR/QA loop, then read `README.md` for the public-facing intent. The canonical site content lives in `index.md`, the site metadata lives in `_config.yml`, and the primary visualization asset is `oral-health-heatmap.png`.
6+
7+
## Canonical Source-Of-Truth Files
8+
9+
- `CURRENT_STATE.md`: current repository truth and known risks
10+
- `docs/agentic-overhaul/2026-05-audit.md`: fuller audit, maturity scores, and backlog
11+
- `README.md`: public overview of the project
12+
- `index.md`: rendered GitHub Pages content
13+
- `_config.yml`: site title, description, and theme config
14+
- `Gemfile` and `.ruby-version`: pinned local Jekyll toolchain
15+
- `assets/css/style.scss.css`: hand-authored site styling
16+
- `oral-health-heatmap.png`: published visualization asset
17+
- `Figure2-Teeth_v4.1.pdf`: committed source figure for the PNG
18+
- `scripts/render_heatmap.py`: source-to-raster rebuild script
19+
- `scripts/check_homepage.py`: homepage smoke test script
20+
- `docs/heatmap-provenance.md`: provenance and rebuild notes
21+
22+
## Commands To Run Before And After Changes
23+
24+
Before changes:
25+
26+
- `git status --short`
27+
- `python scripts/validate_repo.py`
28+
- `python scripts/render_heatmap.py` if you touch the heatmap source artifact or rebuild notes
29+
- `python scripts/check_homepage.py` if you touch the homepage render or nav
30+
31+
After changes:
32+
33+
- `python scripts/validate_repo.py`
34+
- `bundle exec jekyll build`
35+
- `git status --short`
36+
37+
The repo now pins the local Jekyll toolchain with `Gemfile` and `.ruby-version`. Do not claim build parity unless you have run the pinned build command successfully.
38+
39+
## Generated Vs. Hand-Authored Files
40+
41+
Hand-authored:
42+
43+
- `README.md`
44+
- `index.md`
45+
- `_config.yml`
46+
- `Gemfile`
47+
- `.ruby-version`
48+
- `assets/css/style.scss.css`
49+
- `CURRENT_STATE.md`
50+
- `docs/agentic-overhaul/2026-05-audit.md`
51+
- `AGENTS.md`
52+
- `docs/heatmap-provenance.md`
53+
- `docs/agentic-first-buildout-plan.md`
54+
- `scripts/render_heatmap.py`
55+
- `scripts/check_homepage.py`
56+
57+
Generated or historical artifact:
58+
59+
- `README.CRAWL.md`: historical crawl output with stale machine-local metadata; do not treat as canonical truth
60+
61+
## Data, Citation, And Provenance Rules
62+
63+
- Do not invent dataset provenance, participant counts, or publication claims beyond what is already supported in committed files.
64+
- If you add provenance notes, tie them to already-present citation material or newly committed source artifacts.
65+
- If the image can be regenerated, document the real pipeline; do not guess at unpublished steps.
66+
- Keep the source PDF and rebuild script in sync with `oral-health-heatmap.png`.
67+
68+
## Accessibility And Documentation Expectations
69+
70+
- Preserve meaningful alt text for the main image and any future visual assets.
71+
- Keep README and `CURRENT_STATE.md` aligned when commands or repo structure change.
72+
- Favor small, explicit documentation updates over implied behavior.
73+
74+
## Safe-Change Rules
75+
76+
- Keep the repo lightweight; avoid introducing heavy tooling unless the site grows.
77+
- Do not hand-edit generated artifacts if a real generator is introduced later.
78+
- Prefer edits that preserve GitHub Pages compatibility.
79+
- Avoid deleting historical artifacts unless their role is documented and the removal is clearly safe.
80+
81+
## Known Project-Specific Traps
82+
83+
- `README.CRAWL.md` includes stale machine-local paths and a directory count from another environment.
84+
- The repo now pins the Jekyll toolchain, so local Pages rendering can be verified once Ruby is installed.
85+
- The visualization image is committed, and the committed source PDF plus rebuild script provide the regeneration path.

CURRENT_STATE.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Current State
2+
3+
Audit date: 2026-05-19
4+
5+
## Purpose
6+
7+
This repository is a small GitHub Pages static site that publishes a single oral-health heatmap and explanatory narrative for the Tsimane population of Bolivia. The site is centered on one visualization asset (`oral-health-heatmap.png`), one page of written interpretation (`index.md`), and lightweight Jekyll/Minima configuration for deployment through GitHub Pages.
8+
9+
## Confirmed Working Pieces
10+
11+
- Core content files exist: `README.md`, `index.md`, `_config.yml`, `oral-health-heatmap.png`, and `assets/css/style.scss.css`.
12+
- The site content includes descriptive alt text for the primary visualization.
13+
- A committed `Gemfile` and `.ruby-version` pin the GitHub Pages toolchain for local builds.
14+
- `Figure2-Teeth_v4.1.pdf` and `scripts/render_heatmap.py` provide a reproducible source-to-raster path for `oral-health-heatmap.png`.
15+
- `scripts/check_homepage.py` provides a non-UI smoke test for the rendered homepage.
16+
- A repo-local validation command now checks required files, local links, key config values, and tracked OS junk.
17+
- The live GitHub Pages deployment returned HTTP 200 and served the expected page content in this session.
18+
19+
## Existing Commands
20+
21+
| Command | Purpose | Result |
22+
| --- | --- | --- |
23+
| `python scripts/validate_repo.py` | Repo validation | Pass with warning about stale `README.CRAWL.md` |
24+
| `python scripts/render_heatmap.py` | Heatmap rebuild | Produces the published 1700 x 2200 PNG from the committed PDF source at 200 DPI |
25+
| `python scripts/check_homepage.py` | Homepage smoke test | Verifies the rendered homepage title, heading, heatmap image, alt text, download link, and the absence of README.CRAWL.html |
26+
| `Invoke-WebRequest https://mschwar.github.io/data-visualization/` | Live site verification | 200 OK |
27+
| `bundle exec jekyll build` | Local Jekyll build | Not run in this environment because Ruby was unavailable at audit time |
28+
29+
The pinned build path is now committed in-repo, so local build instructions are canonical even though this environment did not have Ruby installed when the audit started.
30+
31+
## Important Files And Directories
32+
33+
- `README.md`: public-facing repo overview and live site link
34+
- `index.md`: main GitHub Pages content page
35+
- `_config.yml`: GitHub Pages/Jekyll site metadata
36+
- `assets/css/style.scss.css`: hand-authored theme overrides
37+
- `oral-health-heatmap.png`: primary visualization asset
38+
- `Figure2-Teeth_v4.1.pdf`: source PDF for the published heatmap
39+
- `scripts/render_heatmap.py`: reproducible heatmap rebuild script
40+
- `scripts/check_homepage.py`: homepage smoke test script
41+
- `docs/heatmap-provenance.md`: provenance notes and rebuild command
42+
- `scripts/validate_repo.py`: lightweight validation spine
43+
- `docs/agentic-overhaul/2026-05-audit.md`: detailed audit and backlog
44+
- `AGENTS.md`: contributor and agent operating guide
45+
46+
## Stale Or Conflicting Docs And Metadata
47+
48+
- `README.CRAWL.md` contains a machine-local path (`/Users/mschwar/...`) and a historical directory crawl snapshot. It is useful as a historical artifact only and should not be treated as canonical documentation.
49+
- The repo now references a pinned local Ruby/Jekyll toolchain, so local build instructions are canonical from the repo itself.
50+
51+
## Known Risks
52+
53+
- Local GitHub Pages rendering is not reproducible from committed tooling in the current environment.
54+
- Local build execution still depends on having Ruby installed on the host.
55+
- The historical source dataset that fed the original figure is still not published in this repo.
56+
- `README.CRAWL.md` remains as a historical artifact but is excluded from the public site.
57+
58+
## Immediate Next Moves
59+
60+
1. Follow [docs/agentic-first-buildout-plan.md](docs/agentic-first-buildout-plan.md) for the next feature branch.
61+
2. Keep `scripts/render_heatmap.py` and `Figure2-Teeth_v4.1.pdf` in sync if the figure changes.
62+
3. Run `python scripts/check_homepage.py` against `_site/index.html` after a local build if you need a homepage smoke check.

Figure2-Teeth_v4.1.pdf

1.49 MB
Binary file not shown.

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
ruby "3.3.4"
4+
5+
gem "github-pages", "232", group: :jekyll_plugins
6+
gem "webrick"

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This repository showcases a data visualization project designed to represent the complete oral health status of the Tsimane population of Bolivia. The heatmap synthesizes over 32,000 data points from 1,176 individuals into a single, intuitive image, revealing complex patterns of dental health across age, sex, and anatomy.
44

5+
This is a small GitHub Pages static site. The repo currently publishes one primary page (`index.md`) and one primary visualization asset (`oral-health-heatmap.png`).
6+
7+
The repo also pins a local GitHub Pages build path (`Gemfile` and `.ruby-version`) and keeps the committed source figure (`Figure2-Teeth_v4.1.pdf`) with a rebuild script in `scripts/render_heatmap.py`.
8+
9+
For the branch/PR/QA loop used by future agents, see `docs/agentic-first-buildout-plan.md`.
10+
511
---
612

713
## ▶️ View the Live Project
@@ -27,6 +33,38 @@ A 5-point color scale indicates the health status of each tooth, from healthy (b
2733
* `index.md`: The main content file for the GitHub Pages site, written in Markdown.
2834
* `oral-health-heatmap.png`: The high-resolution image of the data visualization.
2935
* `_config.yml`: The configuration file that applies the visual theme to the GitHub Pages site.
36+
* `Figure2-Teeth_v4.1.pdf`: The committed source figure used to regenerate the PNG.
37+
* `Gemfile`: The pinned GitHub Pages and Ruby toolchain.
38+
* `.ruby-version`: The pinned Ruby runtime for local builds.
39+
* `scripts/validate_repo.py`: Lightweight repository validation for future contributors and agents.
40+
* `docs/agentic-first-buildout-plan.md`: Branch/PR/QA loop and feature sequencing guide.
41+
* `scripts/render_heatmap.py`: Rebuild script for the published heatmap PNG.
42+
* `scripts/check_homepage.py`: Smoke test for the rendered homepage HTML.
43+
* `docs/heatmap-provenance.md`: Source artifact and rebuild notes.
44+
45+
## Validate The Repo
46+
47+
Run:
48+
49+
```bash
50+
python scripts/validate_repo.py
51+
python scripts/check_homepage.py
52+
```
53+
54+
This checks for required files, obvious broken local references, key site metadata, committed OS junk files, and the rendered homepage shape.
55+
56+
## Rebuild Locally
57+
58+
This repository pins Ruby 3.3.4 and `github-pages` 232, matching the current GitHub Pages dependency set. To rebuild the site and the heatmap locally:
59+
60+
```bash
61+
bundle install
62+
bundle exec jekyll build
63+
bundle exec jekyll serve --baseurl=""
64+
python scripts/render_heatmap.py
65+
```
66+
67+
The heatmap PNG is regenerated from `Figure2-Teeth_v4.1.pdf` at 200 DPI. The rendered pixels match the published PNG; only PNG encoder metadata can differ.
3068

3169
## Publication Context
3270

_config.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
theme: minima
22
title: Matthew Schwartz | Data Visualization
3-
description: A showcase of data analysis and visualization projects.
3+
description: A showcase of data analysis and visualization projects.
4+
exclude:
5+
- AGENTS.md
6+
- CURRENT_STATE.md
7+
- Figure2-Teeth_v4.1.pdf
8+
- Gemfile
9+
- Gemfile.lock
10+
- README.CRAWL.md
11+
- docs/
12+
- scripts/

0 commit comments

Comments
 (0)