From db089b9cbd63ab7742764c6b8f238547fba59b0f Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 5 Jan 2025 17:42:09 -0800 Subject: [PATCH] - Move `tox.ini` for documentation configuration into `.meta.toml`. - Revert sort of `.gitignore` and add `.readthedocs.yaml` to the correct stanza in `.meta.toml`. --- .meta.toml | 33 +++++++++++++++++++++++++++++++-- pyproject.toml | 14 ++++++++------ 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/.meta.toml b/.meta.toml index 621ba0c4..38a7e0aa 100644 --- a/.meta.toml +++ b/.meta.toml @@ -12,8 +12,10 @@ codespell_extra_lines = """ [pyproject] check_manifest_ignores = """ - ".editorconfig", + # From `.meta.toml`, pyproject.check_manifest_ignores. "*.cfg", + ".editorconfig", + ".readthedocs.yaml", "constraints_plone52.txt", "constraints_plone60.txt", "constraints.txt", @@ -76,7 +78,7 @@ allowlist_externals = echo [testenv:plone6docs] -# New docs with sphinx-book-theme +# New docs with plone-sphinx-theme # See [testenv:docs] for classic documentation basepython = python3.11 skip_install = False @@ -92,6 +94,18 @@ commands = mkdir -p {toxinidir}/_build/plone6docs sphinx-build -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html +[testenv:rtd-preview] +# Build docs on Read the Docs to preview pull requests using plone-sphinx-theme +basepython = python3.11 +skip_install = False +extras = + tests +deps = + -r requirements-docs.txt +commands = + python -VV + sphinx-build -b html -d "{env:READTHEDOCS_OUTPUT}"/doctrees/ docs "{env:READTHEDOCS_OUTPUT}"/html/ + [testenv:docs] basepython = python3.9 skip_install = False @@ -126,6 +140,21 @@ commands = python -VV mkdir -p {toxinidir}/_build/plone6docs sphinx-build -b linkcheck -d _build/plone6docs/doctrees docs _build/plone6docs/linkcheck + +[testenv:livehtml] +basepython = python3.11 +skip_install = False +package = editable +allowlist_externals = + mkdir +extras = + {[testenv:plone6docs]extras} +deps = + {[testenv:plone6docs]deps} +commands = + python -VV + mkdir -p {toxinidir}/_build/plone6docs + sphinx-autobuild -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html """ [github] diff --git a/pyproject.toml b/pyproject.toml index 1070bc63..b97216f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,22 +133,24 @@ ignore-packages = ['Products.PrintingMailHost', 'plone.app.iterate',] [tool.check-manifest] ignore = [ - "*.cfg", ".editorconfig", ".flake8", ".meta.toml", ".pre-commit-config.yaml", + "dependabot.yml", + "mx.ini", + "tox.ini", + "*.cfg", + ".editorconfig", ".readthedocs.yaml", - "Makefile", - "constraints.txt", "constraints_plone52.txt", "constraints_plone60.txt", - "dependabot.yml", + "constraints.txt", "fix-converted-myst.py", - "mx.ini", + "Makefile", "requirements-docs.txt", "requirements.txt", - "tox.ini", + ] ##