-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
106 lines (94 loc) · 2.28 KB
/
pyproject.toml
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
[build-system]
requires = [
"setuptools>=42",
"wheel",
"setuptools_scm[toml]>=3.4"
]
build-backend = 'setuptools.build_meta'
[tool.setuptools_scm]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37,coverage-report,typing,lint
isolated_build = True
[testenv]
description = Run pytest against {envname}.
deps =
-r{toxinidir}/requirements/main.txt
-r{toxinidir}/requirements/dev.txt
whitelist_externals =
docker-compose
setenv =
SAFIR_KAFKA_BROKER_URL=localhost:9092
SAFIR_SCHEMA_REGISTRY_URL=http://localhost:8081
commands =
docker-compose up -d
holdup -t 60 -T 5 -i 1 -n --insecure http://localhost:8081/subjects
coverage run -m pytest {posargs}
docker-compose down
[testenv:coverage-report]
description = Compile coverage from each test run.
skip_install = true
deps = coverage[toml]>=5.0.2
depends =
py37
commands =
coverage combine
coverage report
[testenv:typing]
description = Run mypy.
commands =
mypy src/ltdevents tests setup.py
[testenv:lint]
description = Lint codebase by running pre-commit (Black, isort, Flake8).
skip_install = true
deps =
pre-commit
commands = pre-commit run --all-files
[testenv:run]
description = Run the development server with auto-reload for code changes.
usedevelop = true
commands = adev runserver --app-factory create_app src/ltdevents/app.py
"""
[tool.coverage.run]
parallel = true
branch = true
source = ["ltdevents"]
[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:"
]
[tool.black]
line-length = 79
target-version = ['py37']
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| build
| dist
)/
'''
# Use single-quoted strings so TOML treats the string like a Python r-string
# Multi-line strings are implicitly treated by black as regular expressions
[tool.isort]
include_trailing_comma = true
multi_line_output = 3
known_first_party = "ltdevents"
known_third_party = ["aiohttp", "click", "kafkit", "pydantic", "safir", "setuptools", "structlog"]
skip = ["docs/conf.py"]