forked from django-salesforce/django-salesforce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
133 lines (121 loc) · 4.25 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# The easy usage for all test environments:
# pip install tox
# tox
[tox]
# the highest version, the lowest, Django 2.2 and some versions complementary to Travis envlist
# Django 2.2 is important because some code in salesforce.backend.query is used only with exactly this version.
envlist =
docs_style
typing
dj40-py310
dj20-py36
dj21-py37
dj22-py38
dj31-py39
# djdev-py38
no_django-py38
debug_toolbar-dj40-py38
# pylint-dj32-py38`
# Python versions for Travis are 3.6, 3.8, 3.9 (the lowest, the default in Travis, the highest in Travis)
# Environments tested by Travis
# TOXENV=docs_style,typing,dj20-py36,dj22-py38,dj30-py36,dj32-py38
# TOXENV=dj40-py39,no_django-py39,debug_toolbar-dj32-py39
[testenv]
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
pypy: pypy
pypy3: pypy3
deps =
# minimal required versions for all supported Python versions
dj20: Django~=2.0.0 # py34-37
dj21: Django~=2.1.0 # py35-37
dj22: Django~=2.2.17 # py35-37
dj30: Django~=3.0.11 # py36-39
dj31: Django~=3.1.3 # py36-39
dj32: Django~=3.2.0 # py36-39
dj40: Django~=4.0rc1 # py38-310
djdev: https://github.com/django/django/archive/main.zip
# local copy of django/origin main
# wget https://github.com/django/django/archive/main.zip -O django-40-dev.zip
# djdevlocal: django-40-dev.zip
pylint: pylint~=2.8.0 # fixed version to not report too much
pylint: pylint-django
debug_toolbar: django-debug-toolbar
coverage
# This Beatbox version works with Python 3 and 2.
# Be hopeful, it will be soon in official repositories.
# git+https://github.com/superfell/Beatbox@master#egg=beatbox
# beatbox3
git+https://github.com/hynekcer/beatbox-davisagli.git@7f628a789cba#egg=beatbox
-rrequirements.txt
commands =
{envpython} manage.py test salesforce tests.test_mock
{toxinidir}/tests/tests.sh
setenv =
# all bugs can be reported by the command `QUIET_KNOWN_BUGS=off tox`
# otherwise known bugs are silent
QUIET_KNOWN_BUGS={env:QUIET_KNOWN_BUGS:on}
passenv = SLOW_TESTS
# These other environments are tested by `tox -e ALL`:
# (Especially useful is to add highest contra lowest Django combinations)
[testenv:djdev-py310]
[testenv:clean]
basepython = python3
commands =
{envpython} manage.py test tests.clean_test_data
[testenv:debug_toolbar-dj{20,32,40}-py{36,38,39}]
commands = {envpython} manage.py test tests.t_debug_toolbar --settings=tests.t_debug_toolbar.settings
[testenv:pylint-dj{20,21,22,30,31,32,40}-py{36,38,39}]
setenv = DJANGO_SETTINGS_MODULE=salesforce.testrunner.settings
commands = pylint --reports=no salesforce
[testenv:no_django-py{36,38,39}]
usedevelop=True
allowlist_externals = rm
commands =
# remove Django because it has been installed by setup.py now if not by tox
rm -rf {envsitepackagesdir}/django
{toxinidir}/tests/tests_no_django.sh
[testenv:docs_style]
# check Python code style and rst syntax
basepython = python3
skip_install = True
deps =
flake8
rstcheck
commands =
flake8
rstcheck README.rst CHANGELOG.rst
[testenv:typing]
# any python >= 3.5.3, < 3.9
basepython = python3.8
allowlist_externals =
bash
touch
deps =
mypy==0.770
git+https://github.com/hynekcer/[email protected]#django-stubs
commands =
touch tests/inspectdb/models.py tests/inspectdb/dependent_model/models_template.py
bash -ec "{envpython} manage.py inspectdb --database=salesforce --tooling-api EntityDefinition FieldDefinition UserEntityAccess UserFieldAccess User >tests/tooling/models.py"
mypy salesforce tests
mypy salesforce/dbapi tests/test_mock tests/test_mock2 --strict
{toxinidir}/tests/mypy.sh
# === lint configurations (not tests) ===
[flake8]
max-line-length = 119
exclude =
.git,.tox,.components,.eggs,build,migrations,models1*.py,packages_
tests/inspectdb/models.py
tests/inspectdb/dependent_model/models_template.py
tests/tooling/models.py
[pep8]
max-line-length = 119
exclude=.git,.tox,.components,.eggs,build,migrations,models1*.py,packages_,tests/inspectdb/models.py,tests/tooling/models.py
[pyflakes]
# ignore E126 continuation line over-indented for hanging indent
# ignore=E126