forked from gtalarico/pyairtable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
92 lines (81 loc) · 1.97 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
[tox]
envlist =
pre-commit
mypy-py3{8,9,10,11,12}
py3{8,9,10,11,12}{,-pydantic1,-requestsmin}
integration
coverage
[gh-actions]
python =
3.8: py38, mypy-py38
3.9: py39, mypy-py39
3.10: py310, mypy-py310
3.11: py311, mypy-py311
3.12: coverage, mypy-py312
[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files
[testenv:mypy-py3{8,9,10,11,12}]
basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
deps = -r requirements-dev.txt
commands = mypy --strict pyairtable tests/test_typing.py
[testenv]
passenv =
AIRTABLE_API_KEY
AIRTABLE_ENTERPRISE_ID
addopts = -v
testpaths = tests
commands =
python -m pytest {posargs:-m 'not integration'}
deps =
-r requirements-test.txt
requestsmin: requests==2.22.0 # Keep in sync with setup.cfg
pydantic1: pydantic<2 # Lots of projects still use 1.x
[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}
[testenv:docs]
basepython = python3.8
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:
\)( -> .+)?: \.\.\.$