<commit_before>[tox]
isolated_build = True
envlist =
    docs-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
    pre-commit
    py37-django{22,32}-{postgres,postgres-nativejson,mysql,sqlite}
    py{38,39}-django{22}-{postgres,postgres-nativejson,mysql,sqlite}
    py{38,39}-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
    py310-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}

skip_missing_interpreters = True

[gh-actions]
python =
    3.7: py37
    3.8: py38, pre-commit, docs
    3.9: py39
    3.10: py310

[testenv]
passenv = DJSTRIPE_*
setenv =
    postgres: DJSTRIPE_TEST_DB_VENDOR=postgres
    mysql:    DJSTRIPE_TEST_DB_VENDOR=mysql
    sqlite:   DJSTRIPE_TEST_DB_VENDOR=sqlite
    nativejson: USE_NATIVE_JSONFIELD=1

    PYTHONWARNINGS = all
    PYTEST_ADDOPTS = --cov --cov-fail-under=90 --cov-report=html  --cov-report=term --no-cov-on-fail
commands = pytest -x {posargs}
deps =
    # psycopg2 is pinned to 2.8.6 because of https://github.com/psycopg/psycopg2/issues/1293
    postgres: psycopg2==2.8.6
    mysql: mysqlclient>=1.4.0

    django22: Django==2.2,<2.3
    django32: Django==3.2,<3.3
    django40: Django==4.0,<4.1
    djangomain: https://github.com/django/django/archive/main.tar.gz
    pytest-django
    pytest-cov

[testenv:pre-commit]
skip_install = True
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure


; Need to mention the env because we use tests.settings
[testenv:docs-django{31,32,main}-{postgres,mysql,sqlite}{,-nativejson}]
extras = docs
commands =
    mkdocs build --clean

[pytest]
DJANGO_SETTINGS_MODULE = tests.settings

[coverage:run]
branch = True
source = djstripe
omit =
    djstripe/migrations/*
    djstripe/management/*
    djstripe/admin.py
    djstripe/checks.py

[coverage:html]
directory = cover

[flake8]
max-complexity = 10
exclude = djstripe/migrations/, .tox/, build/lib/, .venv/
ignore = W191, W503, E203, E501
max-line-length = 88
<commit_msg>Move docs and pre-commit tox envs from 3.8 to 3.9<commit_after>[tox]
isolated_build = True
envlist =
    docs-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
    pre-commit
    py37-django{22,32}-{postgres,postgres-nativejson,mysql,sqlite}
    py{38,39}-django{22}-{postgres,postgres-nativejson,mysql,sqlite}
    py{38,39}-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}
    py310-django{32,40,main}-{postgres,mysql,sqlite}{,-nativejson}

skip_missing_interpreters = True

[gh-actions]
python =
    3.7: py37
    3.8: py38
    3.9: py39, pre-commit, docs
    3.10: py310

[testenv]
passenv = <PASSWORD>_*
setenv =
    postgres: DJSTRIPE_TEST_DB_VENDOR=postgres
    mysql:    DJSTRIPE_TEST_DB_VENDOR=mysql
    sqlite:   DJSTRIPE_TEST_DB_VENDOR=sqlite
    nativejson: USE_NATIVE_JSONFIELD=1

    PYTHONWARNINGS = all
    PYTEST_ADDOPTS = --cov --cov-fail-under=90 --cov-report=html  --cov-report=term --no-cov-on-fail
commands = pytest -x {posargs}
deps =
    # psycopg2 is pinned to 2.8.6 because of https://github.com/psycopg/psycopg2/issues/1293
    postgres: psycopg2==2.8.6
    mysql: mysqlclient>=1.4.0

    django22: Django==2.2,<2.3
    django32: Django==3.2,<3.3
    django40: Django==4.0,<4.1
    djangomain: https://github.com/django/django/archive/main.tar.gz
    pytest-django
    pytest-cov

[testenv:pre-commit]
skip_install = True
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure


; Need to mention the env because we use tests.settings
[testenv:docs-django{31,32,main}-{postgres,mysql,sqlite}{,-nativejson}]
extras = docs
commands =
    mkdocs build --clean

[pytest]
DJANGO_SETTINGS_MODULE = tests.settings

[coverage:run]
branch = True
source = djstripe
omit =
    djstripe/migrations/*
    djstripe/management/*
    djstripe/admin.py
    djstripe/checks.py

[coverage:html]
directory = cover

[flake8]
max-complexity = 10
exclude = djstripe/migrations/, .tox/, build/lib/, .venv/
ignore = W191, W503, E203, E501
max-line-length = 88

{'fraction_non_alphanumeric': 0.14008076728924784, 'fraction_numerical': 0.05502271580010096, 'mean_word_length': 3.8865598027127004, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 6, 'https://': 4, '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': '1227902', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1553, 'n_words': 265}