Skip to content

Commit

Permalink
[components] Add extra dagster-* editable dependencies to generated p…
Browse files Browse the repository at this point in the history
…yproject.toml (#26383)

## Summary & Motivation

`uv` package sources only work for direct dependencies of a package.
This makes sure all dagster packages needed by a scaffolded code
location are direct dependencies and have a listed uv source (fixes bug
in tutorial).

## How I Tested These Changes

Manual testing.
  • Loading branch information
smackesey authored Dec 10, 2024
1 parent 09c3ac3 commit 2404f13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python_modules/libraries/dg-cli/dg_cli/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ def generate_code_location(path: str, editable_dagster_root: Optional[str] = Non
editable_dagster_uv_sources = textwrap.dedent(f"""
[tool.uv.sources]
dagster = {{ path = "{editable_dagster_root}/python_modules/dagster", editable = true }}
dagster-components = {{ path = "{editable_dagster_root}/python_modules/libraries/dagster-components", editable = true }}
dagster-graphql = {{ path = "{editable_dagster_root}/python_modules/dagster-graphql", editable = true }}
dagster-pipes = {{ path = "{editable_dagster_root}/python_modules/dagster-pipes", editable = true }}
dagster-webserver = {{ path = "{editable_dagster_root}/python_modules/dagster-webserver", editable = true }}
dagster-components = {{ path = "{editable_dagster_root}/python_modules/libraries/dagster-components", editable = true }}
dagster-embedded-elt = {{ path = "{editable_dagster_root}/python_modules/libraries/dagster-embedded-elt", editable = true }}
dagster-dbt = {{ path = "{editable_dagster_root}/python_modules/libraries/dagster-dbt", editable = true }}
""")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ requires-python = ">=3.9,<3.13"
version = "0.1.0"
dependencies = [
"dagster",
"dagster-graphql",
"dagster-pipes",
"dagster-webserver",
"dagster-components[sling,dbt]",
"dagster-embedded-elt",
"dagster-dbt",
Expand Down

0 comments on commit 2404f13

Please sign in to comment.