Skip to content

Commit c2613ca

Browse files
authored
Fix doc alignment and link check (#3059)
1 parent 9fcbf1b commit c2613ca

File tree

4 files changed

+65
-69
lines changed

4 files changed

+65
-69
lines changed

docs/config.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Out of box tox supports three configuration locations prioritized in the followi
1515
2. ``pyproject.toml``,
1616
3. ``setup.cfg``.
1717

18-
With regards to the configuration format, at the moment we only support *ini-style*. ``tox.ini`` and ``setup.cfg`` are by
19-
nature such files, while in ``pyproject.toml`` currently you can only inline the *ini-style* config.
18+
With regards to the configuration format, at the moment we only support *ini-style*. ``tox.ini`` and ``setup.cfg`` are
19+
by nature such files, while in ``pyproject.toml`` currently you can only inline the *ini-style* config.
2020

2121
Note that ``setup.cfg`` requires the content to be under the ``tox:tox`` and ``testenv`` sections and is otherwise
2222
ignored. ``pyproject.toml`` on the other hand is in TOML format. However, one can inline the *ini-style* format under
@@ -616,8 +616,9 @@ Python run
616616
:keys: package
617617
:version_added: 4.0
618618

619-
When option can be one of ``wheel``, ``sdist``, ``editable``, ``editable-legacy``, ``skip``, or ``external``. If :ref:`use_develop` is
620-
set this becomes a constant of ``editable``. If :ref:`skip_install` is set this becomes a constant of ``skip``.
619+
When option can be one of ``wheel``, ``sdist``, ``editable``, ``editable-legacy``, ``skip``, or ``external``. If
620+
:ref:`use_develop` is set this becomes a constant of ``editable``. If :ref:`skip_install` is set this becomes a
621+
constant of ``skip``.
621622

622623

623624
.. conf::
@@ -767,8 +768,8 @@ Pip installer
767768
:version_added: 2.4
768769

769770
The ``list_dependencies_command`` setting is used for listing the packages installed into the virtual environment.
770-
This command will be executed only if executing on Contionous Integrations is detected (for example set environment variable ``CI=1``)
771-
or if journal is active.
771+
This command will be executed only if executing on Continuous Integrations is detected (for example set environment
772+
variable ``CI=1``) or if journal is active.
772773

773774

774775
.. conf::
@@ -786,7 +787,7 @@ Pip installer
786787
:version_added: 4.4.0
787788

788789
If ``constrain_package_deps`` is true, then tox will create and use ``{env_dir}{/}constraints.txt`` when installing
789-
package dependnecies during ``install_package_deps`` stage. When this value is set to false, any conflicting package
790+
package dependencies during ``install_package_deps`` stage. When this value is set to false, any conflicting package
790791
dependencies will override explicit dependencies and constraints passed to ``deps``.
791792

792793
.. conf::
@@ -795,17 +796,16 @@ Pip installer
795796
:version_added: 4.4.0
796797

797798
When ``use_frozen_constraints`` is true, then tox will use the ``list_dependencies_command`` to enumerate package
798-
versions in order to create ``{env_dir}{/}constraints.txt``. Otherwise the package specifications explicitly listed under
799-
``deps`` (or in requirements / constraints files referenced in ``deps``) will be used as the constraints. If
799+
versions in order to create ``{env_dir}{/}constraints.txt``. Otherwise the package specifications explicitly listed
800+
under ``deps`` (or in requirements / constraints files referenced in ``deps``) will be used as the constraints. If
800801
``constrain_package_deps`` is false, then this setting has no effect.
801802

802803
User configuration
803804
------------------
804805

805-
tox allows creation of user level config-file to modify default values of the CLI commands.
806-
It is located in the OS-specific user config directory under ``tox/config.ini`` path, see ``tox --help`` output for exact location.
807-
It can be changed via ``TOX_USER_CONFIG_FILE`` environment variable.
808-
Example configuration:
806+
tox allows creation of user level config-file to modify default values of the CLI commands. It is located in the
807+
OS-specific user config directory under ``tox/config.ini`` path, see ``tox --help`` output for exact location. It can be
808+
changed via ``TOX_USER_CONFIG_FILE`` environment variable. Example configuration:
809809

810810
.. code-block:: ini
811811
@@ -820,7 +820,7 @@ through the ``{...}`` string-substitution pattern.
820820

821821
The string inside the curly braces may reference a global or per-environment config key as described above.
822822

823-
In substitutions, the backslash character ``\`` will act as an escape when preceeding
823+
In substitutions, the backslash character ``\`` will act as an escape when preceding
824824
``{``, ``}``, ``:``, ``[``, or ``]``, otherwise the backslash will be
825825
reproduced literally::
826826

docs/development.rst

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Getting started
55
---------------
66

77

8-
``tox`` is a volunteer maintained open source project and we welcome contributions of all forms. The sections
9-
below will help you get started with development, testing, and documentation. We’re pleased that you are interested in
10-
working on tox. This document is meant to get you setup to work on tox and to act as a guide and reference
11-
to the development setup. If you face any issues during this process, please
8+
``tox`` is a volunteer maintained open source project and we welcome contributions of all forms. The sections below will
9+
help you get started with development, testing, and documentation. We’re pleased that you are interested in working on
10+
tox. This document is meant to get you setup to work on tox and to act as a guide and reference to the development
11+
setup. If you face any issues during this process, please
1212
:issue:`new?title=Trouble+with+development+environment` about it on the issue tracker.
1313

1414
Setup
@@ -44,8 +44,8 @@ The easiest way to do this is to generate the development tox environment, and t
4444
Running tests
4545
~~~~~~~~~~~~~
4646

47-
tox's tests are written using the :pypi:`pytest` test framework. :pypi:`tox` is used to automate the setup
48-
and execution of tox's tests.
47+
tox's tests are written using the :pypi:`pytest` test framework. :pypi:`tox` is used to automate the setup and execution
48+
of tox's tests.
4949

5050
To run tests locally execute:
5151

@@ -56,10 +56,9 @@ To run tests locally execute:
5656
This will run the test suite for the same Python version as under which ``tox`` is installed. Alternatively you can
5757
specify a specific version of Python by using the ``pyNN`` format, such as: ``py38``, ``pypy3``, etc.
5858

59-
``tox`` has been configured to forward any additional arguments it is given to ``pytest``.
60-
This enables the use of pytest's
61-
`rich CLI <https://docs.pytest.org/en/latest/how-to/usage.html#specifying-which-tests-to-run>`_. As an example, you can
62-
select tests using the various ways that pytest provides:
59+
``tox`` has been configured to forward any additional arguments it is given to ``pytest``. This enables the use of
60+
pytest's `rich CLI <https://docs.pytest.org/en/latest/how-to/usage.html#specifying-which-tests-to-run>`_. As an example,
61+
you can select tests using the various ways that pytest provides:
6362

6463
.. code-block:: shell
6564
@@ -69,8 +68,8 @@ select tests using the various ways that pytest provides:
6968
tox -e py -- -k "test_extra"
7069
7170
Some tests require additional dependencies to be run, such is the various shell activators (``bash``, ``fish``,
72-
``powershell``, etc). The tests will be skipped automatically if the dependencies are not present. Please note however that in CI
73-
all tests are run; so even if all tests succeed locally for you, they may still fail in the CI.
71+
``powershell``, etc). The tests will be skipped automatically if the dependencies are not present. Please note however
72+
that in CI all tests are run; so even if all tests succeed locally for you, they may still fail in the CI.
7473

7574
Running linters
7675
~~~~~~~~~~~~~~~
@@ -128,11 +127,10 @@ Contributing
128127
Submitting pull requests
129128
~~~~~~~~~~~~~~~~~~~~~~~~
130129

131-
Submit pull requests (PRs) against the ``main`` branch, providing a good description of what you're doing and why. You must
132-
have legal permission to distribute any code you contribute to tox and it must be available under the MIT
133-
License. Provide tests that cover your changes and run the tests locally first. tox
134-
:ref:`supports <compatibility-requirements>` multiple Python versions and operating systems. Any pull request must
135-
consider and work on all these platforms.
130+
Submit pull requests (PRs) against the ``main`` branch, providing a good description of what you're doing and why. You
131+
must have legal permission to distribute any code you contribute to tox and it must be available under the MIT License.
132+
Provide tests that cover your changes and run the tests locally first. tox :ref:`supports <compatibility-requirements>`
133+
multiple Python versions and operating systems. Any pull request must consider and work on all these platforms.
136134

137135
Pull requests should be small to facilitate review. Keep them self-contained, and limited in scope. `Studies have shown
138136
<https://www.kessler.de/prd/smartbear/BestPracticesForPeerCodeReview.pdf>`_ that review quality falls off as patch size
@@ -158,10 +156,10 @@ pull request. If needed, project maintainers can manually trigger a restart of a
158156
Changelog entries
159157
~~~~~~~~~~~~~~~~~
160158

161-
The ``changelog.rst`` file is managed using :pypi:`towncrier` and all changes must be accompanied by a
162-
changelog entry. To add an entry to the changelog, first you need to have created an issue describing the
163-
change you want to make. A pull request itself *may* function as such, but it is preferred to have a dedicated issue
164-
(for example, in case the PR ends up rejected due to code quality reasons).
159+
The ``changelog.rst`` file is managed using :pypi:`towncrier` and all changes must be accompanied by a changelog entry.
160+
To add an entry to the changelog, first you need to have created an issue describing the change you want to make. A pull
161+
request itself *may* function as such, but it is preferred to have a dedicated issue (for example, in case the PR ends
162+
up rejected due to code quality reasons).
165163

166164
There is no need to create an issue for trivial changes, e.g. for typo fixes.
167165

@@ -184,30 +182,30 @@ Contents of a changelog entry
184182
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
185183

186184
The content of this file is reStructuredText formatted text that will be used as the content of the changelog entry.
187-
You do not need to reference the issue or PR numbers here as towncrier will automatically add a reference to all of
188-
the affected issues when rendering the changelog.
185+
You do not need to reference the issue or PR numbers here as towncrier will automatically add a reference to all of the
186+
affected issues when rendering the changelog.
189187

190188
In order to maintain a consistent style in the ``changelog.rst`` file, it is preferred to keep the entries to the
191189
point, in sentence case, shorter than 120 characters and in an imperative tone -- an entry should complete the sentence
192190
``This change will …``. In rare cases, where one line is not enough, use a summary line in an imperative tone followed
193-
by a blank line separating it from a description of the feature/change in one or more paragraphs, each wrapped
194-
at 120 characters. Remember that a changelog entry is meant for end users and should only contain details relevant to an
195-
end user.
191+
by a blank line separating it from a description of the feature/change in one or more paragraphs, each wrapped at 120
192+
characters. Remember that a changelog entry is meant for end users and should only contain details relevant to an end
193+
user.
196194

197195

198196
Becoming a maintainer
199197
~~~~~~~~~~~~~~~~~~~~~
200198

201199
If you want to become an official maintainer, start by helping out. As a first step, we welcome you to triage issues on
202-
tox's issue tracker. tox maintainers provide triage abilities to contributors once they have been around
203-
for some time and contributed positively to the project. This is optional and highly recommended for becoming a
204-
tox maintainer. Later, when you think you're ready, get in touch with one of the maintainers and they will
205-
initiate a vote among the existing maintainers.
200+
tox's issue tracker. tox maintainers provide triage abilities to contributors once they have been around for some time
201+
and contributed positively to the project. This is optional and highly recommended for becoming a tox maintainer. Later,
202+
when you think you're ready, get in touch with one of the maintainers and they will initiate a vote among the existing
203+
maintainers.
206204

207205
.. note::
208206

209-
Upon becoming a maintainer, a person should be given access to various tox-related tooling across
210-
multiple platforms. These are noted here for future reference by the maintainers:
207+
Upon becoming a maintainer, a person should be given access to various tox-related tooling across multiple
208+
platforms. These are noted here for future reference by the maintainers:
211209

212210
- GitHub Push Access (provides also CI administration capabilities)
213211
- PyPI Publishing Access

docs/faq.rst

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ directly. pip accepts environment variables as configuration flags, therefore th
7878
set_env =
7979
PIP_INDEX_URL = https://tox.wiki/pypi/simple
8080
81-
It's considered a best practice to allow the user to change the index server rather than hard code it, allowing them
82-
to use for example a local cache when they are offline. Therefore, a better form of this would be:
81+
It's considered a best practice to allow the user to change the index server rather than hard code it, allowing them to
82+
use for example a local cache when they are offline. Therefore, a better form of this would be:
8383

8484
.. code-block:: ini
8585
@@ -132,8 +132,8 @@ error to be raised when the package dependencies conflict with the test environm
132132
For stronger guarantees, set ``use_frozen_constraints = true`` in the test environment to generate the constraints file
133133
based on the exact versions enumerated by the ``list_dependencies_command`` (``pip freeze``). When using frozen
134134
constraints, if the package deps are incompatible with any previously installed dependency, an error will be raised.
135-
To use constraints with url, path, or "extras" (``.[tests]``) deps, then you must ``use_frozen_constraints``, as
136-
these types of deps are not valid constraints as specified (see pypa/pip#8210).
135+
To use constraints with url, path, or "extras" (``.[tests]``) deps, then you must ``use_frozen_constraints``, as these
136+
types of deps are not valid constraints as specified (see pypa/pip#8210).
137137

138138
Note constraint files are a subset of requirement files. Therefore, it's valid to pass a constraint file wherever you
139139
can specify a requirement file.
@@ -197,8 +197,8 @@ Customizing virtual environment creation
197197
----------------------------------------
198198

199199
By default tox uses the :pypi:`virtualenv` to create Python virtual environments to run your tools in. To change how tox
200-
creates virtual environments you can set environment variables to customize virtualenv. For example, to provision a given
201-
pip version in the virtual environment you can set ``VIRTUALENV_PIP`` or to enable system site packages use the
200+
creates virtual environments you can set environment variables to customize virtualenv. For example, to provision a
201+
given pip version in the virtual environment you can set ``VIRTUALENV_PIP`` or to enable system site packages use the
202202
``VIRTUALENV_SYSTEM_SITE_PACKAGES``:
203203

204204

@@ -210,8 +210,8 @@ pip version in the virtual environment you can set ``VIRTUALENV_PIP`` or to enab
210210
VIRTUALENV_PIP==22.1
211211
VIRTUALENV_SYSTEM_SITE_PACKAGES=true
212212
213-
Consult the :pypi:`virtualenv` project for supported values (any CLI flag for virtualenv, in all upper case, prefixed
214-
by the ``VIRTUALENV_`` key).
213+
Consult the :pypi:`virtualenv` project for supported values (any CLI flag for virtualenv, in all upper case, prefixed by
214+
the ``VIRTUALENV_`` key).
215215

216216
Building documentation with Sphinx
217217
----------------------------------
@@ -224,8 +224,8 @@ We don't recommend using the Make and Batch file generated by Sphinx, as this ma
224224
platform specific. A better solution is to use tox to setup a documentation build environment and invoke sphinx inside
225225
it. This solution is cross platform.
226226

227-
For example if the sphinx file structure is under the ``docs`` folder the following configuration will generate
228-
the documentation under ``.tox/docs_out/index.html`` and print out a link to the generated documentation:
227+
For example if the sphinx file structure is under the ``docs`` folder the following configuration will generate the
228+
documentation under ``.tox/docs_out/index.html`` and print out a link to the generated documentation:
229229

230230
.. code-block:: ini
231231
@@ -270,8 +270,7 @@ substitution logic to avoid duplication:
270270
Understanding ``InvocationError`` exit codes
271271
--------------------------------------------
272272

273-
When a command executed by tox fails, it always has a non-zero exit code and an ``InvocationError`` exception is
274-
raised:
273+
When a command executed by tox fails, it always has a non-zero exit code and an ``InvocationError`` exception is raised:
275274

276275
.. code-block:: shell
277276
@@ -292,9 +291,9 @@ module, an additional hint is given:
292291
293292
294293
The signal numbers (e.g. 11 for a segmentation fault) can be found in the "Standard signals" section of the
295-
`signal man page <https://man7.org/linux/man-pages/man7/signal.7.html>`_.
296-
Their meaning is described in `POSIX signals <https://en.wikipedia.org/wiki/Signal_(IPC)#POSIX_signals>`_. Beware
297-
that programs may issue custom exit codes with any value, so their documentation should be consulted.
294+
`signal man page <https://man7.org/linux/man-pages/man7/signal.7.html>`_. Their meaning is described in
295+
`POSIX signals <https://en.wikipedia.org/wiki/Signal_(IPC)#POSIX_signals>`_. Beware that programs may issue custom exit
296+
codes with any value, so their documentation should be consulted.
298297

299298

300299
Sometimes, no exit code is given at all. An example may be found in
@@ -304,8 +303,8 @@ Sometimes, no exit code is given at all. An example may be found in
304303
Access full logs
305304
----------------
306305

307-
If you want to access the full logs you need to write ``-q`` and ``-v`` as
308-
individual tox arguments and avoid combining them into a single one.
306+
If you want to access the full logs you need to write ``-q`` and ``-v`` as individual tox arguments and avoid combining
307+
them into a single one.
309308

310309
Running within a Docker container
311310
---------------------------------
@@ -354,12 +353,11 @@ Testing end-of-life Python versions
354353
-----------------------------------
355354

356355
``tox`` uses ``virtualenv`` under its hood for managing virtual environments.
356+
`Virtualenv 20.22.0 <https://virtualenv.pypa.io/en/latest/changelog.html#v20-22-0-2023-04-19>`_ dropped support for all
357+
Python versions smaller or equal to Python 3.6.
357358

358-
`Virtualenv 20.22.0 <https://virtualenv.pypa.io/en/latest/changelog.html#v20-22-0-2023-04-19>`_
359-
dropped support for all Python versions smaller or equal to Python 3.6.
360-
361-
If you need to test against e.g. Python 2.7, 3.5 or 3.6, you need to add the
362-
following ``requires`` statement to your ``tox.ini`` configuration files.
359+
If you need to test against e.g. Python 2.7, 3.5 or 3.6, you need to add the following ``requires`` statement to your
360+
``tox.ini`` configuration files.
363361

364362
.. code-block:: ini
365363

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sdist
4040
~~~~~
4141
When installing via a source distribution you need an installer that handles the :pep:`517` specification. In case of
4242
``pip`` this is version ``18.0.0`` or later (released in July 2018). If you cannot upgrade your pip to support this you
43-
need to ensure that the build requirements from :gh:`pyproject.toml <tox-dev/tox/blob/main/pyproject.toml#L2>` are
43+
need to ensure that the build requirements from :gh:`pyproject.toml <tox-dev/tox/blob/main/pyproject.toml>` are
4444
satisfied before triggering the installation.
4545

4646
via ``setup.py``

0 commit comments

Comments
 (0)