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

Clearly differentiate between venv and tox setups in CONTRIBUTING.md #16067

Merged
merged 2 commits into from
Sep 8, 2023

Commits on Sep 7, 2023

  1. Clearly differentiate between venv and tox setups in CONTRIBUTING.md

    The blurb on how to use `tox` existed in the middle of the [**Running tests** section](/mypy/blob/master/CONTRIBUTING.md#running-tests), and was bookended without headings by non-`tox` workflow material. This more clearly delineates between `tox` and non-`tox` workflows for the newcomer.
    
    This also non-invasively allows running arbitrary commands using `testenv:dev`.
    
    ``` sh
    % tox -e dev
    # ... works as before
    % tox -e dev -- mypy runtests.py
    # ... runs dev commands and then runs mypy on runtests.py
    dev: commands[2]> mypy runtests.py
    Success: no issues found in 1 source file
    # ...
    % tox -e dev --override testenv:dev.allowlist_externals+=env -- env
    # ... runs dev commands and then runs env in dev environment
    test_case.py
    dev: commands[2]> env
    HOME=/home/posita
    LANG=en_US.UTF-8
    LANGUAGE=en_US.UTF8
    TERM=xterm-256color
    PATH=/home/posita/dev/3p/mypy/.tox/dev/bin:/home/posita/dev/3p/mypy/venv/bin:...
    PYTHONHASHSEED=...
    PIP_DISABLE_PIP_VERSION_CHECK=1
    PYTHONIOENCODING=utf-8
    TOX_ENV_NAME=dev
    TOX_WORK_DIR=/home/posita/dev/3p/mypy/.tox
    TOX_ENV_DIR=/home/posita/dev/3p/mypy/.tox/dev
    VIRTUAL_ENV=/home/posita/dev/3p/mypy/.tox/dev
    TOX_PACKAGE=/home/posita/dev/3p/mypy/.tox/.tmp/package/28/mypy-1.7.0+dev.6d19f9ddf110d4ad3af63d472e8d7aaf69e6260c.dirty-0.editable-py3-none-any.whl
    # ...
    ```
    posita committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    572f378 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    480795c View commit details
    Browse the repository at this point in the history