Skip to content

Commit

Permalink
Make dagster-dbt project scaffold compatible with uv (#26229)
Browse files Browse the repository at this point in the history
## Summary & Motivation

This PR modifies the `dagster-dbt` to compatible with uv by modify a
`pyproject.toml`. The pyproject.toml that generated by `dagster-dbt` is
a bit different from the `dagster` is that the pyproject.toml didn't
include `pytest` as an dev dependency.

Closes #26224 

## How I Tested These Changes

1. Clone the jaffle_shop and follow the profile setup from
https://docs.dagster.io/integrations/dbt/using-dbt-with-dagster/set-up-dbt-project.
2. In `python_modules/libraries/dagster-dbt`, run `typer
dagster_dbt/cli/app.py run project scaffold --project-name hello_dbt
--dbt-project-dir jaffle-shop-classic`. The `hello_dbt` should be
generated successfully.
3. Open the `pyproject.toml` in `hello_dbt`, the dependencies (and
optional-dependencies) and project information should be added.
4. Run the pipeline with `uv run --extra dev dagster run`. The dbt
assets will be presents on assets pipeline page.

## Changelog

[dagster-dbt] Update dagster-dbt scaffold template to be compatible with
uv

Signed-off-by: Thanabodee Charoenpiriyakij <[email protected]>
  • Loading branch information
wingyplus authored Dec 9, 2024
1 parent b076a3a commit d1594bc
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
[project]
name = "{{ project_name }}"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.9,<3.13"
dependencies = [
"dagster",
"dagster-cloud",
"dagster-dbt",
{%- for dbt_adapter in dbt_adapter_packages %}
"{{ dbt_adapter }}<{{ dbt_core_version_upper_bound }}",
{%- endfor %}
]
[project.optional-dependencies]
dev = [
"dagster-webserver",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
Expand Down

0 comments on commit d1594bc

Please sign in to comment.