Skip to content

RFC: generic configuration manipulation from the command line #634

@obestwalter

Description

@obestwalter

This came up in #631.

Maybe tox should just have an -o option to override any ini option, like pytest has? With that, you could do tox -o skip_missing_interpreters=false but also e.g. tox -o distdir=foo, and maybe even tox -o '[testenv:py35]basepython=python3.5'.

-- @The-Compiler

pytest --help:

-o [OVERRIDE_INI [OVERRIDE_INI ...]], 
--override-ini=[OVERRIDE_INI [OVERRIDE_INI ...]]

        override config option with option=value style, e.g. `-o xfail_strict=True`.

I think this would be a great direction and would render all needs for specific command line overrides obsolete.

Further interesting snippets from that discussion:

Ooh that sounds like the best option.

If we wanted to make it generic perhaps something like this?

  • -o tox.skip_missing_interpreters=True
  • --option testenv:py35.basepython=python3.5

Or with brackets?

  • -o [tox]skip_missing_interpreters=True
  • -o [testenv:py35]basepython=True

-- @asottile

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationfeature:newsomething does not exist yet, but shouldhelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.level:hardrought estimate that this might be quite hard to implementneeds:discussionIt's not quite clear if and how this should be done

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions