2021-01-31 22:40:30 -08:00
|
|
|
[mypy]
|
2021-02-23 15:55:31 -08:00
|
|
|
plugins =
|
2022-11-11 15:04:36 -05:00
|
|
|
./tests/test_helpers/sqlalchemy_mypy_plugin.py,
|
2021-02-23 15:55:31 -08:00
|
|
|
pydantic.mypy
|
2023-04-11 02:44:42 +05:30
|
|
|
exclude = ^(venv/|build/|dist/|examples/transforms/setup.py)
|
2021-03-26 21:57:05 -07:00
|
|
|
ignore_missing_imports = yes
|
2022-11-09 02:38:42 -08:00
|
|
|
namespace_packages = no
|
2023-04-11 02:44:42 +05:30
|
|
|
# implicit_optional = no
|
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
|
2025-02-06 11:17:21 -08:00
|
|
|
[mypy-datahub]
|
2025-02-17 18:27:46 -08:00
|
|
|
# Allow implicit reexport for datahub's __init__.py
|
|
|
|
implicit_reexport = yes
|
|
|
|
[mypy-datahub.sdk]
|
|
|
|
# Allow implicit reexport for datahub.sdk's __init__.py
|
2025-02-06 11:17:21 -08:00
|
|
|
implicit_reexport = yes
|
2021-05-06 07:48:56 -07:00
|
|
|
[mypy-datahub.*]
|
|
|
|
ignore_missing_imports = no
|
2024-11-20 13:33:30 -08:00
|
|
|
implicit_reexport = no
|
|
|
|
[mypy-datahub.metadata.*]
|
|
|
|
# TODO: Remove this once all the code has been updated.
|
|
|
|
implicit_reexport = yes
|
|
|
|
[mypy-datahub.ingestion.*]
|
|
|
|
# TODO: Remove this once all the code has been updated.
|
|
|
|
implicit_reexport = yes
|
|
|
|
|
2022-12-02 13:53:28 -05:00
|
|
|
[mypy-datahub_provider.*]
|
|
|
|
ignore_missing_imports = no
|
2021-05-17 11:42:12 -07:00
|
|
|
[mypy-tests.*]
|
|
|
|
ignore_missing_imports = no
|
2022-12-02 13:53:28 -05:00
|
|
|
[mypy-google.protobuf.*]
|
|
|
|
# mypy sometimes ignores the above ignore_missing_imports = yes
|
|
|
|
# See https://github.com/python/mypy/issues/10632 and
|
|
|
|
# https://github.com/python/mypy/issues/10619#issuecomment-1174208395
|
|
|
|
# for a discussion of why this happens.
|
|
|
|
ignore_missing_imports = yes
|
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
|
2024-02-09 16:27:45 -05:00
|
|
|
[mypy-datahub.sql_parsing.*]
|
|
|
|
disallow_untyped_defs = yes
|
2021-07-25 21:19:25 -07:00
|
|
|
[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
|
2024-09-06 10:02:40 -07:00
|
|
|
addopts = --cov=src --cov-report= --cov-config setup.cfg --strict-markers -p no:faker
|
2021-04-01 12:15:05 -07:00
|
|
|
markers =
|
2023-10-03 23:17:49 -04:00
|
|
|
slow: marks tests that are slow to run, including all docker-based tests (deselect with '-m not slow')
|
|
|
|
integration: marks all integration tests, across all batches (deselect with '-m "not integration"')
|
2025-02-06 11:17:21 -08:00
|
|
|
integration_batch_0: mark tests to run in batch 0 of integration tests. This is done mainly for parallelization in CI. Batch 0 is the default batch.
|
2023-10-03 23:17:49 -04:00
|
|
|
integration_batch_1: mark tests to run in batch 1 of integration tests
|
|
|
|
integration_batch_2: mark tests to run in batch 2 of integration tests
|
2023-04-14 21:09:43 -04:00
|
|
|
testpaths =
|
2021-07-20 19:13:49 -07:00
|
|
|
tests/unit
|
|
|
|
tests/integration
|
2023-05-26 04:10:56 +05:30
|
|
|
filterwarnings =
|
|
|
|
# Ignore some warnings that come from dependencies.
|
|
|
|
ignore:Deprecated call to \`pkg_resources.declare_namespace:DeprecationWarning
|
|
|
|
ignore:pkg_resources is deprecated as an API:DeprecationWarning
|
|
|
|
ignore:Did not recognize type:sqlalchemy.exc.SAWarning
|
2023-11-10 09:34:08 -08:00
|
|
|
ignore::datahub.configuration.pydantic_migration_helpers.PydanticDeprecatedSince20
|
2024-05-15 13:08:27 -07:00
|
|
|
ignore::datahub.configuration.common.ConfigurationWarning
|
2025-02-17 18:27:46 -08:00
|
|
|
ignore:The new datahub SDK:datahub.errors.ExperimentalWarning
|
2025-03-27 22:21:33 -07:00
|
|
|
# We should not be unexpectedly seeing API tracing warnings.
|
|
|
|
error::datahub.errors.APITracingWarning
|
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]
|
|
|
|
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/*
|