🧪 TEST: demonstrate file-list mode (files) in the example project#15
Merged
Conversation
The tests/example project only exercised directory mode (``dir``); add a
checked-in "release notes" bundle mounted via file-list mode (``files``)
so the example covers both mount modes side by side.
- New tests/example/release-notes/ bundle: index.rst + notes/{2026-q1,
2026-q2, 2026-q3-draft}.rst.
- docs/ubproject.toml gains a ``files = [...]`` mount at
_generated/release-notes, wired via attach_to like the other bundles.
The draft note is intentionally left out of the list.
- build_docs_sandbox.sh stages the release-notes/ tree next to docs/ in
the temp working tree (mirroring the showcase/ staging), so the
sandboxed ``bazel build //:docs_html`` build resolves the mount. The
in-workspace ``bazel run //:build_docs`` path needs no change.
- test_example.py asserts the picked files render at a FLAT namespace
(the notes/ subdir is dropped from the docname), the unlisted draft is
never mounted, and attach_to wires the entry doc into the host toctree.
- README documents the directory-mode vs file-list-mode distinction.
ubmarco
force-pushed
the
files-mode-example
branch
from
July 23, 2026 17:29
cf856ac to
0548af3
Compare
ubmarco
marked this pull request as ready for review
July 23, 2026 20:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
tests/examplereference project previously demonstrated only directory mode (dir) mounts. This adds a checked-in "release notes" bundle mounted via file-list mode (files), so the example now covers both mount modes side by side.Changes
tests/example/release-notes/—index.rst+notes/{2026-q1,2026-q2,2026-q3-draft}.rst.docs/ubproject.toml— afiles = [...]mount at_generated/release-notes, wired viaattach_tolike the existing mounts.build_docs_sandbox.sh— stages therelease-notes/tree next todocs/in the temp working tree (mirroring the existingshowcase/staging) so the sandboxedbazel build //:docs_htmlbuild resolves the mount. The in-workspacebazel run //:build_docspath needs no change (it runs in the real source tree).test_example.py— asserts the three picked files render at a flat namespace (_generated/release-notes/2026-q1, not.../notes/2026-q1), that the unlisted2026-q3-draft.rstis never mounted (the behaviour that distinguishes file-list from directory mode), and thatattach_towires the entry doc into the host toctree.Verification
uv run pytest -m bazel tests/test_example.py— passes (Bazel build +sphinx-build -nW).bazel build //:docs_html(sandboxed) andbazel run //:build_docs(in-workspace) — both render the release-notes pages, no2026-q3-draft.html.ruff@0.12.2format/check clean;prek run --all-filesall hooks pass (incl. taplo).Deliberately skipped (flagging for review)
filesmode already shipped in 0.1.0, so there's no user-facing behavior change. Mirrors PR ✨ NEW: reference a pre-built HTML report from a mounted bundle (html_extra_path) #6 (thehtml_extra_pathexample), which also added no changelog entry. Happy to add one under a new unreleased section if you'd prefer.docs/source/— file-list mode is already fully documented inconfiguration.rst; nothing behavioural changed.