<commit_before># Note: while tox currently supports config in pyproject.toml, for now it only support ini-style config passed
# as a big multi-line string value (under the key "tool.tox.legacy_tox_ini"). It is currently cleaner to keep the
# tox.ini file until tox support a proper toml-based configuration

[tox]
# See:
#   - https://docs.djangoproject.com/en/2.2/faq/install/#what-python-version-can-i-use-with-django
#   - https://docs.djangoproject.com/en/3.2/faq/install/#what-python-version-can-i-use-with-django
#   - https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django
envlist=
  django21-py{35,36,37}
  django22-py{35,36,37,38,39}
  django{30,31}-py{36,37,38,39}
  django32-py{36,37,38,39,310}
  django40-py{38,39,310}
  black
  pylint
  mypy
  flake8

isolated_build = true
skip_missing_interpreters = true
skipsdist = true

[testenv]
allowlist_externals = poetry
                      sed
deps =
    # Define pytest version to overrides poetry's "multiple constraint dependencies" specification, badly
    # rendered in requirements file. pytest 6.1.* will be installed on python 3.5, pytest 6.2.* on python 3.6+
    pytest==6.*

    django21: Django==2.1.*
    django22: Django==2.2.*
    django30: Django==3.0.*
    django31: Django==3.1.*
    django32: Django==3.2.*
    django40: Django==4.0.*

# A future release of Poetry (probably 1.2) may introduce some new features to help running tox correctly,
# avoiding such hacks to get project's dev dependencies installed.
commands =
    poetry export --without-hashes --dev -o {env:TOX_ENV_DIR}/requirements.tox.txt
    # Remove Django dependency from requirements since it is installed by tox "deps"
    sed -i -E 's/^[Dd]jango==.+$//g' {env:TOX_ENV_DIR}/requirements.tox.txt
    # Remove pytest dependencies (2 lines in requirements) as the content produced by "poetry export" is invalid
    # due to usage of "multiple constraint dependencies". Tox managed dependency to pytest==6.* will install the correct
    # version depending on python interpreter
    sed -i -E 's/^pytest=.+$//g' {env:TOX_ENV_DIR}/requirements.tox.txt
    # Install remaining dependencies
    pip install -r {env:TOX_ENV_DIR}/requirements.tox.txt
    # Display Django version, just to be sure...
    django-admin --version
    # Run tests
    pytest {posargs}

[testenv:black]
deps = black
commands = black .

[testenv:flake8]
deps = flake8
commands = flake8 .
<commit_msg>Enable local tests for python 3.11 and django 4.1<commit_after># Note: while tox currently supports config in pyproject.toml, for now it only support ini-style config passed
# as a big multi-line string value (under the key "tool.tox.legacy_tox_ini"). It is currently cleaner to keep the
# tox.ini file until tox support a proper toml-based configuration

[tox]
# See:
#   - https://docs.djangoproject.com/en/2.2/faq/install/#what-python-version-can-i-use-with-django
#   - https://docs.djangoproject.com/en/3.2/faq/install/#what-python-version-can-i-use-with-django
#   - https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django
envlist=
  django21-py{35,36,37}
  django22-py{35,36,37,38,39}
  django{30,31}-py{36,37,38,39}
  django32-py{36,37,38,39,310,311}
  django40-py{38,39,310,311}
  django41-py{38,39,310,311}
  black
  pylint
  mypy
  flake8

isolated_build = true
skip_missing_interpreters = true
skipsdist = true

[testenv]
allowlist_externals = poetry
                      sed
deps =
    # Define pytest version to overrides poetry's "multiple constraint dependencies" specification, badly
    # rendered in requirements file. pytest 6.1.* will be installed on python 3.5, pytest 6.2.* on python 3.6+
    pytest==6.*

    django21: Django==2.1.*
    django22: Django==2.2.*
    django30: Django==3.0.*
    django31: Django==3.1.*
    django32: Django==3.2.*
    django40: Django==4.0.*
    django41: Django==4.1a1

# A future release of Poetry (probably 1.2) may introduce some new features to help running tox correctly,
# avoiding such hacks to get project's dev dependencies installed.
commands =
    poetry export --without-hashes --dev -o {env:TOX_ENV_DIR}/requirements.tox.txt
    # Remove Django dependency from requirements since it is installed by tox "deps"
    sed -i -E 's/^[Dd]jango==.+$//g' {env:TOX_ENV_DIR}/requirements.tox.txt
    # Remove pytest dependencies (2 lines in requirements) as the content produced by "poetry export" is invalid
    # due to usage of "multiple constraint dependencies". Tox managed dependency to pytest==6.* will install the correct
    # version depending on python interpreter
    sed -i -E 's/^pytest=.+$//g' {env:TOX_ENV_DIR}/requirements.tox.txt
    # Install remaining dependencies
    pip install -r {env:TOX_ENV_DIR}/requirements.tox.txt
    # Display Django version, just to be sure...
    django-admin --version
    # Run tests
    pytest {posargs}

[testenv:black]
deps = black
commands = black .

[testenv:flake8]
deps = flake8
commands = flake8 .

{'fraction_non_alphanumeric': 0.11983223487118035, 'fraction_numerical': 0.04593569003395247, 'mean_word_length': 3.586080586080586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2023973', 'n_tokens_mistral': 1838, 'n_tokens_neox': 1677, 'n_words': 475}