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/docent.js src/hg/utils/docent/docent.js
index 492076310c3..e48111f3c4f 100755
--- src/hg/utils/docent/docent.js
+++ src/hg/utils/docent/docent.js
@@ -1,25 +1,27 @@
#!/usr/bin/env node
/* docent.js SCRIPT.docent.yaml [OUT.mp4]
*
* Docent -- a language for authoring guided tours of the UCSC Genome Browser.
*
* Render a hand-authored Docent script into a silent mp4 PLUS a named still PNG at
* every `shot:` marker (the figures). One source script -> both outputs, so a figure
- * is literally a frame of the tour. Reuses the shared Playwright/Chromium in ~/pwrec.
+ * is literally a frame of the tour. Reuses the shared Playwright/Chromium install in
+ * /hive/groups/browser/uiTest/pw.
*
- * 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
*
* The high-level verbs bake in the quickLift/Convert mechanics (dbSNP composite
* params, the hideDefaults-reverts-on-assembly-change bug, target lookup) so the
* author writes intent, not selectors. See README.md for the language.
*
* The surface syntax is YAML so ordinary editors highlight it; the language is the
* verb vocabulary layered on top, not the serialization. Scripts are named
* .docent.yaml (a bare .docent also works).
*/
const { chromium } = require('playwright');
const yaml = require('js-yaml');
const fs = require('fs');
const os = require('os');
const path = require('path');