Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions kedro/framework/cli/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
CONF_SOURCE_HELP = """Path of a directory where project configuration is stored."""
ONLY_MISSING_OUTPUTS_HELP = """Run only nodes with missing outputs.
If all outputs of a node exist and are persisted, skip the node execution."""
VALIDATE_HELP = """Validate parameters against type annotations before running pipeline.
Supports Pydantic models and dataclasses for comprehensive parameter validation."""


@click.group(name="kedro")
Expand Down Expand Up @@ -232,6 +234,7 @@ def package(metadata: ProjectMetadata) -> None:
is_flag=True,
help=ONLY_MISSING_OUTPUTS_HELP,
)
@click.option("--validate", is_flag=True, help=VALIDATE_HELP)
def run( # noqa: PLR0913
tags: str,
env: str,
Expand All @@ -249,15 +252,18 @@ def run( # noqa: PLR0913
params: dict[str, Any],
namespaces: str,
only_missing_outputs: bool,
validate: bool,
) -> dict[str, Any]:
"""Run the pipeline."""

runner_obj = load_obj(runner or "SequentialRunner", "kedro.runner")
tuple_tags = tuple(tags)
tuple_node_names = tuple(node_names)

with KedroSession.create(
env=env, conf_source=conf_source, runtime_params=params
env=env,
conf_source=conf_source,
runtime_params=params,
enable_validation=validate,
) as session:
return session.run(
tags=tuple_tags,
Expand Down
Loading
Loading