Skip to content

Commit 78b7772

Browse files
authored
Improve documentation and try furo (#2180)
1 parent bb6ff6b commit 78b7772

15 files changed

+1432
-236
lines changed

docs/_static/custom.css

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,7 @@
1-
.wy-nav-content {
2-
padding: 1em;
3-
max-width: 100%;
4-
}
5-
6-
/* Reduce whitespace on the inline-code snippets and add softer corners */
7-
.rst-content code {
8-
padding: 2px 3px;
9-
border-radius: 3px;
10-
}
11-
12-
dl {
13-
/*margin-bottom: 0!important;*/
14-
}
15-
dt {
16-
display: inline !important;
17-
padding: 3px;
18-
}
19-
dd {
20-
margin-bottom: 2px!important;
21-
}
22-
.rst-content dd p {
23-
margin-bottom: 0px;
24-
}
25-
26-
/* Reduce whitespace before enumeration */
27-
.section p {
28-
margin-bottom: 12px;
29-
}
30-
.section ol {
31-
margin-bottom: 12px !important;
1+
blockquote {
2+
border-left: none;
3+
font-style: normal;
4+
margin-left: 1.5rem;
5+
margin-right: 0;
6+
padding: 0;
327
}

docs/changelog/1881.doc.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Adopt furo theme, update our state diagram and description in user docs (SVG + light/dark variant), split
2+
the Python API into its own page from under the plugin page, and document plugin adoption under the ``tox-dev``
3+
organization - by :user:`gaborbernat`.

docs/conf.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from subprocess import check_output
77
from typing import Any, cast
88

9-
import sphinx_rtd_theme
109
from docutils.nodes import Element, Node, Text, container, fully_normalize_name, literal, paragraph, reference, strong
1110
from docutils.parsers.rst.directives import flag, unchanged, unchanged_required
1211
from docutils.parsers.rst.states import RSTState, RSTStateMachine
@@ -51,23 +50,16 @@
5150
project = name
5251
today_fmt = "%B %d, %Y"
5352

54-
html_theme = "sphinx_rtd_theme"
55-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
53+
html_theme = "furo"
5654
html_theme_options = {
57-
"canonical_url": "https://tox.readthedocs.io/en/latest/",
58-
"logo_only": False,
59-
"display_version": True,
60-
"prev_next_buttons_location": "bottom",
61-
"collapse_navigation": False,
62-
"sticky_navigation": True,
63-
"navigation_depth": 6,
64-
"includehidden": True,
55+
"navigation_with_keys": True,
6556
}
57+
html_title = "tox 4 - rewrite"
6658
html_static_path = ["_static"]
59+
html_css_files = ["css/custom.css"]
6760
html_last_updated_fmt = datetime.now().isoformat()
6861
html_logo = "_static/img/tox.svg"
6962
html_favicon = "_static/img/toxfavi.ico"
70-
htmlhelp_basename = "Pastedoc"
7163

7264
autoclass_content = "class"
7365
autodoc_member_order = "bysource"
@@ -148,7 +140,6 @@ def resolve_xref(
148140
app.connect("autodoc-skip-member", skip_member)
149141
app.connect("autodoc-process-signature", process_signature, priority=400)
150142
app.add_domain(PatchedPythonDomain, override=True)
151-
app.add_css_file("custom.css")
152143

153144
class ToxConfig(SphinxDirective):
154145
name = "conf"

docs/config.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ Core
195195

196196
Indicates where the packaging root file exists (historically setup.py file or pyproject.toml now).
197197

198-
Python
199-
~~~~~~
198+
Python language core options
199+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200+
200201
.. conf::
201202
:keys: ignore_base_python_conflict, ignore_basepython_conflict
202203
:default: True
@@ -218,8 +219,8 @@ Python
218219
tox environment
219220
---------------
220221

221-
Base
222-
~~~~
222+
Base options
223+
~~~~~~~~~~~~
223224

224225
.. conf::
225226
:keys: envname, env_name
@@ -466,8 +467,8 @@ Package
466467
Indicates where the packaging root file exists (historically setup.py file or pyproject.toml now).
467468

468469

469-
Python
470-
~~~~~~
470+
Python options
471+
~~~~~~~~~~~~~~
471472
.. conf::
472473
:keys: base_python, basepython
473474
:default: {package_root}

docs/development.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,15 @@ initiate a vote among the existing maintainers.
223223
- PyPI Publishing Access
224224
- CI Administration capabilities
225225
- ReadTheDocs Administration capabilities
226+
- The list below
227+
228+
.. _current-maintainers:
229+
230+
Current maintainers
231+
^^^^^^^^^^^^^^^^^^^
232+
233+
- `Anthony Sottile <https://github.com/asottile>`_
234+
- `Bernát Gábor <https://github.com/gaborbernat>`_
235+
- `Jürgen Gmach <https://github.com/jugmac00>`_
236+
- `Miroslav Šedivý <https://github.com/eumiro>`_
237+
- `Oliver Bestwalter <https://github.com/obestwalter>`_

docs/img/overview.mermaidjs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
stateDiagram-v2
2+
%%{init:{'state':{'nodeSpacing': 0, 'rankSpacing': 20}}}%%
3+
4+
[*] --> conf
5+
conf --> tox_env
6+
7+
state tox_env {
8+
state hdi <<choice>>
9+
state hpi <<choice>>
10+
state fpi <<choice>>
11+
12+
[*] --> create
13+
create --> hdi : has (new) project dependencies (deps)
14+
hdi --> deps: yes
15+
hdi --> hpi: no, has package
16+
deps --> hpi: has package
17+
hpi --> fpi: yes, built package in this run
18+
hpi --> commands : no
19+
fpi --> install_deps: yes
20+
fpi --> package: no
21+
package --> install_deps
22+
install_deps --> install
23+
install --> commands
24+
commands --> commands: for each entry <br>in commands*
25+
commands --> [*] : pass outcome to report
26+
}
27+
tox_env --> tox_env :for each tox environment
28+
29+
tox_env --> report
30+
report --> report :for each tox environment
31+
report --> [*]
32+
33+
conf: build configuration (CLI + files) <br> identify environments to run
34+
create: create an isolated tox environment <br> the other steps executed within this
35+
deps: install project dependencies (if has deps)
36+
package: build package
37+
install: install package without dependencies
38+
install_deps: install (new) package dependencies
39+
commands: run command
40+
report: report the outcome of the run

docs/img/overview_dark.svg

Lines changed: 563 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)