Skip to content

🔧 Import sphinx-test-reports into the workspace as packages/sphinx-test-reports - #1931

Merged
chrisjsewell merged 173 commits into
masterfrom
import/sphinx-test-reports-v2
Sep 15, 2026
Merged

chrisjsewell merged 173 commits into
masterfrom
import/sphinx-test-reports-v2

Conversation

@chrisjsewell

@chrisjsewell chrisjsewell commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Merge with "Create a merge commit" — not squash. The whole point is the preserved history,
and merge_commit_title is already Pull request title, so master's first-parent line reads
this title with no hand-editing. allow_merge_commit is false today; the steps are under
Before merging below.

useblocks/sphinx-test-reports moves into this workspace as packages/sphinx-test-reports/,
with its history, its ten release tags and its release path. It is the fourth distribution here
— and the first whose runtime dependency on a sibling is optional, which is where most of the
interesting parts below come from.

What the import is

The whole of that repository's master — 161 commits, tip ca74b80 (🚀 Release v2.0.0) —
rewritten by git filter-repo so that every historical commit already places its files under
packages/sphinx-test-reports/. 227 files in the merge, and nothing outside the package.

  • Tags. Its ten releases arrive prefixed, sphinx-test-reports-v0.3.6 …
    sphinx-test-reports-v2.0.0. The prefix is load-bearing: six of the ten bare names — 1.0.1,
    1.0.2, 1.1.0, 1.2.0, 1.3.0, 2.0.0 — are existing sphinx-needs releases
    , and
    release_plan.py reads every tag without -v in it as a sphinx-needs release.

  • A scoped commit-message rewrite. Bare issue numbers became useblocks/sphinx-test-reports#N,
    150 of them, bounded to that repository's own number range, 1 to 161. Exactly three references
    are deliberately left bare
    : ⬆️ Drop Python 3.9 #1468, 👌 Add schema to add_extra_option #1527 and ✨ Add needs_fields, deprecate need_extra_options, need_statuses, need_tags #1611, all in one commit (build: require
    sphinx-needs 6.0.1 and Sphinx 7.4
    ), are sphinx-needs issues — ⬆️ Drop Python 3.9, 👌 Add
    schema to add_extra_option, ✨ Add needs_fields. Left bare they autolink here to exactly the
    issues they mean; a lazy rule would have mangled all three into references that do not exist,
    which was measured by running it. The merge commit's own message was written by hand after
    filtering, so the rule never reached it: every sphinx-test-reports reference in it is written out
    in full for the same reason.

  • The commit map, at packages/sphinx-test-reports/design/import-commit-map.txt. Ten released
    versions' GitHub Releases, changelog entries and PyPI page are full of the old hashes; the old
    repository is archived rather than deleted, and this file carries them across.

  • One deliberate departure from a byte-for-byte copy — the PlantUML jars. The filter also
    stripped three jar blobs, 19.97 MB, from every historical tree. Unstripped the import adds
    +18.75 MiB of objects to a repository whose whole object set is ~101.6 MiB; stripped,
    +1.07 MiB. This workspace already vendors one PlantUML jar, at vendor/plantuml/, under a
    verify-plantuml gate.

    The imported tree differs from the source by exactly those jars, and that is checkable. Run it
    against the import commit, 918f3cd3, which is what the claim is about:

    git clone https://github.com/useblocks/sphinx-test-reports.git /tmp/str
    mkdir -p /tmp/a /tmp/b
    git -C /tmp/str archive ca74b80 | tar -x -C /tmp/a
    git archive 918f3cd3:packages/sphinx-test-reports | tar -x -C /tmp/b
    diff -rq /tmp/a /tmp/b
    # Only in /tmp/a/docs: utils                        <- contained plantuml.jar, nothing else
    # Only in /tmp/a/tests/doc_test/utils: plantuml.jar

    At HEAD the same command prints about sixty lines, because the ten commits after the merge change
    the package — that is the point of them, and each is described below. (A reviewer of this branch
    also compared all 161 imported trees against the source by mode and blob sha, not just the
    tip: zero mismatches.)

How to read the history afterwards

git log packages/sphinx-test-reports/<path> works with no --follow — filter-repo rewrote the
paths. git blame needs nothing, and git log --first-parent master shows the import as one line.

If you have an open pull request in the old repository

Once this pull request is merged, its commits move across with their authorship. Not before: until then master here has no packages/sphinx-test-reports/, and the cherry-pick below stops with modify/delete conflicts — measured, on useblocks/sphinx-test-reports#68. The property that makes it work is that
filter-repo's rewrite is deterministic: filtering your branch with exactly the rules below puts
its history on the very commit this import merged, so only your own commits need applying.

# clone pr-move NEXT TO your checkout of useblocks/sphinx-needs: the second half reaches it as ../pr-move
git clone https://github.com/useblocks/sphinx-test-reports.git pr-move && cd pr-move
git fetch origin '<your-branch>:pr-branch'
# for a fork: git fetch https://github.com/<you>/sphinx-test-reports.git '<your-branch>:pr-branch'
printf '%s\n' 'regex:(?<![\w/])#([1-9]|[1-9][0-9]|1[0-5][0-9]|16[01])\b==>useblocks/sphinx-test-reports#\1' > ../rules.txt
uvx git-filter-repo --to-subdirectory-filter packages/sphinx-test-reports \
    --tag-rename ':sphinx-test-reports-v' --replace-message ../rules.txt \
    --path-glob '*.jar' --invert-paths --force
# then, in your checkout of useblocks/sphinx-needs, beside pr-move:
git remote add prmove ../pr-move
git fetch prmove master pr-branch
git checkout -b <new-branch-name> origin/master   # a name not already used here, e.g. str-pr-68
git rev-list --reverse --no-merges "$(git merge-base prmove/master prmove/pr-branch)..prmove/pr-branch" \
    | git cherry-pick --stdin

Three details differ from the sphinx-codelinks import's recipe, and each was learned by running it:

  • --path-glob '*.jar' --invert-paths is not optional. This import stripped the jars, so a
    filter without the strip produces a different history: measured, master comes out as
    206c6494 instead of ffdf962e, and nothing you cherry-pick lands on the imported commits.
  • The old repository's default branch is master, and the branch is fetched as pr-branch,
    so that a fork whose branch is itself called master does not collide with the clone's own. For
    the same reason the branch you create here takes a new name: every sphinx-needs checkout already
    has a local master, and git checkout -b master there stops with fatal: a branch named 'master' already exists.
  • --no-merges. A plain git cherry-pick <base>..<branch> stops at the first merge commit in
    your branch. Dropping merges is safe only when they resolved nothing: check with
    git show --cc <merge>, which prints a diff only for hunks resolved by hand. If any merge in your
    branch did resolve a conflict, rebase your branch onto master in the OLD repository first,
    which linearises it, and then move it.

Proven end to end on useblocks/sphinx-test-reports#68, the one open pull request from an
outside contributor — a fork branch named master, one commit plus one merge of the upstream
branch, and behind master. The merge was trivial (git show --cc is empty); the move applied
one commit with zero conflicts, following the file's rename into src/ on its own; the
original author is preserved
on it (the committer becomes whoever runs the recipe); and the net
change of each of its three files is byte-identical to the pull request's. On the moved branch
ruff check, ty, its own seven tests, the whole package suite and the subprocess fence are all
green. The one thing it needs is a ruff format pass over tests/test_tr_link.py.

useblocks/sphinx-test-reports#68 is still mergeable in the old repository, but that repository's master has not moved from
ca74b80 since this import was cut, so merging it there now would leave it out of this import.
Moving it with the recipe is the route.

Then resolve anything this import changed under your branch, and push. The list, most likely
first:

  • formatting and lint — the workspace's ruff format and ruff check now apply to this
    package (on Support pattern matching in tr_link sphinx-test-reports#68, one file needed formatting and nothing else);
  • the member's pyproject.toml — [dependency-groups], [tool.ruff.lint],
    [tool.pytest.ini_options] and [tool.mypy] no longer exist there, and there is no test extra;
    a new test dependency goes in the ROOT test group;
  • files this import retired — noxfile.py, Makefile, .github/, .pre-commit-config.yaml,
    .yamlfmt, CONTRIBUTING.md — which a branch that edits them hits as a modify/delete conflict;
  • the directive modules the type-checking port rewrote, above all directives/test_common.py;
  • a test that spawns sphinx-build must build its argv with
    sphinx_needs_testkit.sphinx_build_command, or the subprocess fence fails.

A file that moved under src/ is not on this list: the cherry-pick follows the rename.

Two further pull requests there come from maintainers and already conflict with master in the
old repository: useblocks/sphinx-test-reports#117 (mypy fixes, 29 commits, 21 files — much of what
it touches is retired or re-done here with ty) and useblocks/sphinx-test-reports#63 (the JUnit
error attribute). Whether to move or close them is left to their authors.

A warning for anyone grepping the diff

tests/doc_test/utils/*.xml contain the literal string sphinxcontrib/ — for example
file="sphinxcontrib/test_reports/junitparser.py". They are fixture payloads describing a
historical pytest run: test data, not paths anything opens. A src/-move sed would corrupt them
silently. They are untouched, and their 23 files are byte-identical to the import.

What changed beyond the move

One commit each.

  1. Wiring and the relock — the one --no-verify commit, and it has to be: members = ["packages/*"] discovers the directory the moment the merge lands, so uv sync --frozen and three
    hooks fail together until the lock catches up. The manifest is truncated to what a member may own;
    requires-python becomes >=3.11,<4; both sphinx-needs specifiers become >=8.5.0,<9. The
    lock gains one name, one entry, zero third-party distributions and zero bytes to download.
    This
    commit also adds the commit map, and deletes 22 sys.path.insert(… "../../sphinxcontrib") lines
    from fixture conf.py files: the src/ move is what made that path false.
  2. Retirements. The noxfile, Makefiles, standalone CI, pre-commit and yamlfmt configs,
    .gitignore, CONTRIBUTING.md. AUTHORS is kept. Two things retire with no replacement, and
    are named because nothing else in the diff says so: linkcheck (the workspace's docs.yaml is
    scoped to sphinx-needs' docs) and three prek hooks (end-of-file-fixer, trailing-whitespace,
    pretty-format-json).
  3. ruff + ty. 56 ruff findings and 62 ty diagnostics, now zero, ported here rather than
    excluded, because an unchecked member is invisible. ~45 of the 62 had one cause: eleven directive
    attributes initialised to a bare None. Five narrow # ty: ignore remain, each with its
    reason. The regression tests below land here, beside the fixes they cover.
  4. The subprocess fence. Three tests spawned sphinx-build resolved on PATH; they now go
    through sphinx_needs_testkit.sphinx_build_command, with the one-line fence sphinx-mounts carries.
    And a failure that would have been green in CI and red for every developer: an in-process
    pytest.main() collides with pytest-playwright in the default .venv, which no CI cell has.
    Fixed with -p no:playwright on the inner session.
  5. Docs — clean under -nW --keep-going, from five warnings.
  6. Read the Docs config, re-rooted at the repository.
  7. CI — one pytest step and one Codecov upload in the Extensions cell (flag reports); a new
    toolchain-free job, the fence that keeps the converter and the pytest plugin importable with
    no documentation toolchain (it cannot be a matrix cell, because every workspace environment
    installs every member and sphinx-needs declares sphinx at runtime); and a new Docs reports
    job, since nothing else would hold the zero-warning build. That job's PlantUML step is counted by
    tools/tests/test_ci_plantuml_steps.py, whose site counts go 7 → 8 and 6 → 7 — the fence asks for
    exactly that decision to be made explicitly.
  8. The release workflow. The compat cell installs a bare wheel whose Requires-Dist is lxml
    alone, so this member gets a compat-requirements.txt; and module=${DIST//-/_} derived a module
    that does not exist, so the step now reads [tool.flit.module] name. Exercised by hand:
    without the file the import walk fails 6 of 25 modules; with it, 25 of 25 and the suite passes
    against published dependencies.
  9. The lists that name the packages: labeler, issue labeler, both issue forms, the root README
    (which was already missing sphinx-codelinks — it now lists four of four), and AGENTS.md.
  10. The changelog.
  11. Two loader tests made portable to Windows, after CI's first Windows run of this suite (see below).

Three bug fixes, one deprecation cleanup, and one thing that is NOT fixed

  • 🐛 A test-env with :raw: and :env: but no :data: raised TypeError — one branch
    iterated outside the guard its sibling keeps it inside. No fixture had that shape.
  • 🐛 A test-file written without :file: raised an unhandled TypeError. The guard meant to
    catch it was dead code, reached only after a slice of the missing value. It now raises
    TestReportFileNotSetError. No fixture had that shape either.
  • 🐛 This repository's own docs build could not resolve the report template's literalinclude
    after the src/ move.
  • 👌 nodes.Text(text, text) → nodes.Text(text). Not a bug: docutils ignores the second
    argument, deprecates it, and removes it only in Docutils 2.0.
  • ⚠️ The shipped default report template's self-include is still broken for users, and this pull
    request does not fix it.
    literalinclude resolves against the including document — for a
    user, somewhere in their own docs — so no path written in the shipped file can be right for both
    them and this repository. Filed as 🐛 The shipped default test-report template literalincludes itself by a path only this repository can resolve #1932. Until it is fixed a project can copy the template and remove the
    literalinclude directive at its end — both lines, or the whole Template section; removing
    only the first leaves a stray language: rst field list.

Each of the three code changes above — the two crashes and the Text() cleanup — comes with a
mutation-proved regression test
, in a new tests/test_directive_regressions.py with three new
fixture projects: red on the published code, green on the fix. The fourth item, the docs build's own
template path, is not a pytest; the Docs reports job holds it, and it fails on the unfixed path.
The Text() test needed a warning filter scoped to docutils' exact deprecation message and to
this package's module — without it an assertion on the rendered error node passes on the old call
too, which was measured — and a positive control on the same pattern constant, so that a docutils
rewording fails loudly instead of disarming the fence.

Two pre-existing gaps fixed on the way past

  • The Lint job's type-gate canary probed only two of the packages. sphinx-codelinks was already
    missing, so the hole was one package wide before this import. Both are now probed.
  • The root README table was missing sphinx-codelinks.

What this costs, stated rather than left to the CI diff

  • The sphinx-needs axis goes from five tested versions to one, and the declared floor narrows
    with it, from sphinx-needs>=6.0.1 to >=8.5.0,<9. Accepted.
  • Five ruff families (FURB, PERF, PGH, PIE, SLF) are no longer enforced, and four more
    rules this package enabled are ignored by the shared set (B904, ICN001, ISC004, N818). All
    nine are at zero violations today.
  • linkcheck and three formatting hooks retire with no replacement.
  • plugin_floor has no replacement yet.
  • The docs keep sphinx_immaterial; converging on furo has its own issue.

One effect on a sibling suite, which pass counts alone would hide

Putting sphinx-design in the shared test group moves one sphinx-needs test from skipped to
passing
: test_needreport.py::test_sphinx_design_dropdown_output_is_unchanged, guarded by
skipif(not SPHINX_DESIGN_INSTALLED). The direction is good; it is stated because a pass count
cannot show a skip becoming a pass.

before this branch this branch
poe test-needs 1804 passed, 12 skipped 1805 passed, 11 skipped
poe test-mounts 944 passed, 2 deselected 944 passed, 2 deselected

Windows

Everything was measured locally on macOS and three Linux-shaped cells, so the Extensions
windows-latest × sphinx-9 cell was this suite's first run on Windows. The old repository's CI ran on
ubuntu-latest only. That first run failed two tests in tests/test_project_config.py::TestLoader,
both added with useblocks/sphinx-test-reports#145, and both test defects rather than product bugs:

  • test_unreadable_file_is_a_config_error makes its file unreadable with chmod(0o000). On Windows
    os.chmod only sets the read-only attribute, so the file stays readable and nothing raised. It now
    skips on Windows, as it already did for root on POSIX.
  • test_absolute_paths_stay_untouched wrote tmp_path into a TOML basic string, where a Windows path's
    backslashes are escape sequences, so the file was invalid TOML — which the loader correctly reported.
    It now uses a TOML literal string and checks the same thing on every platform.

Fixed in d68d10df. On it the Windows cell's sphinx-test-reports step reports:

run passed skipped failed
f4075034 423 1 2
d68d10df 424 2 0

The three converted subprocess sites, the part expected to be Windows-sensitive, passed on the first run.

Gates

Every figure below was measured locally on f4075034. The one commit after it, d68d10df, changes two
tests for Windows and nothing else (see Windows above), and CI runs the full matrix on it.

poe lint              8/8 hooks             poe test-reports        426 passed
poe typecheck         All checks passed     cells sphinx-7 / 8 / 9  426 passed each
poe docs-reports      0 warnings            pytest tools/tests      313 passed
pytest --collect-only 2175, exit 0          check-workspace         all green
import_check --walk   25 modules            compat cell (by hand)   sphinx-needs 8.5.0 from PyPI,
                                                                    25 modules, 426 passed
mutation proofs       each proof red when its fix is reverted, green restored; the positive
                      control red when its pattern is broken

check_workspace.py check (5) prints no line for this member, by design and for two
independent reasons (a dotted module name, and no __version__ literal); the package's AGENTS.md
says so, and the release that renames the module dissolves both.

Follow-up candidates, not in this pull request

  • the shipped template's self-include — 🐛 The shipped default test-report template literalincludes itself by a path only this repository can resolve #1932;
  • converging the docs theme on furo;
  • widening docs.yaml's linkcheck to this package;
  • schema={"type": …} against sphinx-needs' TypedDict union — a real API-shape mismatch, suppressed
    here with a reason;
  • plugin_floor;
  • three things no gate currently fences: a typo in the labeler glob (which is what applies
    pkg: sphinx-test-reports to every future pull request), the [project.urls] values, and the
    toolchain marker line — removing any of them leaves every gate green.

Before merging

  • Create the label pkg: sphinx-test-reports, and apply it to this pull request by hand. The
    pull_request_target labeler reads the default branch's configuration, which does not know this
    package until this merges, so it cannot apply the label here however early the label exists. It
    must exist before the merge and before any issue is transferred.
  • File the follow-up issue for the shipped template's self-include, carrying that label — 🐛 The shipped default test-report template literalincludes itself by a path only this repository can resolve #1932.
  • Flip allow_merge_commit on immediately before the merge, merge with Create a merge
    commit
    , and flip it off immediately after.

After the merge

Closes nothing — useblocks/sphinx-test-reports#149 is closed by hand in the other repository.

danwos and others added 30 commits April 26, 2018 09:20
…o test-files and tests for pytest and nosetest output xml files
* added directive test-env and its supporting doc

* added test-env directive

* added test-env directive and supporting docs

* test cases and bug fix in directive

* test case for Warning

* warning test case, py27-sphinx15 fix
…TEST_51

skip testsuites element if present
…t cell its extras

**R13, two defects with one fix each. Both are invisible until a release job runs**, which
is why they are fixed now rather than found at the worst possible moment.

**1. `module=${DIST//-/_}` derives a module that does not exist.** For this member that is
`sphinx_test_reports`, and the package installs into the `sphinxcontrib` PEP 420 namespace:
the real import name is `sphinxcontrib.test_reports`, declared in `[tool.flit.module]`. The
`import_check` walk would have failed with `ModuleNotFoundError` on every release of it. The
step now reads that key and falls back to the derivation for the three members that declare
no such table -- `check_workspace.Member.module` and `import_check.py` have both honoured it
from the start, so this brings the third reader into line. The comment it replaces predicted
this member by name. Verified against all four manifests: `sphinx_needs`, `sphinx_mounts`,
`sphinx_codelinks`, `sphinxcontrib.test_reports`.

**2. The compat cell installs the wheel with no extras, and 2.0.0 put Sphinx in one.**
Measured on the built wheel: `Requires-Dist: lxml`, full stop -- both Sphinx and sphinx-needs
sit behind the `sphinx` extra, so that the converter and the pytest plugin install without a
documentation toolchain. Run by hand, the cell fails the `import_check` walk
`6 of 25 modules ... No module named 'sphinx_needs'`.

The workflow already has exactly the right mechanism and needed no change for this half: a
per-member `compat-requirements.txt`, installed with `-r` before the wheel and passed again
as a `-c` constraint. Both siblings use it, each with a comment explaining why theirs exists;
this one explains what is different about this member -- it is the first here whose RUNTIME
dependencies are optional, so the file covers the package's own requirements rather than a
test-only need.
**R15.** Four lists, one new file and one shim.

* **`.github/labeler.yml`** and **`.github/issue-labeler.yml`**, plus the "Package" dropdown
  of both issue forms. These go together and cannot be split: the issue labeler runs with
  `sync-labels: 1`, so an option offered by a form with no pattern behind it means the label
  is SYNCED AWAY rather than merely not added. The comment about no two names containing
  another as a `\b`-delimited word is restated for four names, since it is an invariant
  someone has to re-check when a fifth arrives.
* **The root `README.md` table gains TWO rows**, not one: **sphinx-codelinks was already
  missing from it**, so the table has listed two of three packages since that import. It now
  lists four of four.
* **`packages/sphinx-test-reports/AGENTS.md`**, the package delta, with `CLAUDE.md` as the
  usual one-line shim. It carries the paragraph **R14 requires**: `check_workspace.py` check
  (5) prints no line at all for this member, for two independent reasons — a dotted module
  name that `module_version()` can never resolve, and no `__version__` literal anywhere,
  which the check treats as "not an error" by design. Silence that nobody wrote down is the
  failure mode; a documented gap is not. It also records what the move COST -- the
  sphinx-needs axis, five ruff families, `plugin_floor`, and the theme still being
  sphinx_immaterial -- none of which is visible in a diff.
* **The root `AGENTS.md`** gains the member's row, its two commands, its RTD path, the
  renderer facts (the suite needs none; the docs need both -- of the three extension
  packages, the only docs that render, though sphinx-needs' own render far more), the
  `pkg:` label, and the correction from "all three packages ship a `tests/__init__.py`" to
  four. The history section now names three imports rather than two, and says that this
  one's commit map records the stripped jars.
**R16.** The entry says what the import COSTS, not merely that the package moved, because
none of it is visible in a diff and the CI diff is a poor place to learn it.

* **The Sphinx-Needs axis goes from five tested versions to one.** The retired noxfile ran
  6.0.1, 6.3.0, 7.0.0, 8.0.0 and 8.5.0; the workspace tests against the sibling in the tree,
  varying the Sphinx series instead. The declared floor narrows with it, from
  `sphinx-needs>=6.0.1` to `sphinx-needs>=8.5.0,<9`. Users on an older Sphinx-Needs keep
  2.0.0; they do not silently get a package that no longer supports them.
* Five ruff families, plus four more rules the shared set ignores (`B904`, `ICN001`,
  `ISC004`, `N818`); `plugin_floor`; **`linkcheck`, which retires with no replacement**
  because the workspace's link-check job is scoped to Sphinx-Needs' own docs; three
  formatting hooks; and mypy's fifteen-module `exclude`.

**The shipped-template bullet does not claim a user-facing fix, because there is not
one.** `literalinclude` resolves against the document doing the including, which for a
user is somewhere in their own docs tree -- so no path written in the shipped template can
be right for both that user and this repository. What this pull request fixed is this
package's own documentation build. The bullet says exactly that, says the self-include is
tracked separately, and points at the workaround: copy the template, which is what
`tr_report_template` is for, and remove the `literalinclude` directive at its end -- both
of its lines, or the whole Template section, since removing only the first leaves a stray
`language: rst` field list. An earlier draft of this entry said "the path is fixed", which
would have told users a bug was closed that is still open for them.

The entry also carries the three bug fixes this pull request does make -- the `test-env`
branch that raised `TypeError` without `:data:`, a directive written without `:file:` that
raised `TypeError` instead of a readable error, and this repository's own template path --
and one deprecation cleanup, the second argument to docutils' `Text()`, which is
deliberately NOT filed as a bug: docutils ignores that argument and removes it only in
Docutils 2.0, so on every supported version the old call works. The entry also gives the
four facts a user of the old repository needs: the new repository, where issues go, the
prefixed tags, and that **the published package does not change** (same distribution, same
import name, same command).

`poe docs-reports` still builds clean with it.
@github-actions github-actions Bot added the pkg: workspace The repository as a whole: workflows, CI, release, docker, tooling, the workspace root label Sep 15, 2026
@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.75267% with 211 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.69%. Comparing base (eb23d5e) to head (d68d10d).
⚠️ Report is 23 commits behind head on master.

Files with missing lines Patch % Lines
...ts/src/sphinxcontrib/test_reports/pytest_plugin.py 59.78% 76 Missing ⚠️
.../sphinxcontrib/test_reports/directives/test_env.py 82.00% 27 Missing ⚠️
...phinxcontrib/test_reports/directives/test_suite.py 75.00% 24 Missing ⚠️
...sphinxcontrib/test_reports/directives/test_case.py 85.29% 15 Missing ⚠️
...orts/src/sphinxcontrib/test_reports/environment.py 75.00% 12 Missing ⚠️
...rts/src/sphinxcontrib/test_reports/test_reports.py 93.67% 10 Missing ⚠️
...reports/src/sphinxcontrib/test_reports/__init__.py 63.63% 8 Missing ⚠️
...hinxcontrib/test_reports/directives/test_common.py 92.59% 8 Missing ⚠️
...ts/src/sphinxcontrib/test_reports/projectconfig.py 96.70% 8 Missing ⚠️
...test-reports/src/sphinxcontrib/test_reports/cli.py 96.11% 7 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1931      +/-   ##
==========================================
- Coverage   91.84%   91.69%   -0.15%     
==========================================
  Files         105      129      +24     
  Lines       16231    18155    +1924     
==========================================
+ Hits        14907    16648    +1741     
- Misses       1324     1507     +183     
Flag Coverage Δ
codelinks 93.42% <ø> (ø)
mounts 94.01% <ø> (ø)
pytests 91.40% <ø> (+0.27%) ⬆️
reports 88.75% <88.75%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The Extensions windows-latest cell, this suite's first run on Windows, failed two tests in
`tests/test_project_config.py::TestLoader`. Both are POSIX assumptions in tests added with
useblocks/sphinx-test-reports#145, whose CI only ever ran on ubuntu-latest. Neither is a product
bug:

* `test_unreadable_file_is_a_config_error` makes its file unreadable with `chmod(0o000)`. On
  Windows `os.chmod` only sets the read-only attribute, so the file stays readable and nothing
  raises ("DID NOT RAISE TomlConfigError"). Its existing skip covered only root on POSIX; it now
  also skips on win32, with that reason. The behaviour it covers, wrapping an `OSError` from the
  open as a `TomlConfigError`, is platform-independent code.
* `test_absolute_paths_stay_untouched` wrote `tmp_path` into a TOML basic string. A Windows path's
  backslashes are escape sequences there -- `\U` starts a unicode escape -- so the file was invalid
  TOML ("Invalid hex value (at line 2, column 16)"), which the loader correctly reported. The value is
  now a TOML literal string, which processes no escapes, so the test checks the same thing on every
  platform.

Measured locally: a Windows-shaped path in a basic string reproduces CI's exact `TOMLDecodeError`,
and the same path in a literal string parses equal to itself. The module passes 78 and the package
suite 426 on macOS; the Windows cell is the proof for both changes.

@ubmarco ubmarco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chrisjsewell chrisjsewell added the pkg: sphinx-test-reports Concerns the sphinx-test-reports package (packages/sphinx-test-reports) label Sep 15, 2026
@chrisjsewell
chrisjsewell merged commit fa5c3db into master Sep 15, 2026
38 checks passed
@chrisjsewell
chrisjsewell deleted the import/sphinx-test-reports-v2 branch September 15, 2026 20:54
ubmarco pushed a commit to useblocks/sphinx-test-reports that referenced this pull request Sep 30, 2026
A notice at the top of the README: the last change before this
repository is archived.

sphinx-test-reports now lives in useblocks/sphinx-needs under
[`packages/sphinx-test-reports`](https://github.com/useblocks/sphinx-needs/tree/master/packages/sphinx-test-reports),
imported with its full history in useblocks/sphinx-needs#1931. Its open
issues were triaged and moved (useblocks/sphinx-needs#1953 to #1969),
and the three pull requests still open here were closed with a pointer
to useblocks/sphinx-needs#1952; their branches stay, so nothing is lost.
The package keeps its name on PyPI and its documentation URL, and its
next release from the monorepo points PyPI's links at the new
repository.

After this merges, the repository is archived.
patdhlk pushed a commit to patdhlk/sphinx-needs that referenced this pull request Oct 7, 2026
The whole of useblocks/sphinx-ai-index' `main` -- 7 commits, tip `74c783b9` ("update
changelog", the tree tagged `v0.1.0` and published to PyPI as sphinx-ai-index 0.1.0) --
rewritten by `git filter-repo --to-subdirectory-filter packages/sphinx-ai-index` so that
every historical commit already places its files under `packages/sphinx-ai-index/`, and
merged here with `--allow-unrelated-histories`. It is the fourth such import, after
sphinx-mounts (useblocks#1850), sphinx-codelinks (useblocks#1871) and sphinx-test-reports (useblocks#1931).

* **The tree is the source, byte for byte.** `git archive` of the source clone at
  `74c783b9` and of `packages/sphinx-ai-index` here extract to the same 22 files
  (`diff -rq` exit 0), and the merge touches nothing outside the prefix. Nothing was
  stripped and no commit message was rewritten: none of the seven carries an issue
  reference, so there was nothing to qualify.
* **The tag.** Its one release arrives as `sphinx-ai-index-v0.1.0`
  (`--tag-rename 'v:sphinx-ai-index-v'`, which strips the source's own `v`; the bare
  `':sphinx-ai-index-v'` form gives `sphinx-ai-index-vv0.1.0`). It points at the imported
  tip, `6e4b36da`, outside master, as the siblings' prefixed tags do.
* **The commit map.** filter-repo's map from the seven old hashes to the seven new ones is
  recorded at `packages/sphinx-ai-index/design/import-commit-map.txt` by a following
  commit, which keeps this merge's tree exactly the source's.

The member's wiring follows in the next commit: the root manifest, its source entry and the
relock. Until then `uv lock --check` fails here -- sphinx-needs' `docs` extra already names
sphinx-ai-index, which the `packages/*` glob now finds as a workspace member with no
`[tool.uv.sources]` entry.

`git log packages/sphinx-ai-index/<path>` reads with no `--follow`: filter-repo rewrote the
paths in every commit, so from this repository's point of view those files were always
there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: sphinx-test-reports Concerns the sphinx-test-reports package (packages/sphinx-test-reports) pkg: workspace The repository as a whole: workflows, CI, release, docker, tooling, the workspace root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔧 Prepare sphinx-test-reports for its move into the sphinx-needs workspace