2021-01-31 22:40:30 -08:00
|
|
|
[flake8]
|
|
|
|
max-complexity = 15
|
2021-02-18 20:05:39 -08:00
|
|
|
ignore =
|
2021-04-23 23:50:28 -07:00
|
|
|
# Ignore: line length issues, since black's formatter will take care of them.
|
|
|
|
E501,
|
2021-02-18 20:05:39 -08:00
|
|
|
# Ignore: 1 blank line required before class docstring.
|
|
|
|
D203,
|
|
|
|
# See https://stackoverflow.com/a/57074416.
|
2021-11-24 10:19:03 -08:00
|
|
|
W503,
|
|
|
|
# See https://github.com/psf/black/issues/315.
|
|
|
|
E203
|
2021-02-11 21:59:54 -08:00
|
|
|
exclude =
|
|
|
|
.git,
|
2021-02-15 15:04:21 -08:00
|
|
|
src/datahub/metadata,
|
2021-04-05 19:11:28 -07:00
|
|
|
venv,
|
2021-04-26 16:44:36 -07:00
|
|
|
.tox,
|
2021-02-11 21:59:54 -08:00
|
|
|
__pycache__
|
|
|
|
per-file-ignores =
|
|
|
|
# imported but unused
|
|
|
|
__init__.py: F401
|
2021-08-06 13:25:30 -04:00
|
|
|
ban-relative-imports = true
|
2021-01-31 22:40:30 -08:00
|
|
|
|
|
|
|
[mypy]
|
2021-02-23 15:55:31 -08:00
|
|
|
plugins =
|
|
|
|
sqlmypy,
|
|
|
|
pydantic.mypy
|
2021-07-17 20:02:07 -07:00
|
|
|
exclude = ^(venv|build|dist)/
|
2021-03-26 21:57:05 -07:00
|
|
|
ignore_missing_imports = yes
|
2021-01-31 22:40:30 -08:00
|
|
|
strict_optional = yes
|
2021-03-26 21:57:05 -07:00
|
|
|
check_untyped_defs = yes
|
2021-04-14 13:40:24 -07:00
|
|
|
disallow_incomplete_defs = yes
|
|
|
|
disallow_untyped_decorators = yes
|
2021-05-06 07:48:56 -07:00
|
|
|
warn_unused_configs = yes
|
2021-03-26 21:57:05 -07:00
|
|
|
# eventually we'd like to enable these
|
2021-01-31 22:40:30 -08:00
|
|
|
disallow_untyped_defs = no
|
|
|
|
|
2021-07-25 21:19:25 -07:00
|
|
|
# try to be a bit more strict in certain areas of the codebase
|
2021-05-06 07:48:56 -07:00
|
|
|
[mypy-datahub.*]
|
|
|
|
ignore_missing_imports = no
|
2021-05-17 11:42:12 -07:00
|
|
|
[mypy-tests.*]
|
|
|
|
ignore_missing_imports = no
|
2021-07-25 21:19:25 -07:00
|
|
|
[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
|
2021-05-06 07:48:56 -07:00
|
|
|
|
2021-01-31 22:40:30 -08:00
|
|
|
[tool:pytest]
|
2022-02-10 20:02:23 -08:00
|
|
|
asyncio_mode = auto
|
2021-07-26 13:25:58 -07:00
|
|
|
addopts = --cov=src --cov-report term-missing --cov-config setup.cfg --strict-markers
|
2021-04-01 12:15:05 -07:00
|
|
|
markers =
|
2021-07-14 20:02:48 -07:00
|
|
|
integration: marks tests to only run in integration (deselect with '-m "not integration"')
|
2021-12-09 04:26:31 +05:30
|
|
|
slow_integration: marks tests that are too slow to even run in integration (deselect with '-m "not slow_integration")
|
2021-02-09 10:15:17 -08:00
|
|
|
testpaths =
|
2021-07-20 19:13:49 -07:00
|
|
|
tests/unit
|
|
|
|
tests/integration
|
2021-07-17 20:00:50 -07:00
|
|
|
|
2021-07-26 13:25:58 -07:00
|
|
|
[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
|
|
|
|
|
2021-07-17 20:00:50 -07:00
|
|
|
[coverage:paths]
|
2021-07-26 13:25:58 -07:00
|
|
|
# This is necessary for tox-based coverage to be counted properly.
|
2021-07-17 20:00:50 -07:00
|
|
|
source =
|
|
|
|
src
|
|
|
|
*/site-packages
|
2021-01-31 22:40:30 -08:00
|
|
|
|
|
|
|
[coverage:report]
|
2021-07-17 20:00:50 -07:00
|
|
|
# The fail_under value ensures that at least some coverage data is collected.
|
|
|
|
# We override its value in the tox config.
|
2021-01-31 22:40:30 -08:00
|
|
|
show_missing = true
|
|
|
|
exclude_lines =
|
2021-07-17 20:00:50 -07:00
|
|
|
pragma: no cover
|
|
|
|
@abstract
|
|
|
|
if TYPE_CHECKING:
|
2021-02-05 21:03:04 -08:00
|
|
|
omit =
|
|
|
|
# omit codegen
|
2021-02-15 15:04:21 -08:00
|
|
|
src/datahub/metadata/*
|
2021-05-17 15:08:49 -07:00
|
|
|
# omit example dags
|
|
|
|
src/datahub_provider/example_dags/*
|