-
Notifications
You must be signed in to change notification settings - Fork 321
/
tox.ini
87 lines (78 loc) · 2.76 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
[tox]
envlist =
py{3.9, 3.10, 3.11, 3.12}-sqlalchemy{14, 2}
flake8
isort
docs
labels =
update = update-{requirements, pre-commit}
[testenv]
commands =
py.test sqlalchemy_utils --cov=sqlalchemy_utils --cov-report=xml tests
deps =
.[test_all]
pytest-cov
sqlalchemy14: SQLAlchemy>=1.4,<1.5
sqlalchemy2: SQLAlchemy>=2
; It's sometimes necessary to test against specific sqlalchemy versions
; to verify bug or feature behavior before or after a specific version.
;
; You can choose the sqlalchemy version using this command syntax:
; $ tox -e py39-sqlalchemy1_4_xx
;
; sqlalchemy 1.4.19 through 1.4.23 have JSON-related TypeErrors. See #543.
sqlalchemy1_4_19: SQLAlchemy==1.4.19
; sqlalchemy <1.4.28 threw a DeprecationWarning when copying a URL. See #573.
sqlalchemy1_4_27: SQLAlchemy==1.4.27
; sqlalchemy 1.4.30 introduced UUID literal quoting. See #580.
sqlalchemy1_4_29: SQLAlchemy==1.4.29
setenv =
SQLALCHEMY_WARN_20 = true
passenv =
SQLALCHEMY_UTILS_TEST_*
recreate = True
[testenv:flake8]
skip_install = True
recreate = False
deps = pre-commit
commands = pre-commit run --hook-stage manual --all flake8
[testenv:isort]
skip_install = True
recreate = False
deps = pre-commit
commands = pre-commit run --hook-stage manual --all isort-check
[testenv:docs]
base_python = py3.12
recreate = False
skip_install = True
deps = -r requirements/docs/requirements.txt
commands = sphinx-build docs/ build/docs
[pytest]
filterwarnings =
error
; Ignore ResourceWarnings caused by unclosed sockets in pg8000.
; These are caught and re-raised as pytest.PytestUnraisableExceptionWarnings.
ignore:Exception ignored:pytest.PytestUnraisableExceptionWarning
; Ignore DeprecationWarnings caused by pg8000.
ignore:distutils Version classes are deprecated.:DeprecationWarning
; Ignore warnings about passlib's use of the crypt module (Python 3.11).
ignore:'crypt' is deprecated and slated for removal:DeprecationWarning
; Ignore Python 3.12 UTC deprecation warnings caused by pendulum.
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning
[testenv:update-{requirements, pre-commit}]
base_python = py3.12
recreate = true
description = Update tool dependency versions
skip_install = true
deps =
requirements: poetry
requirements: poetry-plugin-export
pre-commit: pre-commit
commands =
# Update requirements files
requirements: poetry update --directory="requirements/docs" --lock
requirements: poetry export --directory="requirements/docs" --output="requirements/docs/requirements.txt" --without-hashes
# Update pre-commit hook versions
pre-commit: pre-commit autoupdate
# Run pre-commit immediately, but ignore its exit code
pre-commit: - pre-commit run -a