Skip to content

Commit 532d52d

Browse files
committed
docs(contributing): Python dev setup section (#95 / #94)
Adds a "Python dev setup (optional, for tooling / verify-* scripts)" subsection under "Local setup", documenting the requirements-dev.txt contract added in the preceding commit (Playwright + jsonschema) and the optional `playwright install` step for hero-screenshot regen. Notes that Preview Forge is not a Python package (no pyproject.toml) and that verify-plugin.sh degrades gracefully on missing jsonschema locally but is fail-closed in CI.
1 parent ce8033a commit 532d52d

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,36 @@ claude --plugin-dir ./plugins/preview-forge
6060

6161
Inside Claude Code, try `/pf:help` to see the 14 commands.
6262

63+
### Python dev setup (optional, for tooling / verify-\* scripts)
64+
65+
Preview Forge is primarily JavaScript / Markdown, but a handful of Python
66+
scripts and tools ship with the repo (hero screenshot helper, schema
67+
validators embedded in `verify-*` shell harnesses, hooks under
68+
`plugins/preview-forge/hooks/`). Two third-party packages are pinned in
69+
[`requirements-dev.txt`](./requirements-dev.txt):
70+
71+
- **`playwright`** — used by `tools/capture-gallery-hero.py` to regenerate
72+
`docs/assets/v1.6-gallery-hero.png` (#67 / #94).
73+
- **`jsonschema`** — used by `scripts/verify-plugin.sh`,
74+
`tests/fixtures/security/verify-security.sh`,
75+
`tests/fixtures/seed-expectations/verify-seed-expectations.sh`, and
76+
`tests/e2e/mock-bootstrap.sh` for schema validation.
77+
78+
Install (once, ideally in a venv):
79+
80+
```bash
81+
python3 -m venv .venv && source .venv/bin/activate # optional but recommended
82+
python3 -m pip install -r requirements-dev.txt
83+
84+
# Only if you need to regenerate the hero screenshot:
85+
python3 -m playwright install --with-deps firefox chromium
86+
```
87+
88+
The repo is **not** a Python package — there is no `pyproject.toml` /
89+
`setup.py`. `requirements-dev.txt` documents the contract; nothing is
90+
installed by `bash scripts/verify-plugin.sh` itself (it degrades gracefully
91+
when `jsonschema` is missing, except in CI where it is fail-closed).
92+
6393
## Contribution types
6494

6595
### 1. 📚 LESSON (most welcome)

0 commit comments

Comments
 (0)