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

Add support for capturing strings from factor variants (eg versions of deps) #333

Closed
pytoxbot opened this issue Sep 17, 2016 · 1 comment
Labels
area:configuration feature:new something does not exist yet, but should level:hard rought estimate that this might be quite hard to implement needs:discussion It's not quite clear if and how this should be done

Comments

@pytoxbot
Copy link

For projects that use tox to test against multiple versions of deps, it's common to see this type of version repetition in deps:

[tox]
envlist =
    py{26,27}-pip{062,063,070,071,072,080,081,082,083},
    py{26,27,33,34,35}-pip{100,101,102,110,120,121,130,131,140,141,150,151,152,153,154,155,156,600,601,602,603,604,605,606,607,608,610,611,700,701,702,703,710,711,712,800,801,802,803,810,811,812}

deps =
    nose
    pip062: pip==0.6.2
    pip063: pip==0.6.3
    pip070: pip==0.7.0
    # ...
    pip811: pip==8.1.1
    pip812: pip==8.1.2

It would be great if instead the version component of the factor could be captured (almost regex group style) and re-used as part of the pip install command. ie:

[tox]
envlist =
    py{26,27}-pip{0.6.2,0.6.3,0.7.0,0.7.1,0.7.2,0.8.0,0.8.1,0.8.2,0.8.3},
    ...

deps =
    nose
    pip{*}: pip=={0}

Where {0} denotes the first group matched on the left (though I'm fine with just allowing only one match per line if that's easier).

This would also require supporting periods in the envlist strings, since tox currently strips out the non-alphanumeric characters (in the example above, tox -l lists py26-pip062 rather than the expected py26-pip0.6.2).

Apologies if this is filed already (or in fact possible with the current syntax), I've read the docs and search the tracker, but it's hard to know what search terms to use.

@obestwalter obestwalter added area:configuration needs:discussion It's not quite clear if and how this should be done feature:new something does not exist yet, but should level:hard rought estimate that this might be quite hard to implement and removed enhancement labels Sep 4, 2017
@gaborbernat
Copy link
Member

Due to lack of activity on this issue, for now, we'll close this issue.

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:configuration feature:new something does not exist yet, but should level:hard rought estimate that this might be quite hard to implement needs:discussion It's not quite clear if and how this should be done
Projects
None yet
Development

No branches or pull requests

3 participants