Promote the v2 README to README.md ahead of the first v2 beta (#3014)
This commit is contained in:
parent
f664db8952
commit
f2e63c979a
2 changed files with 84 additions and 2683 deletions
|
|
@ -67,12 +67,8 @@ def _retired_names_used(source: str) -> list[str]:
|
|||
|
||||
|
||||
def _referenced_examples() -> set[str]:
|
||||
"""Every `docs_src/...` path that some docs page or the README actually includes.
|
||||
|
||||
The README is globbed rather than named so this survives the planned
|
||||
`README.v2.md` -> `README.md` rename instead of crashing on a missing file.
|
||||
"""
|
||||
pages = [*sorted((REPO_ROOT / "docs").rglob("*.md")), *sorted(REPO_ROOT.glob("README*.md"))]
|
||||
"""Every `docs_src/...` path that some docs page or the README actually includes."""
|
||||
pages = [*sorted((REPO_ROOT / "docs").rglob("*.md")), REPO_ROOT / "README.md"]
|
||||
return {ref for page in pages for ref in _INCLUDE_DIRECTIVE.findall(page.read_text(encoding="utf-8"))}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ async def test_desktop(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
|||
assert "file2.txt" in content.text
|
||||
|
||||
|
||||
# TODO(v2): Change back to README.md when v2 is released.
|
||||
# `--8<--` include directives lint clean as Python, so pages built from
|
||||
# `docs_src/` includes cost nothing here; the real validation of those files is
|
||||
# pyright + ruff + tests/docs_src/.
|
||||
|
|
@ -101,7 +100,7 @@ async def test_desktop(tmp_path: Path, monkeypatch: pytest.MonkeyPatch):
|
|||
"example",
|
||||
list(
|
||||
find_examples(
|
||||
"README.v2.md",
|
||||
"README.md",
|
||||
"docs/index.md",
|
||||
"docs/installation.md",
|
||||
"docs/tutorial",
|
||||
|
|
|
|||
Loading…
Reference in a new issue