module documentation

A collection of CLI commands for working with Kedro pipelines.

Class PipelineArtifacts An ordered collection of source_path, tests_path, config_paths
Function create_pipeline Create a new modular pipeline by providing a name.
Function delete_pipeline Delete a modular pipeline by providing a name.
Function pipeline Commands for working with pipelines.
Function pipeline_cli Undocumented
Function _assert_pkg_name_ok Check that python package name is in line with PEP8 requirements.
Function _check_pipeline_name Undocumented
Function _copy_pipeline_configs Undocumented
Function _copy_pipeline_tests Undocumented
Function _create_pipeline Undocumented
Function _delete_artifacts Undocumented
Function _echo_deletion_warning Undocumented
Function _get_artifacts_to_package From existing project, returns in order: source_path, tests_path, config_paths
Function _get_pipeline_artifacts Undocumented
Function _sync_dirs Recursively copies source directory (or file) into target directory without overwriting any existing files/directories in the target using the following rules:
Constant _SETUP_PY_TEMPLATE Undocumented
@command_with_verbosity(pipeline, 'create')
@click.argument('name', nargs=1, callback=_check_pipeline_name)
@click.option('--skip-config', is_flag=True, help='Skip creation of config files for the new pipeline(s).')
@env_option(help='Environment to create pipeline configuration in. Defaults to `base`.')
@click.pass_obj
def create_pipeline(metadata: ProjectMetadata, name, skip_config, env, **kwargs): (source)

Create a new modular pipeline by providing a name.

@command_with_verbosity(pipeline, 'delete')
@click.argument('name', nargs=1, callback=_check_pipeline_name)
@env_option(help='Environment to delete pipeline configuration from. Defaults to \'base\'.')
@click.option('-y', '--yes', is_flag=True, help='Confirm deletion of pipeline non-interactively.')
@click.pass_obj
def delete_pipeline(metadata: ProjectMetadata, name, env, yes, **kwargs): (source)

Delete a modular pipeline by providing a name.

@pipeline_cli.group()
def pipeline(): (source)

Commands for working with pipelines.

@click.group(name='Kedro')
def pipeline_cli(): (source)

Undocumented

def _assert_pkg_name_ok(pkg_name: str): (source)

Check that python package name is in line with PEP8 requirements.

Parameters
pkg_name:strCandidate Python package name.
Raises
KedroCliErrorIf package name violates the requirements.
def _check_pipeline_name(ctx, param, value): (source)

Undocumented

def _copy_pipeline_configs(result_path: Path, conf_path: Path, skip_config: bool, env: str): (source)

Undocumented

def _copy_pipeline_tests(pipeline_name: str, result_path: Path, package_dir: Path): (source)

Undocumented

def _create_pipeline(name: str, output_dir: Path) -> Path: (source)

Undocumented

def _delete_artifacts(*artifacts: Path): (source)

Undocumented

def _echo_deletion_warning(message: str, **paths: List[Path]): (source)

Undocumented

def _get_artifacts_to_package(project_metadata: ProjectMetadata, module_path: str, env: str) -> Tuple[Path, Path, Path]: (source)

From existing project, returns in order: source_path, tests_path, config_paths

def _get_pipeline_artifacts(project_metadata: ProjectMetadata, pipeline_name: str, env: str) -> PipelineArtifacts: (source)

Undocumented

def _sync_dirs(source: Path, target: Path, prefix: str = '', overwrite: bool = False): (source)

Recursively copies source directory (or file) into target directory without overwriting any existing files/directories in the target using the following rules:

1) Skip any files/directories which names match with files in target, unless overwrite=True. 2) Copy all files from source to target. 3) Recursively copy all directories from source to target.
Parameters
source:PathA local directory to copy from, must exist.
target:PathA local directory to copy to, will be created if doesn't exist yet.
prefix:strPrefix for CLI message indentation.
overwrite:boolUndocumented
_SETUP_PY_TEMPLATE: str = (source)

Undocumented

Value
'''# -*- coding: utf-8 -*-
from setuptools import setup, find_packages

setup(
    name="{name}",
    version="{version}",
    description="Modular pipeline `{name}`",
...