Skip to content
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

Undocumented user level config file [tox4] #2633

Closed
ziima opened this issue Dec 8, 2022 · 5 comments
Closed

Undocumented user level config file [tox4] #2633

ziima opened this issue Dec 8, 2022 · 5 comments
Labels
area:documentation help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@ziima
Copy link
Contributor

ziima commented Dec 8, 2022

In FAQ for tox 4 I discovered a note about "user level config-file", but I can't find any details, such as default file location, structure of the config and its behavior.

@jugmac00
Copy link
Member

jugmac00 commented Dec 8, 2022

Thanks for your report. I agree this is under-documented.

As a starter, if you finish the above quoted sentence, it is mentioned that you should run tox --help for the file location.

When I do that, I see

config file '/home/jugmac00/.config/tox/config.ini' missing (change via env var TOX_CONFIG_FILE)

at the very end of the output.

@gaborbernat gaborbernat added area:documentation help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. labels Dec 8, 2022
@gaborbernat gaborbernat added this to the 4.0.x milestone Dec 8, 2022
@jugmac00
Copy link
Member

jugmac00 commented Dec 8, 2022

@gaborbernat I played a bit with user level config-file.

Could you give an example how one would look like and what use cases are there?

Then I could create some documentation.

@gaborbernat
Copy link
Member

It's mostly to alter CLI defaults, e.g. you can set:

[tox]
work_dir = .tox-magic

To change the working directory, I think 🤔

@gaborbernat gaborbernat modified the milestones: 4.0.x, 4.1 Dec 9, 2022
ziima added a commit to ziima/tox that referenced this issue Dec 16, 2022
@kpfleming
Copy link

I just tried to use this for the first time. I have /tox/config.ini with only the example above (setting the workdir (not work_dir)), and TOX_CONFIG_FILE pointed to it.

Unfortunately tox doesn't even look at tox.ini in the local directory with the environment variable set this way. In a directory containing a tox.ini which defines 7 environments:

  • With TOX_CONFIG_FILE set to point to the user-level config file, tox list lists only the default py environment.

  • With TOX_CONFIG_FILE not set, tox list lists the seven defined environments.

At least with tox 4.3.5, this is not working the way it is documented, the specified configuration file replaces the automatically-found one, it doesn't augment it. If you'd prefer that I open a new issue, I'm happy to do that.

@masenf
Copy link
Collaborator

masenf commented Jan 24, 2023

Link issue #2890

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

5 participants