feat(tools): just doctor + designer quickstart #194

Merged
peterswimm merged 1 commit from feat/designer-doctor into main 2026-10-07 23:02:49 +00:00
Owner

Scope

Step 2 of the designer-tooling roadmap: the local path for building, plus one page that ties the
whole flow together.

  • tools/doctor.py (stdlib), also runnable as just doctor. It checks a machine for local
    builds. Each missing item prints the brew or pip command that installs it.
    • Required: python ≥ 3.10 and git.
    • Recommended: just, pre-commit and its installed hook, and jsonschema. just check imports
      jsonschema, so the full gate is not stdlib-only.
    • Optional, each named with the command that needs it: ghostscript and poppler (just plates),
      pandoc (just doc), resvg (just assets-raster) and pytest.
    • It exits 1 only when a required tool is missing, so it runs on a fresh machine before just is
      installed. It also prints the repoRoot to set for the Affinity scripts.
  • docs/DESIGNER_QUICKSTART.md: one page from Affinity export to merged PR. It includes a
    no-terminal path (Forgejo web upload plus the build-dist label from #193) and a table of
    common errors. Linked from README.md and the affinity-scripts README.
  • Pre-commit hook names now give the fix: "run just build, or add the build-dist label to
    your PR".

Testing

  • generator/tests/unit/test_doctor.py (4 tests). A missing git fails with exit 1 and prints
    the fix; this is the control that must fail. Missing recommended or optional tools still exit 0.
  • Full suite: PYTHONPATH=. pytest generator/tests: 284 passed. just check: exit 0.
  • Ran on Peter's Mac: it correctly flags pre-commit (the hook file exists but the binary isn't on
    PATH), plus pandoc and resvg as optional.

Impact Statement

  • Existing features: no expected impact. A new script and recipe; the hooks behave the same, only
    their names changed.
  • Public APIs / contracts: none.
  • Schemas: none.
  • Data / artifacts: none. No dist/ change.
  • Integrations: none.
  • Mappings: none.
  • Backward compatibility: fully compatible.

Docs

New docs/DESIGNER_QUICKSTART.md, with links from README.md and the affinity-scripts README.
The no-terminal path assumes #193 (build bot) is merged and its label and secret are set up.

## Scope Step 2 of the designer-tooling roadmap: the local path for building, plus one page that ties the whole flow together. - **`tools/doctor.py`** (stdlib), also runnable as `just doctor`. It checks a machine for local builds. Each missing item prints the `brew` or `pip` command that installs it. - Required: python ≥ 3.10 and git. - Recommended: `just`, `pre-commit` and its installed hook, and `jsonschema`. `just check` imports `jsonschema`, so the full gate is not stdlib-only. - Optional, each named with the command that needs it: ghostscript and poppler (`just plates`), pandoc (`just doc`), resvg (`just assets-raster`) and pytest. - It exits 1 only when a required tool is missing, so it runs on a fresh machine before `just` is installed. It also prints the `repoRoot` to set for the Affinity scripts. - **`docs/DESIGNER_QUICKSTART.md`**: one page from Affinity export to merged PR. It includes a no-terminal path (Forgejo web upload plus the `build-dist` label from #193) and a table of common errors. Linked from `README.md` and the affinity-scripts README. - **Pre-commit hook names** now give the fix: "run `just build`, or add the build-dist label to your PR". ## Testing - `generator/tests/unit/test_doctor.py` (4 tests). A missing **git** fails with exit 1 and prints the fix; this is the control that must fail. Missing recommended or optional tools still exit 0. - Full suite: `PYTHONPATH=. pytest generator/tests`: 284 passed. `just check`: exit 0. - Ran on Peter's Mac: it correctly flags `pre-commit` (the hook file exists but the binary isn't on PATH), plus pandoc and resvg as optional. ## Impact Statement - Existing features: no expected impact. A new script and recipe; the hooks behave the same, only their names changed. - Public APIs / contracts: none. - Schemas: none. - Data / artifacts: none. No `dist/` change. - Integrations: none. - Mappings: none. - Backward compatibility: fully compatible. ## Docs New `docs/DESIGNER_QUICKSTART.md`, with links from `README.md` and the affinity-scripts README. The no-terminal path assumes #193 (build bot) is merged and its label and secret are set up.
feat(tools): just doctor + designer quickstart
Some checks failed
PR policy check / policy-gate (pull_request) Successful in 1s
Block Validation / validate (pull_request) Successful in 54s
Security Scans / Gitleaks secret scan (pull_request) Successful in 24s
Security Scans / Trivy filesystem scan (pull_request) Failing after 30s
Test Generator / lint-workflows (pull_request) Successful in 14s
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 13s
Test Generator / lint-prose (pull_request) Successful in 18s
Copy coverage / Design copy reaching rendered HTML (pull_request) Successful in 25s
Test Generator / test (pull_request) Successful in 3m41s
ee587ed964
tools/doctor.py (stdlib) checks a machine for local builds: python >= 3.10
and git are required; just, pre-commit (+ installed hook) and jsonschema
(which `just check` imports) are recommended; ghostscript, poppler, pandoc,
resvg and pytest are optional and named with the command that needs them.
Each miss prints the brew/pip command that fixes it. Exits 1 only for a
missing required tool, so it runs on a fresh machine before `just` exists
(`python3 tools/doctor.py`, or `just doctor`).

docs/DESIGNER_QUICKSTART.md is one page from Affinity export to merged PR,
with a no-terminal path (Forgejo web UI + the build-dist label from #193)
and an error table. Linked from README.md and the affinity-scripts README.
The pre-commit drift-gate hook names now say how to fix a failure.
peterswimm deleted branch feat/designer-doctor 2026-10-07 23:02:49 +00:00
Sign in to join this conversation.
No description provided.