-
-
Notifications
You must be signed in to change notification settings - Fork 139
/
tox.ini
95 lines (84 loc) · 2.02 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
[tox]
envlist =
pre-commit
mypy-py3{9,10,11,12,13}
py3{9,10,11,12,13}{,-requestsmin}
integration
coverage
[gh-actions]
python =
3.9: py39, mypy-py39
3.10: py310, mypy-py310
3.11: py311, mypy-py311
3.12: coverage, mypy-py312
3.13: py313, mypy-py313
[testenv]
passenv =
AIRTABLE_API_KEY
AIRTABLE_ENTERPRISE_ID
addopts = -v
testpaths = tests
commands = python -m pytest {posargs:-m 'not integration'}
extras = cli
deps =
-r requirements-test.txt
requestsmin: requests==2.22.0 # Keep in sync with setup.cfg
[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files
[testenv:mypy,mypy-py3{9,10,11,12,13}]
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
deps = -r requirements-dev.txt
commands = mypy --strict pyairtable scripts tests/test_typing.py
[testenv:integration]
commands =
python -m pytest -m integration
[testenv:coverage]
passenv = COVERAGE_FORMAT
commands =
python -m pytest -m 'not integration' \
--cov=pyairtable \
--cov-report={env:COVERAGE_FORMAT:html} \
--cov-report=term-missing \
--cov-fail-under=100
[testenv:docs]
basepython = python3.9
deps =
-r requirements-dev.txt
commands =
python -m cogapp -cr --verbosity=1 {toxinidir}/docs/source/*.rst
python -m sphinx -T -E -b html {toxinidir}/docs/source {toxinidir}/docs/build
[pytest]
requests_mock_case_sensitive = true
markers =
integration: integration tests, hit airtable api
[flake8]
filename = *.py
count = True
# See https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html
ignore = E203, E226, E266, E501, E704, W503
select = B,C,E,F,W,T4,B9
max-line-length = 88
max-complexity = 15
exclude =
.venv
.eggs
.tox
./docs
[coverage:run]
omit =
docs/*
tests/*
.venv/*
.tox/*
[coverage:report]
# See https://github.com/nedbat/coveragepy/issues/970
exclude_also =
@overload
if (typing\.)?TYPE_CHECKING:
\)( -> .+)?: \.\.\.$