Allow user configuration outside of tox.ini

Issue #154 on hold
radeex created an issue

I would like to override the "toxworkdir" config option without editing a project's tox.ini. As far as I can tell, there's no mechanism to allow me to do this.

It should probably be possible to specify additional config files somehow.

Comments (6)

  1. Marc Abramowitz

    Yeah, in the past, I've sometimes wished that there were a ~/.tox/tox.config or something.

    My use case is that I love having pdbpp or ipdb or whatever debugging tools present in my tox virtualenvs so that if the tests fail, I have some nice tools already present for debugging. In the past, I have done one of these:

    1. Manually install tool -- e.g.: .tox/py27/bin/pip install pdbpp -- this is tedious and has to be repeated if the virtualenv gets rebuilt.
    2. Add it to tox.ini for project. This is mostly okay but sometimes others have (rightfully) complained that I'm adding unnecessary dependencies that could break the tests or increase the time to run the tests, so I shouldn't be adding my own personal favorites.

    So I have sometimes wished that I could have a user configuration that allows me to tell tox to install these tools in every virtualenv it creates. The one gotcha with this is that if abused, people can have a build that works in one person's environment but not another's because they've put necessary deps in their user config. One thing to help with this is an option that tells tox not to use the user config. Hopefully, people would periodically run without the user config to make sure stuff works without any user config.

    The user config might also be a good place to put alternative index servers. We have an internal indexserver for our company and it's referenced in the tox.ini of tens of different projects. Not so DRY.

  2. Holger Krekel repo owner

    I agree it'd be useful to "enhance" tox config from a) a user-specific file b) from the command line. If it happens, tox should report it explicitely. As to a) we might also think about introducing a plugin mechanism so that e.g. $HOME/.tox/ is read and can define hooks that tox calls (similar to pytest is extended through tox).

  3. Marc Abramowitz

    The mechanism in pytest is super useful. I wonder if tox could have a similar mechanism?

    Hmmm, you called your file that too - maybe you had the same idea? :-)

  4. Holger Krekel repo owner

    right, i meant it this way :)

    However, i am a bit hard pressed with spending much time on tox. Hope you and others continue to help with things :)

  5. Log in to comment