Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Jun 5, 2024
1 parent ae082cf commit ceb6079
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
13 changes: 8 additions & 5 deletions dbt-metricflow/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ files = [
mf = 'dbt_metricflow.cli.main:cli'

[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
dbt-bigquery = [
"extra-hatch-configuration/requirements-dbt-bigquery.txt"
]
dbt-databricks = [
"extra-hatch-configuration/requirements-dbt-databricks.txt"
]
dbt-duckdb = [
"extra-hatch-configuration/requirements-dbt-duckdb.txt"
]
Expand All @@ -53,11 +59,8 @@ dbt-redshift = [
dbt-snowflake = [
"extra-hatch-configuration/requirements-dbt-snowflake.txt"
]
dbt-bigquery = [
"extra-hatch-configuration/requirements-dbt-bigquery.txt"
]
dbt-databricks = [
"extra-hatch-configuration/requirements-dbt-databricks.txt"
dbt-trino = [
"extra-hatch-configuration/requirements-dbt-trino.txt"
]

[tool.hatch.build.targets.sdist]
Expand Down
21 changes: 7 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,9 @@ packages = ["metricflow", "metricflow-semantics/metricflow_semantics"]


# Environment setup
# Due to our current wonky package organization, we need to do an editable install
# of dbt-metricflow in every test running environment in order for the tests to work.
# In theory we can install the adapter extra for dbt-metricflow and rely on that, but
# for ease of managing versioning through upgrade phases we retain the explicit
# dependencies on the specific adapter versions defined here.

[tool.hatch.envs.dev-env]
description = "Environment for development. Includes a DuckDB-backed client."
run = "run-coverage --no-cov"
dependencies = ["metricflow-semantics @ {root:uri}/metricflow-semantics"]

features = [
"dev-packages",
Expand All @@ -118,11 +111,11 @@ MF_TEST_ADAPTER_TYPE="duckdb"
MF_SQL_ENGINE_URL="duckdb://"
# This allows us to use the classes in the `dbt-metricflow` package for tests without installing the package.
# `dbt-metricflow` can't be installed as it has `metricflow` as a dependency.
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"


[tool.hatch.envs.postgres-env.env-vars]
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"
MF_SQL_ENGINE_URL="postgresql://metricflow@localhost:5432/metricflow"
MF_SQL_ENGINE_PASSWORD="metricflowing"
MF_TEST_ADAPTER_TYPE="postgres"
Expand All @@ -141,7 +134,7 @@ features = [
# configured independently of the hatch env construction

[tool.hatch.envs.bigquery-env.env-vars]
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"
MF_TEST_ADAPTER_TYPE="bigquery"

[tool.hatch.envs.bigquery-env]
Expand All @@ -155,7 +148,7 @@ features = [


[tool.hatch.envs.databricks-env.env-vars]
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"
MF_TEST_ADAPTER_TYPE="databricks"


Expand All @@ -170,7 +163,7 @@ features = [


[tool.hatch.envs.redshift-env.env-vars]
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"
MF_TEST_ADAPTER_TYPE="redshift"

[tool.hatch.envs.redshift-env]
Expand All @@ -184,7 +177,7 @@ features = [


[tool.hatch.envs.snowflake-env.env-vars]
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"
MF_TEST_ADAPTER_TYPE="snowflake"

[tool.hatch.envs.snowflake-env]
Expand All @@ -198,7 +191,7 @@ features = [


[tool.hatch.envs.trino-env.env-vars]
PYTHONPATH="./dbt-metricflow"
PYTHONPATH="metricflow-semantics:dbt-metricflow"
MF_TEST_ADAPTER_TYPE = "trino"
MF_SQL_ENGINE_URL = "trino://trino@localhost:8080/"
DBT_ENV_SECRET_CATALOG="memory"
Expand Down

0 comments on commit ceb6079

Please sign in to comment.