Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1bfc181

Browse filesBrowse files
webknjazseifertm
authored andcommitted
Wire Sphinx builds into the RTD config via tox
Resolves #917 Adjust test paths to new doc location.
1 parent f03cf13 commit 1bfc181
Copy full SHA for 1bfc181

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

46 files changed

+62
-73
lines changed

‎.readthedocs.yaml

Copy file name to clipboard
+24-14Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
---
2-
# Read the Docs configuration file for Sphinx projects
3-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
42

53
version: 2
4+
65
build:
7-
os: ubuntu-22.04
6+
os: ubuntu-24.04
87
tools:
9-
python: '3.12'
10-
11-
sphinx:
12-
configuration: docs/source/conf.py
13-
fail_on_warning: true
14-
15-
python:
16-
install:
17-
- requirements: dependencies/default/constraints.txt
18-
- requirements: dependencies/docs/constraints.txt
19-
- path: .
8+
python: >-
9+
3.12
10+
commands:
11+
- >-
12+
PYTHONWARNINGS=error
13+
python3 -Im venv "${READTHEDOCS_VIRTUALENV_PATH}"
14+
- >-
15+
PYTHONWARNINGS=error
16+
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
17+
pip install tox
18+
- >-
19+
PYTHONWARNINGS=error
20+
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
21+
tox -e docs --notest -vvvvv
22+
- >-
23+
PYTHONWARNINGS=error
24+
"${READTHEDOCS_VIRTUALENV_PATH}"/bin/python -Im
25+
tox -e docs --skip-pkg-install -q
26+
--
27+
"${READTHEDOCS_OUTPUT}"/html
28+
-b html
29+
-D language=en

‎docs/Makefile

Copy file name to clipboardExpand all lines: docs/Makefile
-20Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.

‎docs/make.bat

Copy file name to clipboardExpand all lines: docs/make.bat
-35Lines changed: 0 additions & 35 deletions
This file was deleted.

‎setup.cfg

Copy file name to clipboardExpand all lines: setup.cfg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ show_missing = true
6565
[tool:pytest]
6666
python_files = test_*.py *_example.py
6767
addopts = -rsx --tb=short
68-
testpaths = docs/source tests
68+
testpaths = docs tests
6969
asyncio_mode = auto
7070
junit_family=xunit2
7171
filterwarnings =

‎tox.ini

Copy file name to clipboardExpand all lines: tox.ini
+37-3Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,48 @@ allowlist_externals =
2626
make
2727

2828
[testenv:docs]
29+
allowlist_externals =
30+
git
2931
extras = docs
3032
deps =
3133
--requirement dependencies/docs/requirements.txt
3234
--constraint dependencies/docs/constraints.txt
3335
change_dir = docs
34-
commands = make html
35-
allowlist_externals =
36-
make
36+
description = Build The Docs with {basepython}
37+
commands =
38+
# Retrieve possibly missing commits:
39+
-git fetch --unshallow
40+
-git fetch --tags
41+
42+
# Build the html docs with Sphinx:
43+
{envpython} -Im sphinx \
44+
-j auto \
45+
{tty:--color} \
46+
-a \
47+
-T \
48+
-n \
49+
-W --keep-going \
50+
-d "{temp_dir}{/}.doctrees" \
51+
. \
52+
{posargs:"{envdir}{/}docs_out" -b html}
53+
54+
# Print out the output docs dir and a way to serve html:
55+
-{envpython} -c\
56+
'import pathlib;\
57+
docs_dir = pathlib.Path(r"{envdir}") / "docs_out";\
58+
index_file = docs_dir / "index.html";\
59+
print("\n" + "=" * 120 +\
60+
f"\n\nOpen the documentation with:\n\n\
61+
\t$ python3 -Im webbrowser \N\{QUOTATION MARK\}file://\{index_file\}\N\{QUOTATION MARK\}\n\n\
62+
To serve docs, use\n\n\
63+
\t$ python3 -Im http.server --directory \
64+
\N\{QUOTATION MARK\}\{docs_dir\}\N\{QUOTATION MARK\} 0\n\n" +\
65+
"=" * 120)'
66+
changedir = {toxinidir}{/}docs
67+
isolated_build = true
68+
passenv =
69+
SSH_AUTH_SOCK
70+
skip_install = false
3771

3872
[gh-actions]
3973
python =

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.