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
## Summary & Motivation
This PR is the result of a manual reading of all `dg`/components guides.
I was looking for:
- references to old project structure
- references to old APIs (e.g. `dg list component-type`, `dg init
--workspace-name`, ...)
I updated everything I could find. In a few cases the pages were so out
of date that I opened separate PRs for them:
- #29185
- #29181
## How I Tested These Changes
Existing test suite.
Copy file name to clipboardExpand all lines: docs/docs/guides/labs/components/building-pipelines-with-components/creating-a-project-with-components.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -27,15 +27,14 @@ Running `dg scaffold project <project-name>` creates a fairly standard Python pr
27
27
28
28
The following files and directories are included:
29
29
30
-
- A Python package `jaffle_platform`-- the name is an underscored inflection of the
31
-
project root directory (`jaffle_platform`).
32
-
- An (empty) `jaffle_platform_tests` test package.
30
+
- A Python package `jaffle_platform` located in `src/jaffle_platform`-- the name is an underscored inflection of the project root directory (`jaffle-platform`).
31
+
- An (empty) `tests` package.
33
32
- A `uv.lock` file.
34
33
- A `pyproject.toml` file.
35
34
36
35
:::note
37
36
38
-
For more information about the sections and settings in pyproject.toml, see "[pyproject.toml settings](/guides/labs/components/building-pipelines-with-components/pyproject-toml)".
37
+
For more information about the sections and settings in `pyproject.toml`, see "[pyproject.toml settings](/guides/labs/components/building-pipelines-with-components/pyproject-toml)".
Copy file name to clipboardExpand all lines: docs/docs/guides/labs/components/components-etl-pipeline-tutorial.md
+11-13
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ To learn more about the files, directories, and default settings in a project sc
62
62
63
63
### 1. Add the Sling component type to your environment
64
64
65
-
To ingest data, you must set up [Sling](https://slingdata.io/). However, if you list the available component types in your environment at this point, the Sling component won't appear, since the `dagster` package doesn't contain components for specific integrations (like Sling):
65
+
To ingest data, you must set up [Sling](https://slingdata.io/). We can list the component types available to our project with `dg list plugins`. If we run this now, the Sling component won't appear, since the `dagster` package doesn't contain components for specific integrations (like Sling):
@@ -72,15 +72,13 @@ To make the Sling component available in your environment, install the `dagster-
72
72
73
73
:::note
74
74
75
-
`dg` always operates in an isolated environment, but it is able to access the set of component types available in your project environment because it attempts to resolve a project root whenever it is run. If `dg` finds a `pyproject.toml` file with a `tool.dg.is_project = true` setting, then it will expect a `uv`-managed virtual environment to be present in the same directory. (This can be confirmed by the presence of a `uv.lock` file.)
76
-
77
-
When you run commands like `dg list component-type` , `dg` obtains the results by identifying the in-scope project environment and querying it. In this case, the project environment was set up as part of the `dg scaffold project` command.
75
+
When you run commands like `dg list plugins`, `dg` obtains the results by resolving a project environment and querying it. In this case, the project environment was set up as part of the `dg scaffold project` command. The `pyproject.toml` in newly scaffolded projects contains a setting `tool.dg.project.python_environment = "persistent_uv"`. This tells `dg` to expect a `uv`-managed virtual environment to be present in the project root directory. (This can be confirmed by the presence of a `uv.lock` file.)
78
76
79
77
:::
80
78
81
79
### 2. Confirm availability of the Sling component type
82
80
83
-
To confirm that the `dagster_sling.SlingReplicationCollectionComponent` component type is now available, run the `dg list component-type` command again:
81
+
To confirm that the `dagster_sling.SlingReplicationCollectionComponent` component type is now available, run the `dg list plugins` command again:
Right now the parameters define a single "replication"-- this is a Sling concept that specifies how data should be replicated from a source to a target. The details are specified in a `replication.yaml` file that is read by Sling. This file does not yet exist-- we are going to create it shortly.
@@ -121,15 +119,15 @@ Create a `replication.yaml` file that references the downloaded files:
You might notice the typo in the above file--after updating a component file, it's useful to validate that the changes match the component's schema. You can do this by running `dg check yaml`:
@@ -205,7 +203,7 @@ You can see that the error message includes the filename, line number, and a cod
Copy file name to clipboardExpand all lines: docs/docs/guides/labs/dg/incrementally-adopting-dg/migrating-definitions.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This guide covers using existing Dagster definitions with a `dg`-compatible proj
13
13
14
14
:::
15
15
16
-
In projects that heavily use `dg`, you would typically keep all definitions in the `defs/` directory. However, if you've converted an existing project to use `dg`, you may have definitions located in various other modules. This guide will show you how to move these existing definitions into the `defs` directory in a way that will allow them to be automatically loaded.
16
+
In projects that are started with `dg`, all definitions are typically kept in the `defs/` directory. However, if you've converted an existing project to use `dg`, you may have definitions located in various other modules. This guide will show you how to move these existing definitions into the `defs` directory in a way that will allow them to be automatically loaded.
Copy file name to clipboardExpand all lines: docs/docs/guides/labs/dg/multiple-projects.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ If you're just getting started, we recommend [scaffolding a single project](/gui
15
15
16
16
If you need to collaborate with multiple teams, or work with conflicting dependencies that require isolation from each other, you can scaffold a workspace directory that contains multiple projects, each with their own separate Python environment.
17
17
18
-
A workspace directory contains a root `pyproject.toml` with workspace-level settings, and a `projects` directory with one or more projects.
18
+
A workspace directory contains a root `dg.toml` with workspace-level settings, and a `projects` directory with one or more projects.
19
19
20
20
:::note
21
21
@@ -25,7 +25,7 @@ A workspace does not define a Python environment by default. Instead, Python env
25
25
26
26
## Scaffold a new workspace and first project
27
27
28
-
To scaffold a new workspace with an initial project called `project-1`, run `dg init` with the `--workspace-name` option:
28
+
To scaffold a new workspace with an initial project called `project-1`, run `dg init` with the `--workspace` option. You will be prompted for the name of the project:
0 commit comments