Skip to content

Commit ce8033a

Browse files
committed
chore(deps): requirements-dev.txt pinning Playwright + jsonschema (#95 / #94)
Pins the two third-party Python packages that the repo's dev tooling imports, so a fresh clone is reproducible without ambient pip state: - playwright>=1.54,<2.0 — tools/capture-gallery-hero.py (#67 / #94 hero PNG) - jsonschema>=4.0,<5.0 — verify-plugin.sh, verify-security.sh, verify-seed-expectations.sh, mock-bootstrap.sh, generate-spec-anchor-audit.py Preview Forge is not a Python package, so no pyproject.toml — a plain requirements-dev.txt matches the script-driven nature of the Python side. The capture-gallery-hero.py docstring now references the new install contract. Verified: - python3 -m pip install -r requirements-dev.txt (fresh venv) — succeeds - bash scripts/verify-plugin.sh — Pass: 57 / Fail: 0 - bash tests/fixtures/security/verify-security.sh — all defenses holding - bash tests/e2e/mock-bootstrap.sh {standard,pro,max} — PASS x3
1 parent 2136c56 commit ce8033a

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

requirements-dev.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Dev-only Python dependencies for Preview Forge tooling.
2+
#
3+
# Install:
4+
# python3 -m pip install -r requirements-dev.txt
5+
#
6+
# Browser binaries for Playwright (one-off, after the pip install above):
7+
# python3 -m playwright install --with-deps firefox chromium
8+
#
9+
# Preview Forge is NOT a Python package (no installable source / __init__.py).
10+
# These pins exist so the handful of Python *scripts* and *tools* that the
11+
# repo ships are reproducible without ambient pip state. JS-side tooling
12+
# stays in package.json / pnpm-workspace.yaml.
13+
14+
# ---------------------------------------------------------------------------
15+
# Hero screenshot helper
16+
# tools/capture-gallery-hero.py — regenerates docs/assets/v1.6-gallery-hero.png
17+
# (the README/SUBMISSION above-the-fold gallery hero, #67 / #94).
18+
# ---------------------------------------------------------------------------
19+
playwright>=1.54,<2.0
20+
21+
# ---------------------------------------------------------------------------
22+
# JSON Schema validation (used by several verify-* shell harnesses that
23+
# embed `python3 -c "import jsonschema; ..."`):
24+
# - scripts/verify-plugin.sh (profiles schema check)
25+
# - tests/fixtures/security/verify-security.sh (I-7 / S-3 defenses)
26+
# - tests/fixtures/seed-expectations/verify-seed-expectations.sh
27+
# - tests/e2e/mock-bootstrap.sh (previews schema, fail-closed in CI)
28+
# - scripts/generate-spec-anchor-audit.py (optional; degrades gracefully)
29+
# ---------------------------------------------------------------------------
30+
jsonschema>=4.0,<5.0

tools/capture-gallery-hero.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
1717
Determinism: fonts loaded, animations disabled, viewport pinned, file://
1818
URI. Re-running on the same gallery.html produces a byte-stable PNG.
19+
20+
Setup (#95 / #94 follow-up — Playwright is now a pinned dev dependency):
21+
22+
python3 -m pip install -r requirements-dev.txt
23+
python3 -m playwright install --with-deps firefox chromium
24+
25+
See requirements-dev.txt and CONTRIBUTING.md ("Python dev setup") for the
26+
full contract. Previously this script relied on an ambient `playwright`
27+
install; the pin makes it reproducible on a fresh clone.
1928
"""
2029
from __future__ import annotations
2130

0 commit comments

Comments
 (0)