Skip to content

Commit

Permalink
Align postgres hatch environment config with Snowflake
Browse files Browse the repository at this point in the history
Due to an incompatibility between dbt-snowflake 1.5 and 1.6, we
had to specify the version.

Given that versioning was necessary, the benefit of using pre-install
was limited. As such, we make the relevant adapters environment-specific
dependencies, and bring postgres in line. This will hopefully get
streamlined into the bundle package in the future, but for now
we can put up with manual version management on these adapter environments.
  • Loading branch information
tlento committed Jun 28, 2023
1 parent 8b63d85 commit 0e17bbc
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ dev-packages = [
"types-python-dateutil",
]

dbt-postgres = [
"dbt-postgres>=1.6.0.b6",
]

dbt-snowflake = [
"dbt-snowflake>=1.6.0b3",
]
Expand Down Expand Up @@ -110,17 +114,9 @@ features = [

[tool.hatch.envs.postgres-env]
description = "Dev environment for working with Postgres adapter"
# Install the dbt postgres package as a pre-install extra
# This helps us avoid having to do version pegs, although it relies on pip's
# current "pretend version conflicts aren't a problem" behavior for existing
# installations. In future, this will be updated to use an editable dependency
# on the dbt-metricflow bundle, which will allow for local version management
# for testing.
pre-install-commands = [
"pip install dbt-postgres",
]
features = [
"dev-packages",
"dbt-postgres",
]

[tool.hatch.envs.snowflake-env.env-vars]
Expand Down

0 comments on commit 0e17bbc

Please sign in to comment.