How are "additional environments" calculated? (tox list
)
#3014
-
I want to better understand how Tox derives the "additional environments" shown by the For a Tox setup on GitHub using GHA I use tox-gh-actions to determine the environment to run on GHA for a single job of a job matrix (e.g. run It looks like this, for some reason, results in $ tox list
default environments:
flake8 -> Static code analysis and code style
isort -> Ensure imports are ordered consistently
pylint -> Check for errors and code smells
py27 -> Unit tests and test coverage
py35 -> Unit tests and test coverage
py36 -> Unit tests and test coverage
py37 -> Unit tests and test coverage
py38 -> Unit tests and test coverage
py39 -> Unit tests and test coverage
py310 -> Unit tests and test coverage
py311 -> Unit tests and test coverage
pypy2 -> Unit tests and test coverage
pypy3 -> Unit tests and test coverage
bandit -> PyCQA security linter
package -> Build package and check metadata (or upload package)
clean -> Clean up bytecode and build artifacts
additional environments:
black -> Ensure consistent code style
license -> Manage license compliance
2.7 -> Unit tests and test coverage
3.5 -> Unit tests and test coverage
3.6 -> Unit tests and test coverage
3.7 -> Unit tests and test coverage
3.8 -> Unit tests and test coverage
3.9 -> Unit tests and test coverage
3.10 -> Unit tests and test coverage
3.11 -> Unit tests and test coverage
pypy-2.7 -> Unit tests and test coverage
pypy-3.8 -> Unit tests and test coverage The above output comes from a setup having the following Python version ⇔ Tox environment mapping: [gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-2.7: pypy2
pypy-3.8: pypy3 Why does this happen? Is this behavior intended? If yes, how does one get rid of the, certainly not intentionally set up, "additional environments"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is because of a bad design decision of that plugin to use : instead of = for assignment. tox uses : for factor definition so these additional factors get picked up as environments. I recommend using the tox-gh plugin instead that doesn't have this flaw. |
Beta Was this translation helpful? Give feedback.
This is because of a bad design decision of that plugin to use : instead of = for assignment. tox uses : for factor definition so these additional factors get picked up as environments. I recommend using the tox-gh plugin instead that doesn't have this flaw.