forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.cfg
89 lines (83 loc) · 2.42 KB
/
setup.cfg
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
[flake8]
max-complexity = 15
ignore =
# Ignore: line length issues, since black's formatter will take care of them.
E501,
# Ignore: 1 blank line required before class docstring.
D203,
# See https://stackoverflow.com/a/57074416.
W503,
# See https://github.com/psf/black/issues/315.
E203
exclude =
.git,
src/datahub/metadata,
venv,
.tox,
__pycache__
per-file-ignores =
# imported but unused
__init__.py: F401
ban-relative-imports = true
[mypy]
plugins =
sqlmypy,
pydantic.mypy
exclude = ^(venv|build|dist)/
ignore_missing_imports = yes
strict_optional = yes
check_untyped_defs = yes
disallow_incomplete_defs = yes
disallow_untyped_decorators = yes
warn_unused_configs = yes
# eventually we'd like to enable these
disallow_untyped_defs = no
# try to be a bit more strict in certain areas of the codebase
[mypy-datahub.*]
ignore_missing_imports = no
[mypy-tests.*]
ignore_missing_imports = no
[mypy-datahub.configuration.*]
disallow_untyped_defs = yes
[mypy-datahub.emitter.*]
disallow_untyped_defs = yes
[mypy-datahub.ingestion.api.*]
disallow_untyped_defs = yes
[mypy-datahub.ingestion.run.*]
disallow_untyped_defs = yes
[mypy-datahub.utilities.*]
disallow_untyped_defs = yes
[tool:pytest]
asyncio_mode = auto
addopts = --cov=src --cov-report term-missing --cov-config setup.cfg --strict-markers
markers =
integration: marks tests to only run in integration (deselect with '-m "not integration"')
slow_integration: marks tests that are too slow to even run in integration (deselect with '-m "not slow_integration")
testpaths =
tests/unit
tests/integration
[coverage:run]
# Because of some quirks in the way setup.cfg, coverage.py, pytest-cov,
# and tox interact, we should not uncomment the following line.
# See https://pytest-cov.readthedocs.io/en/latest/config.html and
# https://coverage.readthedocs.io/en/coverage-5.0/config.html.
# We also have some additional pytest/cov config options in tox.ini.
# source = src
[coverage:paths]
# This is necessary for tox-based coverage to be counted properly.
source =
src
*/site-packages
[coverage:report]
# The fail_under value ensures that at least some coverage data is collected.
# We override its value in the tox config.
show_missing = true
exclude_lines =
pragma: no cover
@abstract
if TYPE_CHECKING:
omit =
# omit codegen
src/datahub/metadata/*
# omit example dags
src/datahub_provider/example_dags/*