Support loading environments from external files

Issue #295 on hold
Timothy Allen created an issue

Currently tox allows you to define a bunch of test environments in a single tox.ini file, which is a great way to help multiple contributors to a single project stay in sync.

However, I have many small projects with differing release schedules, and I want them all to be consistent with each other. Copy/pasting tox.ini changes from project to project is error-prone and tedious, so I want a way to put environment configuration in a central location and make each project include it by reference, possibly overriding some settings.

For example, let's say I always want to be warned about code with a McCabe complexity over 10. I could make a separate file containing:

    flake8 --max-complexity 10

...then all my projects' tox.ini files could say something like:


...and when tox saw that setting, it could download the file, parse it, and then update it with the contents of the local tox.ini.

As an alternative to downloading a file every time tox is run, perhaps inherit_from could be an absolute or relative path (relative to the directory containing tox.ini) so that the extra settings could be distributed via SVN externals or git submodules.

Comments (4)

  1. Ronny Pfannschmidt

    An inheritance model is tricky to get right

    URLs are a huge security hazard

    References into pzthon packages on the other hand might be nice

  2. Timothy Allen reporter

    Tox already has an inheritance model of some kind: the testenv:py27 section inherits settings from the testenv section. It would be nice to have a sophisticated and clever inheritance model, but whatever the existing code does would be enough to start with.

  3. Log in to comment