Skip to content

Commit 1a50180

Browse files
authored
minor doc improvements (#2006)
1 parent 9608e23 commit 1a50180

File tree

9 files changed

+61
-67
lines changed

9 files changed

+61
-67
lines changed

docs/changelog/2006.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Start polishing the documentation for the upcoming final release - by :user:`jugmac00`.

docs/development.rst

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To run tests locally execute:
5656
tox -e py
5757
5858
This will run the test suite for the same Python version as under which ``tox`` is installed. Alternatively you can
59-
specify a specific version of python by using the ``pyNN`` format, such as: ``py38``, ``pypy3``, etc.
59+
specify a specific version of Python by using the ``pyNN`` format, such as: ``py38``, ``pypy3``, etc.
6060

6161
``tox`` has been configured to forward any additional arguments it is given to ``pytest``.
6262
This enables the use of pytest's
@@ -71,14 +71,14 @@ select tests using the various ways that pytest provides:
7171
tox -e py -- -k "test_extra"
7272
7373
Some tests require additional dependencies to be run, such is the various shell activators (``bash``, ``fish``,
74-
``powershell``, etc). These tests will automatically be skipped if these are not present, note however that in CI
74+
``powershell``, etc). The tests will be skipped automatically if the dependencies are not present. Please note however that in CI
7575
all tests are run; so even if all tests succeed locally for you, they may still fail in the CI.
7676

7777
Running linters
7878
~~~~~~~~~~~~~~~
7979

8080
tox uses :pypi:`pre-commit` for managing linting of the codebase. ``pre-commit`` performs various checks on all
81-
files in tox and uses tools that help follow a consistent code style within the codebase. To use linters locally,
81+
files in tox and uses tools that help following a consistent code style within the codebase. To use linters locally,
8282
run:
8383

8484
.. code-block:: shell
@@ -96,7 +96,7 @@ Code style guide
9696

9797
- First and foremost, the linters configured for the project must pass; this generally means following PEP-8 rules,
9898
as codified by: ``flake8``, ``black``, ``isort``, ``pyupgrade``.
99-
- Packaging options should be specified within ``setup.cfg``, ``setup.py`` is only kept for editable installs.
99+
- Packaging options should be specified within ``setup.cfg``; ``setup.py`` is only kept for editable installs.
100100
- All code (tests too) must be type annotated as much as required by ``mypy``.
101101
- We use a line length of 120.
102102
- Exception messages should only be capitalized (and ended with a period/exclamation mark) if they are multi-sentenced,
@@ -132,13 +132,13 @@ Contributing
132132
Submitting pull requests
133133
~~~~~~~~~~~~~~~~~~~~~~~~
134134

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

141-
Pull Requests should be small to facilitate review. Keep them self-contained, and limited in scope. `Studies have shown
141+
Pull requests should be small to facilitate review. Keep them self-contained, and limited in scope. `Studies have shown
142142
<https://www.kessler.de/prd/smartbear/BestPracticesForPeerCodeReview.pdf>`_ that review quality falls off as patch size
143143
grows. Sometimes this will result in many small PRs to land a single large feature. In particular, pull requests must
144144
not be treated as "feature branches", with ongoing development work happening within the PR. Instead, the feature should
@@ -151,22 +151,22 @@ or whitespace within lines. Such changes can be made separately, as a "formattin
151151
Automated testing
152152
~~~~~~~~~~~~~~~~~
153153

154-
All pull requests and merges to 'master' branch are tested using
155-
`Azure Pipelines <https://azure.microsoft.com/en-gb/services/devops/pipelines/>`_ (configured by
156-
``azure-pipelines.yml`` file at the root of the repository). You can find the status and results to the CI runs for your
154+
All pull requests and merges to the ``master`` branch are tested using
155+
`GitHub Actions <https://github.com/features/actions>`_ (configured by ``check.yml`` file inside the
156+
``.github/workflows`` directory). You can find the status and the results to the CI runs for your
157157
PR on GitHub's Web UI for the pull request. You can also find links to the CI services' pages for the specific builds in
158158
the form of "Details" links, in case the CI run fails and you wish to view the output.
159159

160160
To trigger CI to run again for a pull request, you can close and open the pull request or submit another change to the
161161
pull request. If needed, project maintainers can manually trigger a restart of a job/build.
162162

163-
NEWS entries
164-
~~~~~~~~~~~~
163+
Changelog entries
164+
~~~~~~~~~~~~~~~~~
165165

166-
The ``changelog.rst`` file is managed using :pypi:`towncrier` and all non trivial changes must be accompanied by a news
167-
entry. To add an entry to the news file, first you need to have created an issue describing the change you want to
168-
make. A Pull Request itself *may* function as such, but it is preferred to have a dedicated issue (for example, in case
169-
the PR ends up rejected due to code quality reasons).
166+
The ``changelog.rst`` file is managed using :pypi:`towncrier` and all non trivial changes must be accompanied by a
167+
changelog entry. To add an entry to the changelog, first you need to have created an issue describing the
168+
change you want to make. A pull request itself *may* function as such, but it is preferred to have a dedicated issue
169+
(for example, in case the PR ends up rejected due to code quality reasons).
170170

171171
Once you have an issue or pull request, you take the number and you create a file inside of the ``docs/changelog``
172172
directory named after that issue number with an extension of:
@@ -183,27 +183,20 @@ added a feature and deprecated/removed the old feature at the same time, you wou
183183
``docs/changelog/1234.bugfix.rst`` and ``docs/changelog/1234.remove.rst``). Likewise if a PR touches multiple issues/PRs
184184
you may create a file for each of them with the same contents and :pypi:`towncrier` will deduplicate them.
185185

186-
Contents of a NEWS entry
187-
^^^^^^^^^^^^^^^^^^^^^^^^
186+
Contents of a changelog entry
187+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188188

189-
The contents of this file are reStructuredText formatted text that will be used as the content of the news file entry.
189+
The content of this file is reStructuredText formatted text that will be used as the content of the changelog entry.
190190
You do not need to reference the issue or PR numbers here as towncrier will automatically add a reference to all of
191-
the affected issues when rendering the news file.
191+
the affected issues when rendering the changelog.
192192

193-
In order to maintain a consistent style in the ``changelog.rst`` file, it is preferred to keep the news entry to the
193+
In order to maintain a consistent style in the ``changelog.rst`` file, it is preferred to keep the entries to the
194194
point, in sentence case, shorter than 120 characters and in an imperative tone -- an entry should complete the sentence
195195
``This change will …``. In rare cases, where one line is not enough, use a summary line in an imperative tone followed
196196
by a blank line separating it from a description of the feature/change in one or more paragraphs, each wrapped
197-
at 120 characters. Remember that a news entry is meant for end users and should only contain details relevant to an end
198-
user.
199-
200-
Choosing the type of NEWS entry
201-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197+
at 120 characters. Remember that a changelog entry is meant for end users and should only contain details relevant to an
198+
end user.
202199

203-
A trivial change is anything that does not warrant an entry in the news file. Some examples are: code refactors that
204-
don't change anything as far as the public is concerned, typo fixes, white space modification, etc. To mark a PR
205-
as trivial a contributor simply needs to add a randomly named, empty file to the ``news/`` directory with the extension
206-
of ``.trivial``.
207200

208201
Becoming a maintainer
209202
~~~~~~~~~~~~~~~~~~~~~

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ and `devpi <https://devpi.net/>`_).
3737
tox is a generic virtual environment management and test command line tool you can use for:
3838

3939
* checking your package builds and installs correctly under different environments (such as different Python
40-
implementations, versions or install dependencies),
40+
implementations, versions or installation dependencies),
4141
* running your tests in each of the environments with the test tool of choice,
4242
* acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and
4343
shell-based testing.

docs/installation.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Installation
44
via pipx
55
--------
66

7-
:pypi:`tox` is a CLI tool that needs a Python interpreter to run. The tool requires first to have ``Python 3.6+``
8-
interpreter the best is to use :pypi:`pipx` to install tox into an isolated environment. This has the added
7+
:pypi:`tox` is a CLI tool that needs a Python interpreter (version 3.6 or higher) to run.
8+
We recommend :pypi:`pipx` to install tox into an isolated environment. This has the added
99
benefit that later you'll be able to upgrade tox without affecting other parts of the system.
1010

1111
.. code-block:: console
@@ -17,7 +17,7 @@ via pip
1717
-------
1818

1919
Alternatively you can install it within the global Python interpreter itself (perhaps as a user package via the
20-
``--user`` flag). Be cautious if you are using a python install that is managed by your operating system or
20+
``--user`` flag). Be cautious if you are using a Python installation that is managed by your operating system or
2121
another package manager. ``pip`` might not coordinate with those tools, and may leave your system in an
2222
inconsistent state. Note, if you go down this path you need to ensure pip is new enough per the subsections below:
2323

@@ -29,8 +29,8 @@ inconsistent state. Note, if you go down this path you need to ensure pip is new
2929
wheel
3030
~~~~~
3131
Installing tox via a wheel (default with pip) requires an installer that can understand the ``python-requires``
32-
tag (see `PEP-503 <https://www.python.org/dev/peps/pep-0503/>`_), with pip this is version ``9.0.0`` (released 2016
33-
November). Furthermore, in case you're not installing it via the PyPi you need to be using a mirror that correctly
32+
tag (see `PEP-503 <https://www.python.org/dev/peps/pep-0503/>`_), with pip this is version ``9.0.0`` (released in
33+
November 2016). Furthermore, in case you're not installing it via PyPi you need to use a mirror that correctly
3434
forwards the ``python-requires`` tag (notably the OpenStack mirrors don't do this, or older
3535
`devpi <https://github.com/devpi/devpi>`_ versions - added with version ``4.7.0``).
3636

@@ -40,16 +40,16 @@ sdist
4040
~~~~~
4141
When installing via a source distribution you need an installer that handles the
4242
`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`_ specification. In case of ``pip`` this is version ``18.0.0`` or
43-
later (released on 2018 July). If you cannot upgrade your pip to support this you need to ensure that the build
43+
later (released in July 2018). If you cannot upgrade your pip to support this you need to ensure that the build
4444
requirements from `pyproject.toml <https://github.com/tox-dev/tox/blob/master/pyproject.toml#L2>`_ are satisfied
45-
before triggering the install.
45+
before triggering the installation.
4646

4747
via ``setup.py``
4848
----------------
49-
We don't recommend and officially support this method. One should prefer using an installer that supports
49+
We don't recommend and officially support this method. You should prefer using an installer that supports
5050
`PEP-517 <https://www.python.org/dev/peps/pep-0517/>`_ interface, such as pip ``19.0.0`` or later. That being said you
51-
might be able to still install a package via this method if you satisfy build dependencies before calling the install
52-
command (as described under :ref:`sdist`).
51+
might be able to still install a package via this method if you satisfy build dependencies before calling the
52+
installation command (as described under :ref:`sdist`).
5353

5454
latest unreleased
5555
-----------------

docs/plugins.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ on how to migrate.
127127

128128
``tox_get_python_executable``
129129
-----------------------------
130-
With tox 4 the python discovery is performed ``tox.tox_env.python.virtual_env.api._get_python`` that delegates the job
130+
With tox 4 the Python discovery is performed ``tox.tox_env.python.virtual_env.api._get_python`` that delegates the job
131131
to ``virtualenv``. Therefore first `define a new virtualenv discovery mechanism
132132
<https://virtualenv.pypa.io/en/latest/extend.html#python-discovery>`_ and then set that by setting the
133133
``VIRTUALENV_DISCOVERY`` environment variable.
@@ -136,6 +136,6 @@ to ``virtualenv``. Therefore first `define a new virtualenv discovery mechanism
136136
---------------
137137
Register new packager types via :func:`tox_register_tox_env <tox.plugin.spec.tox_register_tox_env>`.
138138

139-
``tox_addoption``
140-
-----------------
139+
``tox_adoption``
140+
----------------
141141
Renamed to :func:`tox_add_option <tox.plugin.spec.tox_add_option>`.

docs/user_guide.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ User Guide
22
==========
33

44
Basic example
5-
-----------------
5+
-------------
6+
67
Put basic information about your project and the test environments you want your project to run in into a ``tox.ini``
78
file residing at the root of your project:
89

910
.. code-block:: ini
1011
11-
# content of: tox.ini at the root of the project
12+
# content of tox.ini at the root of the project
1213
[tox]
1314
envlist =
1415
py38
@@ -22,15 +23,15 @@ file residing at the root of your project:
2223
# NOTE: you can run any command line tool here - not just tests
2324
pytest
2425
25-
You can also try generating a ``tox.ini`` file automatically, by running ``tox-quickstart`` and then answering a few
26-
simple questions. To sdist-package, install and test your project against Python3.7 and Python3.8, just type:
26+
You can also try generating a ``tox.ini`` file automatically by running ``tox quickstart`` and then answering a few
27+
simple questions. To sdist-package, install and test your project against Python3.7 and Python3.8, just type
2728

2829
.. code-block:: console
2930
3031
tox
3132
32-
and watch things happening (you must have python3.7 and python3.8 installed in your environment otherwise you will see
33-
errors). When you run ``tox`` a second time you'll note that it runs much faster because it keeps track of virtualenv
33+
and watch things happening. You must have python3.7 and python3.8 installed in your environment, otherwise you will see
34+
errors. When you run ``tox`` a second time you'll notice that it runs much faster because it keeps track of virtualenv
3435
details and will not recreate or re-install dependencies.
3536

3637
System overview
@@ -45,7 +46,7 @@ System overview
4546
tox roughly follows the following phases:
4647

4748
1. **configuration:** load ``tox.ini`` and merge it with options from the command line and the operating system
48-
environment variables.
49+
environment variables
4950
2. **packaging** (optional): create a source distribution of the current project by invoking
5051

5152
.. code-block:: bash
@@ -56,9 +57,9 @@ tox roughly follows the following phases:
5657
need to make sure that it contains your build dependencies). Skip this step for application projects that don't have
5758
a ``setup.py``.
5859

59-
3. **environment** - for each tox environment (e.g. ``py37``, ``py38``) do:
60+
3. **environment**: for each tox environment (e.g. ``py37``, ``py38``) do:
6061

61-
1. **environment creation**: create a fresh environment, by default :pypi:`virtualenv` is used. tox will
62+
1. **environment creation**: create a fresh environment; by default :pypi:`virtualenv` is used. tox will
6263
automatically try to discover a valid Python interpreter version by using the environment name (e.g. ``py37`` means
6364
Python 3.7 and the ``basepython`` configuration value) and the current operating system ``PATH`` value. This is
6465
created at first run only to be re-used at subsequent runs. If certain aspects of the project change, a re-creation
@@ -73,10 +74,9 @@ tox roughly follows the following phases:
7374
change.
7475

7576
3. **commands**: run the specified commands in the specified order. Whenever the exit code of any of them is not
76-
zero, stop and mark the environment failed. Note, starting a command with a single dash character means ignore exit
77-
code.
77+
zero, stop and mark the environment failed. When you start a command with a dash character, the exit code will be ignored.
7878

79-
6. **report** print out a report of outcomes for each tox environment:
79+
4. **report** print out a report of outcomes for each tox environment:
8080

8181
.. code:: bash
8282
@@ -96,21 +96,21 @@ Current features
9696
----------------
9797

9898
* **automation of tedious Python related test activities**
99-
* **test your Python package against many interpreter and dependency configs**
99+
* **test your Python package against many interpreter and dependency configurations**
100100

101-
- automatic customizable (re)creation of :pypi:`virtualenv` test environments - installs your ``setup.py`` based
102-
project into each virtual environment
103-
- test-tool agnostic: runs pytest, nose or unittests in a uniform manner
101+
- automatic customizable (re)creation of :pypi:`virtualenv` test environments
102+
- installs your project into each virtual environment
103+
- test-tool agnostic: runs pytest, nose or unittest in a uniform manner
104104

105105
* ``plugin system`` to modify tox execution with simple hooks.
106106
* uses :pypi:`pip` and :pypi:`setuptools` by default. Support for configuring the installer command through
107107
``install_command``.
108-
* **cross-Python compatible**: CPython-3.6 and higher, pypy 3.6+ and higher.
108+
* **cross-Python compatible**: CPython 3.6 and higher, pypy 3.6+ and higher.
109109
* **cross-platform**: Windows and Unix style environments
110110
* **integrates with continuous integration servers** like Jenkins (formerly known as Hudson) and helps you to avoid
111-
boilerplatish and platform-specific build-step hacks.
111+
boilerplatish and platform-specific build-step hacks
112112
* **full interoperability with devpi**: is integrated with and is used for testing in the :pypi:`devpi` system, a
113-
versatile PyPI index server and release managing tool.
113+
versatile PyPI index server and release managing tool
114114
* **driven by a simple ini-style config file**
115115
* **documented** examples and configuration
116116
* **concise reporting** about tool invocations and configuration errors

src/tox/plugin/spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _spec(func: _F) -> _F:
2020
@_spec
2121
def tox_register_tox_env(register: ToxEnvRegister) -> None: # noqa: U100
2222
"""
23-
Register new tox environment type that. You can register:
23+
Register new tox environment type. You can register:
2424
2525
- **run environment**: by default this is a local subprocess backed virtualenv Python
2626
- **packaging environment**: by default this is a PEP-517 compliant local subprocess backed virtualenv Python

src/tox/session/cmd/quickstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def tox_add_option(parser: ToxParser) -> None:
1515
our = parser.add_command(
1616
"quickstart",
1717
["q"],
18-
"Command-line script to quickly tox config file for a Python project",
18+
"Command line script to quickly create a tox config file for a Python project",
1919
quickstart,
2020
)
2121
our.add_argument(

src/tox/session/cmd/run/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def env_run_create_flags(parser: ArgumentParser, mode: str) -> None:
6363
metavar="path",
6464
of_type=Path,
6565
default=None,
66-
help="write a json file with detailed information about all commands and results involved",
66+
help="write a JSON file with detailed information about all commands and results involved",
6767
)
6868
if mode != "devenv":
6969
parser.add_argument(
@@ -101,7 +101,7 @@ def env_run_create_flags(parser: ArgumentParser, mode: str) -> None:
101101
parser.add_argument(
102102
"--develop",
103103
action="store_true",
104-
help="install package in develop mode",
104+
help="install package in development mode",
105105
dest="develop",
106106
)
107107
parser.add_argument(
@@ -118,7 +118,7 @@ def env_run_create_flags(parser: ArgumentParser, mode: str) -> None:
118118
dest="discover",
119119
nargs="+",
120120
metavar="path",
121-
help="for python discovery first try the python executables under these paths",
121+
help="for Python discovery first try the Python executables under these paths",
122122
default=[],
123123
)
124124
parser.add_argument(

0 commit comments

Comments
 (0)