You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[components docs] Flesh out existing code location docs, test (#27604)
## Summary
Adds a section to the 'existing project' docs about adding to
`pyproject.toml` (necessary for `dg` cli to work) alongside optionally
configuring a `uv` environment.
This was after playing around trying to port a DOP project, I found some
of these steps not immediately obvious & had a hard time setting up a
new venv.
Places the existing + new contents under integration test.
Copy file name to clipboardExpand all lines: docs/docs-beta/docs/guides/preview/components/existing-code-location.md
+48-9
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,50 @@ sidebar_position: 300
7
7
This guide is only relevant if you are starting from an _existing_ Dagster code location. This setup is unnecessary if you used `dg code-location generate` to create your code location.
8
8
:::
9
9
10
-
## Create a `components` directory
10
+
Let's begin with a Dagster code location that has some assets, but no components:
11
11
12
-
First, you'll want to create a directory to contain any new components you add to your code location. By convention, this directory is named `components`, and exists at the top level of your code location's Python module.
We'll need to install the `dg` command line tool, which is used to scaffold components. We recommend installing `dg` globally using the [`uv`](https://docs.astral.sh/uv/getting-started/installation/) package manager; it can also be installed using `pip`.
Add a `tool.dg` section to your `pyproject.toml` file. This will tell the `dg` command line tool that this code location is a valid Dagster code location.
Next, you'll want to create a directory to contain any new components you add to your code location. By convention, this directory is named `components`, and exists at the top level of your code location's Python module.
Copy file name to clipboardExpand all lines: examples/docs_beta_snippets/docs_beta_snippets_tests/snippet_checks/guides/components/test_components_docs.py
Copy file name to clipboardExpand all lines: examples/docs_beta_snippets/docs_beta_snippets_tests/snippet_checks/guides/components/test_components_docs_deployments.py
0 commit comments