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

Set the --parallel default to "auto", not CPU count #3109

Merged
merged 1 commit into from
Aug 31, 2023

Commits on Aug 31, 2023

  1. Set the --parallel default to "auto", not CPU count

    There is no functional reason to have the ArgumentParser default be
    auto_detect_cpus(), as the option goes through a parser,
    "parse_num_processes", that replaces "auto" with auto_detect_cpus(),
    i.e. the CPU count.
    
    Making the default "auto" makes the documentation clearer and
    reproducible. Currently the tox docs say:
       -p VAL, --parallel VAL - run tox environments in parallel, the
       argument controls limit: all, auto - cpu count, some positive number,
       zero is turn off (default: 2)
    That is misleading to end users: the default is not "2", but "auto"; 2
    just happens to be the CPU count of the machine that generated these
    docs.
    
    Note that there was a DEFAULT_PARALLEL constant, that was however
    unused, as a result of an earlier refactoring. Reuse that constant for
    "auto" here.
    paravoid committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    37f51f2 View commit details
    Browse the repository at this point in the history