-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.cfg
122 lines (112 loc) · 3.58 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[metadata]
name = pytest-dbt-core
description = Pytest extension for dbt.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/godatadriven/pytest-dbt-core
author = Cor Zuurmond
maintainer = Cor Zuurmond
maintainer_email = corzuurmond@godatadriven.com
license = Apache 2.0
license_file = LICENSE
platforms = any
keywords = dbt, SQL, data, data transformation, testing, pytest
project_urls =
Source=https://github.com/godatadriven/pytest-dbt-core
Tracker=https://github.com/godatadriven/pytest-dbt-core/issues
classifiers =
Framework :: Pytest
[options]
packages = find:
package_dir = =src
install_requires =
dbt-core>=1.0.0
python_requires = >=3.8
[options.packages.find]
where = src
[options.extras_require]
test =
dbt-spark[ODBC]>=1.1.0,<1.9.0
pyspark>=3.0.0,<4.0.0
pre-commit>=2.14.1
pytest>=6.2.5
pytest-spark>=0.6.0
pytest-cov>=2.12.1
[options.entry_points]
pytest11 =
dbt=pytest_dbt_core.plugin
[flake8]
ignore = E226,E302,E41,W504,W503
max-line-length = 120
exclude = venv\,direnv\
[mypy]
python_version = 3.9
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
no_implicit_optional = True
warn_redundant_casts = True
[tool:pytest]
addopts = --cov=src
--cov-report=xml:pytest-coverage.xml
--junitxml=pytest-output.xml
--doctest-glob=README.md
--doctest-modules
--ignore=scripts/
--dbt-project-dir=./tests/dbt_project
--dbt-target=test
--profiles-dir=./tests/dbt_project
spark_options =
spark.app.name: dbt-core
spark.executor.instances: 1
spark.sql.catalogImplementation: in-memory
[tox:tox]
envlist =
py{3.8,3.9,3.10}-dbt-spark{11,12,13,14,15,16,17,18}
py3.11-dbt-spark{14,15,16,17,18} # Previous dbt-spark versions fail when using Python 3.11
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = run the tests with pytest under {basepython}
setenv =
PIP_DISABLE_PIP_VERSION_CHECK = 1
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
{py27,pypy}: PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
DBT_PROFILES_DIR = {env:DBT_PROFILES_DIR:{toxinidir}/tests/dbt_project}
passenv =
PYTEST_*
PIP_CACHE_DIR
deps =
dbt-spark11: dbt-spark[ODBC]~=1.1.0
dbt-spark12: dbt-spark[ODBC]~=1.2.0
dbt-spark13: dbt-spark[ODBC]~=1.3.0
dbt-spark14: dbt-spark[ODBC]~=1.4.0
dbt-spark15: dbt-spark[ODBC]~=1.5.0
dbt-spark16: dbt-spark[ODBC]~=1.6.0
dbt-spark17: dbt-spark[ODBC]~=1.7.0
dbt-spark18: dbt-spark[ODBC]~=1.8.0
pip >= 19.3.1
extras = test
commands = pytest {posargs:tests}
[testenv:docs]
description = run the tests in docs
setenv =
PIP_DISABLE_PIP_VERSION_CHECK = 1
{py27,pypy}: PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command
passenv =
PYTEST_*
PIP_CACHE_DIR
deps =
dbt-spark11: dbt-spark[ODBC]~=1.1.0
dbt-spark12: dbt-spark[ODBC]~=1.2.0
dbt-spark13: dbt-spark[ODBC]~=1.3.0
dbt-spark14: dbt-spark[ODBC]~=1.4.0
dbt-spark15: dbt-spark[ODBC]~=1.5.0
dbt-spark16: dbt-spark[ODBC]~=1.6.0
dbt-spark17: dbt-spark[ODBC]~=1.7.0
dbt-spark18: dbt-spark[ODBC]~=1.8.0
pip >= 19.3.1
extras = test
commands_pre = dbt deps --project-dir {toxinidir}/docs/source/_static/dbt_project --profiles-dir {toxinidir}/docs/source/_static/dbt_project
commands = pytest {posargs:docs/source/_static/dbt_project/tests} --dbt-project-dir={toxinidir}/docs/source/_static/dbt_project --profiles-dir={toxinidir}/docs/source/_static/dbt_project