Skip to content

Commit cdc62de

Browse files
committed
cp
1 parent 1a1a94b commit cdc62de

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

python_modules/libraries/dagster-components/dagster_components/cli/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def generate_component_command(
4040
)
4141
sys.exit(1)
4242

43-
context = CodeLocationProjectContext.from_root_path(
43+
context = CodeLocationProjectContext.from_code_location_path(
4444
find_enclosing_code_location_root_path(Path.cwd()),
4545
ComponentRegistry.from_entry_point_discovery(builtin_component_lib=builtin_component_lib),
4646
)

python_modules/libraries/dagster-components/dagster_components/cli/list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def list_component_types_command(ctx: click.Context) -> None:
3232
)
3333
sys.exit(1)
3434

35-
context = CodeLocationProjectContext.from_root_path(
35+
context = CodeLocationProjectContext.from_code_location_path(
3636
find_enclosing_code_location_root_path(Path.cwd()),
3737
ComponentRegistry.from_entry_point_discovery(builtin_component_lib=builtin_component_lib),
3838
)

python_modules/libraries/dagster-components/dagster_components/core/component_defs_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def build_component_defs(
138138
"""
139139
from dagster._core.definitions.definitions_class import Definitions
140140

141-
context = CodeLocationProjectContext.from_root_path(
141+
context = CodeLocationProjectContext.from_code_location_path(
142142
code_location_path, registry or ComponentRegistry.from_entry_point_discovery()
143143
)
144144

python_modules/libraries/dagster-components/dagster_components/core/deployment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ def _is_code_location_root(path: Path) -> bool:
4646

4747
class CodeLocationProjectContext:
4848
@classmethod
49-
def from_root_path(cls, root_path: Path, component_registry: "ComponentRegistry") -> Self:
50-
if not _is_code_location_root(root_path):
49+
def from_code_location_path(cls, path: Path, component_registry: "ComponentRegistry") -> Self:
50+
if not _is_code_location_root(path):
5151
raise DagsterError(
52-
f"Path {root_path} is not a code location root. Must have a pyproject.toml with a [tool.dagster] section."
52+
f"Path {path} is not a code location root. Must have a pyproject.toml with a [tool.dagster] section."
5353
)
5454

5555
return cls(
56-
root_path=str(root_path),
57-
name=os.path.basename(root_path),
56+
root_path=str(path),
57+
name=os.path.basename(path),
5858
component_registry=component_registry,
5959
)
6060

0 commit comments

Comments
 (0)