Skip to content

Commit a61fcfb

Browse files
authored
📝 docs: name the actor across the factor and override prose (#4058)
A second wording pass, over the prose that #4057 did not reach. That means the explanation, how-to, tutorial and reference text from the factor and override work, plus the changelog entries already released. The same fault runs through it. A variable sidesteps a problem, a value goes through a pass, an override carries a string, an environment picks a label. tox does each of those things, or you do, and the sentences now name whichever it is. Smaller edits alongside. A cleft opener, `which is what makes`, states its point outright. `carries` and `takes` settle on one word per idea. `a name that no longer tells the whole story` says what it fails to record. Two entries from other contributors changed as well, since the release notes read as one voice. A vague `Improve` became `Declare`, and `can now carry` became `now takes`. No claim changes. Sphinx builds with warnings as errors and the docs suite executes the examples.
1 parent 44fc6ac commit a61fcfb

5 files changed

Lines changed: 25 additions & 25 deletions

File tree

docs/changelog.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Improved documentation - 4.61.2
2929
Contributor-facing changes - 4.61.2
3030
===================================
3131

32-
- Improve license metadata (PEP 639), add ``license-files`` and remove license classifier in ``pyproject.toml`` - by
33-
:user:`mwtoews`. (:issue:`4052`)
32+
- Declare license metadata per PEP 639, adding ``license-files`` and dropping the license classifier in
33+
``pyproject.toml`` - by :user:`mwtoews`. (:issue:`4052`)
3434

3535
**********************
3636
v4.61.1 (2026-08-28)
@@ -39,13 +39,13 @@ Contributor-facing changes - 4.61.2
3939
Bug fixes - 4.61.1
4040
==================
4141

42-
- Declare ``prefix`` inside the labeled factor group's ``not`` clause of the generated JSON Schema, so the published
43-
schema compiles under the strict mode SchemaStore validates with - by :user:`gaborbernat`. (:issue:`4051`)
42+
- Publish a JSON Schema that compiles under SchemaStore's validator again, so editors pick up the configuration keys
43+
added since 4.56 - by :user:`gaborbernat`. (:issue:`4051`)
4444

4545
Contributor-facing changes - 4.61.1
4646
===================================
4747

48-
- Check tox's JSON Schema against SchemaStore's own validator on every pull request that touches it, and before the
48+
- Check tox's JSON Schema with SchemaStore's own validator on every pull request that changes it, and again before the
4949
release sync opens a pull request there - by :user:`gaborbernat`. (:issue:`4051`)
5050

5151
**********************
@@ -58,7 +58,7 @@ Features - 4.61.0
5858
- A labeled factor group can now declare a ``default`` for ``{factor:label}`` to fall back on when no factor of that
5959
group is active in the environment name. Setting ``TOX_FACTOR_<label>`` resolves that label to a given value for a
6060
single run - by :user:`gaborbernat`. (:issue:`4045`)
61-
- A factor range can now carry a label by nesting it under one, as in ``factors = [{ py_version = { prefix = "3.", start
61+
- A factor range now takes a label when you nest it under one, as in ``factors = [{ py_version = { prefix = "3.", start
6262
= 12, stop = 14 } }]``, which makes ``{factor:py_version}`` available for ranges - by :user:`gaborbernat`.
6363
(:issue:`4046`)
6464

docs/explanation.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -345,25 +345,25 @@ have labeled one shape and left the other out. Nesting covers both with one rule
345345
and the value describes its factors. Adding a shape later means describing another value, not teaching every earlier
346346
shape one more key.
347347

348-
A labeled factor value is part of the environment name, which is what makes ``tox run -e test-3.14-django50`` mean one
349-
thing. That leaves no way to name a version the matrix does not list on the command line, since ``>=4.2,<4.3`` cannot
350-
serve as a factor. ``TOX_FACTOR_<label>`` sidesteps that by leaving the name alone. The run goes through the environment
351-
the matrix generated, and only ``{factor:label}`` resolves elsewhere. The cost is a name that no longer tells the whole
352-
story, so the override suits a one-off check rather than a recorded configuration.
348+
A labeled factor value is part of the environment name, so ``tox run -e test-3.14-django50`` means one thing. That
349+
leaves no way to name a version the matrix does not list on the command line, since ``>=4.2,<4.3`` cannot be a factor.
350+
Set ``TOX_FACTOR_<label>`` instead, which leaves the name alone. tox runs the environment the matrix generated, and only
351+
``{factor:label}`` resolves elsewhere. The cost is a name that no longer records everything about the run, so the
352+
override suits a one-off check rather than a recorded configuration.
353353

354354
For the configuration reference, see :ref:`env-base-templates`. For practical recipes, see :ref:`howto_env_base_matrix`.
355355

356356
Overrides and substitution
357357
==========================
358358

359-
An override arrives as one command line string, whatever the configuration file format, so tox converts it with the ini
360-
string rules rather than the TOML ones. That is why ``-x env_run_base.commands=pytest tests`` works in a TOML project
361-
even though the file itself spells commands as a list of lists.
359+
tox receives an override as one command line string, whatever the configuration file format, so it converts the value
360+
with the ini string rules rather than the TOML ones. That is why ``-x env_run_base.commands=pytest tests`` works in a
361+
TOML project even though the file itself spells commands as a list of lists.
362362

363-
The value still goes through the substitution pass belonging to the loader it overrides, which is what lets
364-
``{posargs}`` and ``{env:VAR}`` resolve inside it. Skipping that pass would make an override the one place in tox where
365-
a ``{...}`` reference means nothing, and a command overridden for a single run would stop forwarding the arguments given
366-
to it with no sign that it had.
363+
tox still runs the value through the substitution pass of the loader it overrides, so ``{posargs}`` and ``{env:VAR}``
364+
resolve inside it. Skipping that pass would make an override the one place in tox where a ``{...}`` reference means
365+
nothing, and a command overridden for a single run would stop forwarding the arguments given to it with no sign that it
366+
had.
367367

368368
.. _work-dir-placement:
369369

docs/how-to/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ location can be changed via the ``TOX_CONFIG_FILE`` environment variable.
191191
# Force editable install for a specific environment
192192
tox run -e 3.13 -x "testenv:3.13.package=editable"
193193
194-
An override value takes substitutions, so it can reach the same values the configuration file can:
194+
tox substitutes into an override value, so it reaches the same values a configuration file can:
195195

196196
.. code-block:: bash
197197
@@ -1171,7 +1171,7 @@ To override a specific generated environment, add an explicit ``[env.NAME]`` sec
11711171
11721172
The inheritance chain is: ``[env.{name}]`` > ``[env_base.{template}]`` > ``[env_run_base]``.
11731173

1174-
Nest a group under a name to label it, so ``{factor:label}`` reaches the value the current environment picked. Both
1174+
Nest a group under a name to label it, so ``{factor:label}`` resolves to the value in the current environment name. Both
11751175
lists and range dicts take a label:
11761176

11771177
.. code-block:: toml

docs/reference/config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ labeled group is an active factor in the current environment. Every factor group
239239
For ``sync-oci-pw``, the description resolves to ``Sync oci artifacts to pw`` and the command receives ``--ecosystem
240240
oci``.
241241

242-
A range dict carries a label when you nest it under one:
242+
A range dict takes a label when you nest it under one:
243243

244244
.. code-block:: toml
245245
@@ -2366,7 +2366,7 @@ An override value goes through the same substitution pass as a value written in
23662366
23672367
$ tox -x env_run_base.commands='pytest {posargs:tests}' -e py -- -k slow
23682368
2369-
This runs ``pytest -k slow``. Overrides carry a command line string whatever the configuration file format, so the ini
2369+
This runs ``pytest -k slow``. An override is a command line string whatever the configuration file format, so the ini
23702370
spelling of a substitution applies in a TOML project as well.
23712371

23722372
Overrides propagate through references

docs/tutorial/getting-started.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ environments from factor combinations:
212212
This generates ``test-3.13`` and ``test-3.14``, each inheriting deps and commands from the template. The template itself
213213
inherits from ``env_run_base``, so global defaults still apply.
214214

215-
Ranges save spelling out every version, and nesting one under a name lets the rest of the section refer back to
216-
whichever value the environment picked:
215+
Ranges save spelling out every version, and nesting one under a name lets the rest of the section refer to the value in
216+
the environment name:
217217

218218
.. code-block:: toml
219219
@@ -223,7 +223,7 @@ whichever value the environment picked:
223223
commands = [["pytest"]]
224224
description = "run the tests under Python {factor:py_version}"
225225
226-
A group can also name the value to assume when an environment carries none of its factors, which saves repeating a
226+
A group can also name the value to assume when an environment contains none of its factors, which saves repeating a
227227
fallback at every mention. To check one run against a version the matrix does not list, set ``TOX_FACTOR_py_version``
228228
for that run.
229229

0 commit comments

Comments
 (0)