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

Allow more lax env selection from computed factors #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 9, 2021

  1. Allow more lax env selection from computed factors

    The previous env selection was rather strict when there were more than 2
    factors supplied and this change allows users to relax it with the
    section value "envs_are_optional" which will become the default in a
    future release.
    
    Given the following factors:
    
      [{"py38", "lint"}, {"reqV1", "reqV2"}, {"opReqV1", "opReqV2"}]
    
    The existing env selection would only match:
    
    - py38-reqV1-opReqV1
    - py38-reqV2-opReqV1
    - py38-reqV1-opReqV2
    - py38-reqV2-opReqV2
      ...
    - lint-reqV1-opReqV1
      ...
    
    It would fail to match the single factor "lint". Although, this may be
    correct for required factors, but for something like "lint" it may not
    need the additional factors that are required with the previous env
    selection.
    
    This change allows selecting the following envs:
    
    - py38
    - py38-reqV1
    - py38-reqV2
    - py38-opReqV1
    - py38-opReqV2
    - py38-reqV1-opReqV1
    - py38-reqV2-opReqV1
    - py38-reqV2-opReqV2
    - lint
    - ...
    
    In addition, this change makes the order of the factors no longer important:
    
    - py38-opReqV1-reqV1
    - reqV1-opReqV1-py38
    
    All of these permutations are bound by the envlist that the user defines
    in their tox configuration so it is up to the user to keep their
    configuration organized and not go crazy with their factor ordering.
    terencehonles committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    2cea5ac View commit details
    Browse the repository at this point in the history