The published sheets are a four-page PDF and four 300 dpi PNG images. HTML and SVG are intermediate formats for rendering and local inspection.
Use Python 3.10 or later, pip 25.1 or later, and Poppler (brew install poppler on macOS;
apt install poppler-utils on Ubuntu).
python -m pip install --group dev
python -m playwright install chromium
python scripts/build_sheets.pyThe PDF and four PNGs are written to output/. Each PNG is rendered from the PDF.
Local builds are excluded from Git; reviewed files are kept in sheets/.
For a quick local preview of selected cases:
python src/metronotation --category PLL -o output/pll.html --open
python src/metronotation --case OLL-25 --case OLL-37 -o output/cases.html --open| Content | Location |
|---|---|
| Published PDF and PNGs | sheets/ |
| Canonical algorithms and source photographs | algorithms/ |
| Parsing, cube simulation and rendering | src/metronotation/ |
| Build and validation commands | scripts/ |
| Design and grouping specifications | docs/design.md, docs/grouping.md |
| Regression tests | tests/ |
The Markdown master is the single source of algorithm text. Preserve its spelling, move order and regrip positions when changing the presentation. Algorithm corrections require source comparison before updating the regression hash.
ruff check src scripts tests
ruff format --check src scripts tests
python scripts/check_algorithms.py --require-complete --photos
python -m unittest discover -s tests -v
python scripts/update_grouping.py --check
python scripts/check_sheets.py outputAfter changing grouping rules, run python scripts/update_grouping.py and
review its diff. These checks cover source tokens, cube states, diagram geometry
and PDF content. The sheet check renders the PDF and compares all four PNGs.
Inspect all four sheets at full-page and reading sizes. Check column alignment, row spacing, color distinction, endpoint openings and text bounds. Include T / H / Aa, OLL 14 / 25 / 37 / 41 / 42 and F2L 7 / 8 / 26 / 37 in close-ups. Repeat the visual check on the published PDF.
Check sheets runs on pushes and pull requests. It builds the PDF and PNGs,
checks that generated and published drawings match, and retains the generated
files as the metro-notation artifact for seven days.
Use this artifact for distribution: local font shaping can differ from the
workflow's output. After a visual change, the comparison with sheets/ will fail;
review the artifact, copy its five files into sheets/, and commit them.
The README displays the PNGs at a reduced size.
Keep tagged release attachments unchanged. Intermediate HTML is
built in a temporary directory and is not distributed.
Keep the version in src/metronotation/__init__.py and CHANGELOG.md in sync.
The website is served at https://kitao.dev/metro-notation/ using Cloudflare
Workers Static Assets. It uses the README as its page content and copies the
five reviewed files from sheets/ unchanged. Page layout lives in web/;
dist/ is generated and excluded from Git.
The page loads Noto Sans JP from Google Fonts for English and Japanese.
The OG image in web/og.png fits the reviewed sheets/pll.png into a white
1200 × 630 canvas without cropping. After updating the PLL sheet, regenerate it
with node scripts/build-og.mjs and review the image at full and thumbnail sizes.
This uses the same Playwright Chromium installation as the website checks.
Use Node.js 24 or later:
npm ci
npx playwright install chromium webkit
npm run check
npm run devThe miniflare override in package.json selects a patched undici HTTP client.
Remove it once Miniflare's pinned dependency includes the fixes in undici 7.30.1.
npm run check includes browser tests with phone emulation, which does not replace
checks on real devices. Open http://127.0.0.1:4177/metro-notation/. The preview
uses the Cloudflare runtime, including its redirects, headers, and 404 behavior.
The four PNGs provide an overview; opening an image does not provide a
separate zoom viewer. Checks and deployment rebuild the same dist/, so stop
npm run dev first.
After reviewing the page and explicitly approving publication, run locally:
npm run deployDeployment runs the website checks and build first, and stops if this repository has uncommitted changes. Authentication uses existing OAuth credentials protected by the OS keychain and stops if that storage is unavailable; API token/key environment variables are rejected. Do not use plaintext credential files. GitHub Actions checks and builds the website without deploying it or storing Cloudflare credentials.
The suffix wildcard in kitao.dev/metro-notation* also matches query strings on
the slashless URL, as in the Keynote setup. Static Assets redirects these to
/metro-notation/ while preserving the query string. This avoids a separate
zone redirect rule. Files are published only inside the metro-notation/
directory; other paths have no matching assets and return 404.
After publication, check the page and all five sheet links, compare the public
files with sheets/, and verify the trailing-slash redirect and unknown-path 404s.