-
Notifications
You must be signed in to change notification settings - Fork 97
/
pyproject.toml
200 lines (172 loc) · 4.77 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
[build-system]
requires = ["hatchling~=1.14.0"]
build-backend = "hatchling.build"
[project]
name = "metricflow"
version = "0.203.0.dev8"
description = "Translates a simple metric definition into reusable SQL and executes it against the SQL engine of your choice."
readme = "README.md"
requires-python = ">=3.8,<3.12"
license = "BUSL-1.1"
keywords = []
authors = [
{name = "dbt Labs"}
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"Jinja2>=2.11.3",
"MarkupSafe==2.0.1", # pandas implicitly requires this version
"PyYAML~=6.0",
"click>=7.1.2",
"dbt-core~=1.7.0rc1",
"dbt-semantic-interfaces~=0.3.0",
"graphviz>=0.18.2, <0.21",
"halo~=0.0.31",
"more-itertools>=8.10.0, <10.2.0",
"numpy>=1.22.2",
"pandas~=1.5.0",
"pydantic~=1.10.0",
"python-dateutil~=2.8.2",
"rapidfuzz~=3.0",
"ruamel.yaml~=0.17.21",
"rudder-sdk-python~=1.0.3",
"tabulate>=0.8.9",
"typing_extensions~=4.4.0",
"update-checker~=0.18.0",
]
[project.urls]
Documentation = "https://transform.co/metricflow"
"Source Code" = "https://github.com/transform-data/metricflow"
[project.scripts]
mf = 'metricflow.cli.main:cli'
[project.optional-dependencies]
dev-packages = [
"mypy~=1.3.0",
"pre-commit~=3.2.2",
# Bug with mypy: https://github.com/pallets/click/issues/2558#issuecomment-1656546003
"click>=8.1.6",
"pytest-mock~=3.7.0",
"pytest-xdist~=3.2.1",
"pytest~=7.1.1",
"types-PyYAML",
"types-python-dateutil",
"types-tabulate",
]
# These are currently separate for ease of removal, but due to the way Python
# handles import statements they are required in all test environments
sql-client-packages = [
"SQLAlchemy~=1.4.42",
"sqlalchemy2-stubs~=0.0.2a21",
]
dbt-postgres = [
"dbt-postgres~=1.7.0rc1",
]
dbt-bigquery = [
"dbt-bigquery~=1.7.0rc1",
]
dbt-databricks = [
"dbt-databricks~=1.7.0rc1",
]
dbt-redshift = [
"dbt-redshift~=1.7.0rc1",
]
dbt-snowflake = [
"dbt-snowflake~=1.7.0rc1",
]
dbt-duckdb = [
"dbt-duckdb~=1.6.0",
]
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.changes",
".changie.yaml",
".gitignore",
".pre-commit-config.yaml",
"CONTRIBUTING.md",
"MAKEFILE",
"/tests",
]
[tool.hatch.envs.dev-env]
description = "Environment for development. Includes a DuckDB-backed client."
features = [
"dev-packages",
"sql-client-packages",
]
# Temporary workaround for installing the dbt-duckdb adapter until it's updated to support dbt-core~=1.7.0rc1.
post-install-commands = [
"pip install duckdb>=0.7.0",
"pip install --no-deps dbt-duckdb~=1.6.0",
]
[tool.hatch.envs.dev-env.env-vars]
MF_TEST_ADAPTER_TYPE="duckdb"
MF_SQL_ENGINE_URL="duckdb://"
[tool.hatch.envs.postgres-env.env-vars]
MF_SQL_ENGINE_URL="postgresql://metricflow@localhost:5432/metricflow"
MF_SQL_ENGINE_PASSWORD="metricflowing"
MF_TEST_ADAPTER_TYPE="postgres"
[tool.hatch.envs.postgres-env]
description = "Dev environment for working with Postgres adapter"
features = [
"dev-packages",
"dbt-postgres",
"sql-client-packages",
]
# NOTE: All of the below should have their authentication credentials
# configured independently of the hatch env construction
[tool.hatch.envs.bigquery-env.env-vars]
MF_TEST_ADAPTER_TYPE="bigquery"
[tool.hatch.envs.bigquery-env]
description = "Dev environment for working with the BigQuery adapter"
features = [
"dev-packages",
"dbt-bigquery",
"sql-client-packages",
]
[tool.hatch.envs.databricks-env.env-vars]
MF_TEST_ADAPTER_TYPE="databricks"
[tool.hatch.envs.databricks-env]
description = "Dev environment for working with the Databricks adapter"
features = [
"dev-packages",
"dbt-databricks",
"sql-client-packages",
]
[tool.hatch.envs.redshift-env.env-vars]
MF_TEST_ADAPTER_TYPE="redshift"
[tool.hatch.envs.redshift-env]
description = "Dev environment for working with the Redshift adapter"
features = [
"dev-packages",
"dbt-redshift",
"sql-client-packages",
]
[tool.hatch.envs.snowflake-env.env-vars]
MF_TEST_ADAPTER_TYPE="snowflake"
[tool.hatch.envs.snowflake-env]
description = "Dev environment for working with Snowflake adapter"
features = [
"dev-packages",
"dbt-snowflake",
"sql-client-packages",
]
[tool.black]
line-length = 120
# Many deprecation warnings come from 3rd-party libraries and make the
# output of pytest noisy. Since no action is going to be taken, hide those
# warnings.
[tool.pytest.ini_options]
filterwarnings = [
"ignore:Deprecated call to.*",
"ignore:pkg_resources is deprecated as an API"
]
python_functions = "test_* populate_source_schema"