3d8157de7ba1d2e846856deda743e0aae39b0dda braney Tue Aug 25 16:31:36 2026 -0700 docent: use the shared Playwright install instead of a private ~/pwrec tree, refs #38188 PW_ENV in docent.mk and in the tests makefile named $(HOME)/pwrec, a tree that only existed in one home directory, so nobody else could run docent or its tests without setting the variable by hand. Both now default to /hive/groups/browser/uiTest/pw, one pinned copy of playwright, chromium, ffmpeg and js-yaml shared by every browser-driving test in the tree. A new PW_DIR variable still points either makefile at a private install. Nothing in docent.js changes except two comment lines. All nine docent tests and all three derivation baselines pass against the shared pin. diff --git src/hg/utils/docent/README.md src/hg/utils/docent/README.md index 7149367b00a..5067b728150 100644 --- src/hg/utils/docent/README.md +++ src/hg/utils/docent/README.md @@ -14,37 +14,39 @@ So a published figure is literally a frame of the tour, and the two can never drift apart. A session file goes further: it hands back the state itself, so a reader can open the view the figure was taken from instead of only looking at it. The surface syntax is YAML — so ordinary editors highlight it and no one has to learn a new parser — but the language is the verb vocabulary layered on top, not the serialization. Scripts are named `<base>.docent.yaml` (a bare `<base>.docent` works too). The verbs deliberately encode *browser mechanics* rather than selectors: `convert:` knows that the Hide-defaults checkbox reverts when the Assembly menu reloads, `track: {clinvar: pack}` asks trackDb which containers and checkboxes that implies, and `mouseover:` knows that a lifted track's DOM id gains a per-run `hub_<n>_` prefix. The author writes intent; the renderer deals with the UI. ## Run ``` -PLAYWRIGHT_BROWSERS_PATH=~/pwrec/browsers NODE_PATH=~/pwrec/node_modules \ +PW=/hive/groups/browser/uiTest/pw +PLAYWRIGHT_BROWSERS_PATH=$PW/browsers NODE_PATH=$PW/node_modules \ node docent.js AP1.docent.yaml ``` -Needs `playwright`, `js-yaml`, and `ffmpeg`. At UCSC these live in a shared install at -`~braney/pwrec` (`pwrec/browsers` for Chromium, `pwrec/node_modules` for the modules) — -point the two variables above anywhere you have them. +Needs `playwright`, `js-yaml`, and `ffmpeg`. At UCSC these live in one pinned shared +install at `/hive/groups/browser/uiTest/pw` (`browsers` for Chromium, `node_modules` +for the modules), which every browser-driving test in the tree uses; its `README.md` +records the pinned versions. Point the two variables above anywhere you have them. Outputs, relative to the script's own directory: - mp4 → `../<base>.mp4` (override with `mp4:` or a second argument) - stills → `stills/<base>/<name>.png` (override with `stills:`) - sessions → `sessions/<base>/<name>.txt` (override the parent with `sessions:`) `docent.mk` in this directory has the make rules — include it from a project that keeps a set of scripts and it rebuilds only the ones whose source changed. See the usage comment at the top of that file. ## Top of file (all optional) ```yaml target: genome-test # or rr, hgwdev, hgwbeta, hgwdev-<user>, or a full https://.../cgi-bin