-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!--- Include the number of the issue addressed by this PR above if applicable. PRs for code changes without an associated issue *will not be merged*. See CONTRIBUTING.md for more information. --> Resolves #1243 ### Description This PR makes the following project configuration changes: * Use `requirements.txt`-style files to share dependency definitions between `metricflow` and `dbt-metricflow`. * Remove the editable installs that are run when setting up the `hatch` environment used for development. It seems to work with out them now. * Update `dbt-metricflow` dependencies to use `dbt-*` 1.8 packages <!--- Before requesting review, please make sure you have: 1. read [the contributing guide](https://github.com/dbt-labs/metricflow/blob/main/CONTRIBUTING.md), 2. signed the [CLA](https://docs.getdbt.com/docs/contributor-license-agreements) 3. run `changie new` to [create a changelog entry](https://github.com/dbt-labs/metricflow/blob/main/CONTRIBUTING.md#adding-a-changelog-entry) -->
- Loading branch information
Showing
17 changed files
with
128 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Features | ||
body: Update `dbt-metricflow` dependencies to use `dbt*` 1.8 packages | ||
time: 2024-06-03T17:45:44.215307-07:00 | ||
custom: | ||
Author: plypaul | ||
Issue: "1243" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
dbt-metricflow/extra-hatch-configuration/requirements-cli.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Internal dependencies | ||
dbt-core>=1.8.0, <1.9.0 | ||
|
||
# dsi version should be fixed by MetricFlow/dbt-core, not set here | ||
dbt-semantic-interfaces | ||
|
||
# CLI-related | ||
Jinja2>=3.1.3 | ||
halo>=0.0.31, <0.1.0 | ||
update-checker>=0.18.0, <0.19.0 | ||
|
||
# Bug with mypy: https://github.com/pallets/click/issues/2558#issuecomment-1656546003 | ||
click>=8.1.6 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-bigquery.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-bigquery>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-databricks.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-databricks>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-duckdb.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-duckdb>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-postgres.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-postgres>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-redshift.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-redshift>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-snowflake.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-snowflake>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-dbt-trino.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dbt-trino>=1.8.0, <1.9.0 |
1 change: 1 addition & 0 deletions
1
dbt-metricflow/extra-hatch-configuration/requirements-metricflow.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
metricflow>=0.206.0.dev3, <0.207.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[build-system] | ||
requires = ["hatchling~=1.14.0"] | ||
requires = ["hatchling~=1.14.0", "hatch-requirements-txt >= 0.4.1, <0.5.0"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "dbt-metricflow" | ||
version = "0.6.0" | ||
description = "Execute commands against the MetricFlow semantic layer with dbt." | ||
readme = "README.md" | ||
requires-python = ">=3.8,<3.12" | ||
requires-python = ">=3.8,<3.13" | ||
license = "BUSL-1.1" | ||
authors = [ | ||
{ name = "dbt Labs", email = "[email protected]" }, | ||
|
@@ -20,22 +20,18 @@ classifiers = [ | |
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [ | ||
# cli dependencies | ||
"Jinja2>=3.1.3", | ||
"click>=7.1.2", | ||
"halo>=0.0.31, <0.1.0", | ||
"update-checker>=0.18.0, <0.19.0", | ||
|
||
# Internal dependencies | ||
"dbt-core>=1.7.4, <1.8.0", | ||
"metricflow>=0.205.0, <0.206.0", | ||
# Dependencies are specified through the `hatch-requirements-txt` plug-in. | ||
dynamic = ["dependencies", "optional-dependencies"] | ||
|
||
# dsi version should be fixed by MetricFlow/dbt-core, not set here | ||
"dbt-semantic-interfaces", | ||
[tool.hatch.metadata.hooks.requirements_txt] | ||
files = [ | ||
"extra-hatch-configuration/requirements-cli.txt", | ||
"extra-hatch-configuration/requirements-metricflow.txt", | ||
] | ||
|
||
[project.urls] | ||
|
@@ -44,27 +40,27 @@ dependencies = [ | |
[project.scripts] | ||
mf = 'dbt_metricflow.cli.main:cli' | ||
|
||
[project.optional-dependencies] | ||
bigquery = [ | ||
"dbt-bigquery>=1.7.0, <1.8.0" | ||
[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies] | ||
dbt-bigquery = [ | ||
"extra-hatch-configuration/requirements-dbt-bigquery.txt" | ||
] | ||
databricks = [ | ||
"dbt-databricks>=1.7.0, <1.8.0" | ||
dbt-databricks = [ | ||
"extra-hatch-configuration/requirements-dbt-databricks.txt" | ||
] | ||
duckdb = [ | ||
"dbt-duckdb>=1.7.0, <1.8.0" | ||
dbt-duckdb = [ | ||
"extra-hatch-configuration/requirements-dbt-duckdb.txt" | ||
] | ||
postgres = [ | ||
"dbt-postgres>=1.7.0, <1.8.0" | ||
dbt-postgres = [ | ||
"extra-hatch-configuration/requirements-dbt-postgres.txt" | ||
] | ||
redshift = [ | ||
"dbt-redshift>=1.7.0, <1.8.0" | ||
dbt-redshift = [ | ||
"extra-hatch-configuration/requirements-dbt-redshift.txt" | ||
] | ||
snowflake = [ | ||
"dbt-snowflake>=1.7.0, <1.8.0" | ||
dbt-snowflake = [ | ||
"extra-hatch-configuration/requirements-dbt-snowflake.txt" | ||
] | ||
trino = [ | ||
"dbt-trino>=1.7.0, <1.8.0" | ||
dbt-trino = [ | ||
"extra-hatch-configuration/requirements-dbt-trino.txt" | ||
] | ||
|
||
[tool.hatch.build.targets.sdist] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Developer tools | ||
mypy>=1.7.0, <1.8.0 | ||
pre-commit>=3.2.2, <3.3.0 | ||
pytest-mock>=3.7.0, <3.8.0 | ||
pytest-xdist>=3.2.1, <3.3.0 | ||
pytest>=7.1.1, < 7.2.0 | ||
types-PyYAML | ||
types-python-dateutil | ||
types-tabulate |
4 changes: 4 additions & 0 deletions
4
extra-hatch-configuration/requirements-sql-client-packages.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are currently separate for ease of removal, but due to the way Python | ||
# handles import statements they are required in all test environments | ||
SQLAlchemy>=1.4.42, <1.5.0 | ||
sqlalchemy2-stubs>=0.0.2a21, <0.0.3 |
1 change: 1 addition & 0 deletions
1
extra-hatch-configuration/requirements-trino-sql-client-packages.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
trino>=0.328.0, <0.329.0 |
Oops, something went wrong.