QuantEcon / QuantEcon/test-lecture-theme-sphinx

Harness job: Playwright rendered checks against this build's own docutils XML, published under /_harness/

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
0
Forks
0
Avg merge
28m
Merged PRs (30d)
6

Description

Layer 3 of the theme-parity testing model (QuantEcon/project-theme-parity#13), the Sphinx side. Decided 2026-09-17 (mmcky): the Playwright runs live in the test repositories, each against its own fresh build; QuantEcon/project-theme-parity#15 pairs and compares what they publish.

What this repository adds

The build workflow stays as it is: the production lecture repositories' composite actions (quantecon/actions@v0), in the build image pinned by digest that both corpora share (D14, which amends D4 for the execution environment). A separate job runs after it:

  1. Engine output: jb build --builder custom --custom-builder xml alongside the HTML build; the docutils XML for every page is published in the Pages artifact under /_xml/.
  2. tests/harness/: a Playwright project modelled on quantecon-book-theme/tests/visual, serving the built _build/html statically. Its locator file maps every family id in project-theme-parity's bin/families.yml to this theme's DOM (div.cell_input, div.cell_output, div.admonition.note, div.proof.theorem, div.math, figure, mjx-container, …) and to the site features (launch buttons, downloads, dark mode, sidebar and in-page TOC, prev/next, search, footer, code copy, output scroll and collapse, footnote and citation hovers, mobile nav, keyboard nav, print, MathJax assistive MathML).
  3. Checks, the contract shared with the mystmd repository: drawn (rendered count equals the XML count for the family on the page), text present (numbering and captions), behaviour (toggles, anchors, copy, launch targets, dark mode persistence, TOC, prev/next), error markers (mjx-merror, .system-message, .problematic), console clean; at desktop 1280, tablet 820 and phone 390, light and dark.
  4. Metrics and crops: per family and page, computed font size and line height relative to body, colour, background, WCAG contrast, width relative to the column; an element-level PNG per family, page, viewport and scheme, named by family id.
  5. Publication: _harness/rendered.csv, _harness/metrics.csv, _harness/crops/… in the Pages artifact at every push to main, so a pass can cite them by URL and commit.

Exit

/_xml/ and /_harness/ are live on the site; the job is green; a drawn failure on any page fails the job. Coordinated with the mystmd repository's twin item so both publish the same CSV schema.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing build workflow and tests/harness/visual model, then read project-theme-parity's bin/families.yml and the coordinated mystmd item. Run the jb XML build and Playwright checks against _build/html at the three stated viewports and both schemes. Done means /_xml/ and /_harness/ are published, the job is green, and rendered.csv and metrics.csv are available with a drawn failure causing failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, playwright
Domain
ci-cd, documentation, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.