-
-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear how to use configuration reference in TOML config #3393
Comments
I would be surprised if that would work for any section with more than one entry in it (and even then the reference is an array that would be casted to string?). You should instead use https://tox.wiki/en/4.21.2/config.html#configuration-reference |
The TOML file is not an INI file and has its own rules, worth exploring the documentation I linked about the differences. |
@gaborbernat I did indeed read the docs both before, during, and after working through this problem and filing this issue, so I think I am left still confused unfortunately 😕 I don't think I am understanding the "you should instead use" and how it's different from the example. I want to understand and do the right thing, but having a hard time. Edit: Ahhh I think it clicked, just needed something mildly more than rubber ducking perhaps...let me give it a go and report back 😄 |
[tool.tox.env_run_base]
deps = ["pytest"]
[tool.tox.env.typecheck]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base"], extend = true },
"mypy",
]
commands = [["mypy", "src", "tests"]] Is what you want, but I would be interested to hear how we should improve the docs to make it clearer. |
Thanks, that was helpful getting me where I needed to go. It looks like the [env.src]
extras = ["A", "{env_name}"]
[env.dest]
- extras = [{ replace = "ref", of = ["env", "extras"], extend = true }, "B"]
+ extras = [{ replace = "ref", of = ["env", "src", "extras"], extend = true }, "B"] If I'm right about the bug there, then that was what was giving me some trouble seeing that |
Issue
I should be able to use
deps = ["{[arbitrary.section.name]deps}", "one", "two", ...]
to include the dependencies from that arbitrary section in the current section'sdeps
.When the arbitrary section is
tool.tox.env_run_base
ortool.tox.env_build_base
(at least), the dependencies from that section get installed, but none of the additionally-specified dependencies"one", "two", ...
get installed.Arbitrary other section names like
[deps_base]
,[deps.base]
, or even[tool.tox.deps_base]
seem to install all specified dependencies as expected.The documentation examples show
env_run_base
as a place to put basal dependencies, and although they don't use this exact configuration scenario they might encourage it as a natural next step.Oddly I also tried
[tool.tox.env_run_basezzz]
and that still fails also, so smells like astartswith
kind of problem somewhere?Environment
Provide at least:
Output of
pip list
of the host Python, wheretox
is installedOutput of running tox
Output of
tox -rvv
TL;DR:
Minimal example
The text was updated successfully, but these errors were encountered: