docs: vendor OpenROAD sources instead of fetching master - #4414
docs: vendor OpenROAD sources instead of fetching master#4414vvbandeira wants to merge 4 commits into
Conversation
conf.py fetched three files from OpenROAD master at build time and spliced them with regex guarded by bare assert. A heading rename upstream broke the build with a message naming neither file nor fix, python -O stripped the guard entirely, and the docs tracked master rather than the pinned tools/OpenROAD submodule. Sources are vendored at the submodule SHA under docs/_vendor and refreshed by the existing update-OR cron job, so the build makes no network calls and check_vendored_docs.py fails the submodule bump instead of the docs build. Only the Supported Operating Systems section of index.md is vendored, not the whole landing page: conf.py consumes nothing else, and the surrounding prose trips this repo's blocked-content check. Vendored copies keep upstream trailing whitespace so the refresh stays idempotent, so .gitattributes exempts them from whitespace checking. Drops docs/SupportedOS, which Sphinx published as an orphan copy of OpenROAD's landing page. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Read the Docs default runtime moved past 3.10; pydata-sphinx-theme's pinned Sphinx no longer builds under 3.13+, so pin RTD to 3.12 explicitly instead of trusting the default. pip-compile has a compatibility bug with recent pip, so lock regeneration now uses `uv pip compile`. Unpin sphinx-external-toc in requirements.in so uv can resolve a compatible version, and regenerate requirements_lock.txt accordingly. Add `make venv` (docs/Makefile) to encapsulate venv creation + locked-deps install, since the interpreter and lock tool are no longer implied by a bare `pip install`. Exclude `build`, `.venv*`, and `venv` in conf.py so a local virtualenv or prior build output isn't picked up as source on a second run. Add `.venv/` to .gitignore. Update docs/README.md to match the new venv/lock workflow. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
d21d55d to
62bb5b0
Compare
There was a problem hiding this comment.
Code Review
This pull request vendors OpenROAD documentation files locally under docs/_vendor/openroad/ instead of fetching them over the network at build time. This ensures reproducible, offline-friendly documentation builds that are synchronized with the pinned tools/OpenROAD submodule. It also introduces scripts to refresh and verify these vendored files, updates Python to 3.12, and refreshes dependencies. The review feedback suggests explicitly specifying encoding="utf-8" across multiple file read/write operations in docs/conf.py to prevent platform-dependent encoding issues.
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Advisory — results are log-only and do not affect build status. The authoritative QoR gate remains the local rules-file check. Commit 61 design(s) checked — 0 with regression(s), 0 without a comparable baseline.
|
Signed-off-by: Vitor Bandeira <vvbandeira@users.noreply.github.com>
Old
docs/conf.pyfetched 3 files from OpenROAD'smasterat build time, spliced via regex behind bareassert— broke on upstream heading rename,assertstripped underpython -O, and docs trackedmasternot pinned submodule SHA.Fix: vendor files at submodule SHA under
docs/_vendor/openroad/(GitGuide.md,README.md,utl-README.md, narrowedindex-SupportedOS.md— only Supported OS section, rest trips blocked-content check). Addrefresh_openroad_docs.py(regen) +check_vendored_docs.py(CI fail on drift from submodule pin). Wire refresh into cron update-OR workflow so bump + docs refresh land same commit.conf.pyreads vendor dir, no network calls..gitattributesexempts vendor dir from whitespace check (keep upstream trailing whitespace, idempotent refresh). Dropdocs/SupportedOSorphan page.Also bundled: RTD Python bump 3.10→3.12 (pydata-sphinx-theme's Sphinx pin breaks on 3.13+), lock tool switch
pip-compile→uv pip compile(pip-compile bug w/ recent pip), unpinsphinx-external-toc, regen lock, addmake venvtarget,.gitignore.venv/, README update.Net: no network calls at build, docs track pinned submodule not upstream master, submodule bump w/o docs refresh fails CI loud instead of breaking build later.