### Create a New Kedro Project Source: https://docs.kedro.org/en/1.0.0/getting-started/course This snippet demonstrates the command used to create a new Kedro project. It's a prerequisite for starting with Kedro and requires Git to be installed. ```bash kedro new ``` -------------------------------- ### Install Specific Kedro Version Source: https://docs.kedro.org/en/1.0.0/create/starters This command installs a specific version of Kedro using pip. For example, to install version 0.18.14. ```bash pip install kedro==0.18.14 ``` -------------------------------- ### Install Kedro Development Version with Starter Source: https://docs.kedro.org/en/1.0.0/getting-started/faq This command installs a development version of Kedro using a specific starter project from a URL. It bypasses the need for Git if it's not installed, providing a workaround for the `kedro new` flow. ```bash uvx kedro new -s https://github.com/kedro-org/kedro-starters/archive/1.0.0.zip --directory=spaceflights-pandas ``` -------------------------------- ### Install Project-Specific Dependencies Source: https://docs.kedro.org/en/1.0.0/develop/dependencies Installs all project-specific dependencies listed in the requirements.txt file. This command should be run from the root directory of the cloned project. ```bash pip install -r requirements.txt ``` -------------------------------- ### Start Prefect Server Source: https://docs.kedro.org/en/1.0.0/deploy/supported-platforms/prefect Starts a local Prefect Server instance, which acts as the backend for monitoring and executing Prefect flows. ```Shell prefect server start ``` -------------------------------- ### Create Kedro Project with Example Source: https://docs.kedro.org/en/1.0.0/create/new_project_tools Skips the example code selection prompt by specifying the preference directly using the `--example` argument with `kedro new`. This allows for automated inclusion of starter pipelines. ```Bash uvx kedro new --example=y ``` -------------------------------- ### Kedro Project Setup with Legacy Starter Source: https://docs.kedro.org/en/1.0.0/build/nodes Command to create a new Kedro project using a specific legacy starter ('pandas-iris') and a particular version of Kedro (0.18.14) to ensure compatibility with older examples. ```Bash kedro new --starter=pandas-iris --checkout=0.18.14 ``` -------------------------------- ### Create Setup Py Template Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro Defines a template string for creating a setup.py file, used for packaging Python projects. It includes placeholders for the project name, version, description, and install requirements. ```Python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name="{name}", version="{version}", description="Modular pipeline `{name}`", packages=find_packages(), include_package_data=True, install_requires={install_requires}, ) ``` -------------------------------- ### Check Kedro installation Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command verifies the Kedro installation by displaying its version information. ```bash kedro info ``` -------------------------------- ### Install Project Dependencies Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Installs all project-specific dependencies listed in the requirements.txt file. This command should be run from the root directory of the Kedro project. ```bash pip install -r requirements.txt ``` -------------------------------- ### Verify Kedro Installation Source: https://docs.kedro.org/en/1.0.0/tutorials/tutorial_template Runs the 'kedro info' command to verify that Kedro is installed correctly and to display information about the Kedro environment and project. ```bash uv run kedro info ``` -------------------------------- ### Install Dependencies from requirements.txt using uv Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command installs project dependencies directly from a `requirements.txt` file using the `uv` package manager. ```shell uv pip install -r requirements.txt ``` -------------------------------- ### Install Kedro-Viz Source: https://docs.kedro.org/en/1.0.0/create/new_project Installs the Kedro-Viz package, which is used for visualizing Kedro projects. This package needs to be installed separately. ```shell uv pip install kedro-viz ``` -------------------------------- ### Install Project Dependencies Source: https://docs.kedro.org/en/1.0.0/tutorials/tutorial_template Creates a virtual environment and installs all project dependencies listed in the requirements file. This command ensures the project has all necessary packages to run. ```bash uv sync ``` -------------------------------- ### Get Kedro Starter Specifications (Python) Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro Lists all available starter aliases from the Kedro core repository and installed plugins. It aggregates starter specifications, handling potential conflicts and validating the format of loaded starter configurations. Dependencies include `KedroStarterSpec` for starter object definition and `click` for console output. ```Python def _get_starters_dict() -> dict[str, KedroStarterSpec]: """This function lists all the starter aliases declared in the core repo and in plugins entry points. For example, the output for official kedro starters looks like: {"astro-airflow-iris": KedroStarterSpec( name="astro-airflow-iris", template_path="git+https://github.com/kedro-org/kedro-starters.git", directory="astro-airflow-iris", origin="kedro" ), } """ starter_specs = _OFFICIAL_STARTER_SPECS_DICT for starter_entry_point in _get_entry_points(name="starters"): origin = starter_entry_point.module.split(".")[0] specs: EntryPoints | list = _safe_load_entry_point(starter_entry_point) or [] for spec in specs: if not isinstance(spec, KedroStarterSpec): click.secho( f"The starter configuration loaded from module {origin}" f"should be a 'KedroStarterSpec', got '{type(spec)}' instead", fg="red", ) elif spec.alias in starter_specs: click.secho( f"Starter alias `{spec.alias}` from `{origin}` " f"has been ignored as it is already defined by" f"`{starter_specs[spec.alias].origin}`", fg="red", ) else: spec.origin = origin starter_specs[spec.alias] = spec return starter_specs ``` -------------------------------- ### Install Kedro using uv Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command installs the Kedro package into the currently active virtual environment using the `uv` package manager. ```shell uv pip install kedro ``` -------------------------------- ### Install Kedro using pip Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command installs the Kedro package from the Python Package Index (PyPI) into the active environment using `pip`. ```shell pip install kedro ``` -------------------------------- ### Install Pillow Source: https://docs.kedro.org/en/1.0.0/extend/how_to_create_a_custom_dataset Installs the Pillow library, which is used for generic image processing functionality to work with various image formats. ```Bash pip install Pillow ``` -------------------------------- ### Kedro Example Argument Help Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro Defines the help text for the `--example` argument in the `kedro new` command, used to enable or disable the example pipeline. ```Bash EXAMPLE_ARG_HELP = 'Enter y to enable, n to disable the example pipeline.' ``` -------------------------------- ### Install Dependencies from requirements.txt using pip Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command installs project dependencies directly from a `requirements.txt` file using the `pip` package manager. ```shell pip install -r requirements.txt ``` -------------------------------- ### Install cookiecutter package Source: https://docs.kedro.org/en/1.0.0/extend/create_a_starter Installs the `cookiecutter` package using pip, which is required for creating Kedro starters as they are based on Cookiecutter templates. ```bash pip install cookiecutter ``` -------------------------------- ### Install Pip-Tools Source: https://docs.kedro.org/en/1.0.0/develop/dependencies Installs the pip-tools package, which is used for managing and compiling Python dependencies into reproducible environments. ```bash pip install pip-tools ``` -------------------------------- ### Kedro Starter Commands Source: https://docs.kedro.org/en/1.0.0/getting-started/commands_reference Commands for working with Kedro project starters. This includes listing available official project starters. ```bash kedro starter [OPTIONS] COMMAND [ARGS]... Options: -h, --help Show this message and exit. ``` ```bash kedro starter list [OPTIONS] Options: -h, --help Show this message and exit. ``` -------------------------------- ### Install MLflow Dependency Source: https://docs.kedro.org/en/1.0.0/extend/hooks/examples Installs the mlflow library using pip, which is necessary for tracking metrics. ```Shell pip install mlflow ``` -------------------------------- ### Create a new Kedro project with Spaceflights starter Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command uses `uvx` to create a new Kedro project with the Spaceflights starter and specifies the project name. ```bash uvx kedro new --starter spaceflights-pandas --name spaceflights ``` -------------------------------- ### Install Statsd Dependency Source: https://docs.kedro.org/en/1.0.0/extend/hooks/examples Installs the statsd library using pip, which is required for pipeline monitoring. ```Shell pip install statsd ``` -------------------------------- ### Start Kedro IPython Session Source: https://docs.kedro.org/en/1.0.0/tutorials/set_up_data This command initiates an IPython session within the context of a Kedro project, allowing for interactive data loading and manipulation. ```bash kedro ipython ``` -------------------------------- ### Install memory_profiler Source: https://docs.kedro.org/en/1.0.0/extend/hooks/examples Command to install the memory_profiler library, a dependency for tracking memory consumption in Kedro hooks. ```bash pip install memory_profiler ``` -------------------------------- ### Create a new Kedro project using uvx Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command demonstrates how to create a new Kedro project using `uvx` to run the `kedro new` command. ```bash uvx kedro new ``` -------------------------------- ### Create Kedro Project with Spaceflights Starter Source: https://docs.kedro.org/en/1.0.0/tutorials/tutorial_template Generates a new Kedro project from the 'spaceflights-pandas' starter template. This command initializes a project with example code and structure. ```bash uvx kedro new --starter spaceflights-pandas --name spaceflights ``` -------------------------------- ### Install Kedro with Pip Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Installs the Kedro framework on the server using the pip package manager. ```bash pip install kedro ``` -------------------------------- ### Create Kedro Project with Configuration File Source: https://docs.kedro.org/en/1.0.0/create/starters This command creates a Kedro project from a starter template using a configuration file. This is useful when the starter requires more configuration than the default prompts. ```bash uvx kedro new --config=my_kedro_project.yml --starter=spaceflights-pandas ``` -------------------------------- ### Install Kedro-Datasets Type Dependencies Source: https://docs.kedro.org/en/1.0.0/develop/dependencies Installs Kedro and dependencies for a specific data type within a group from kedro-datasets. Replace '' and '' accordingly, e.g., 'pandas-exceldataset'. ```bash pip install "kedro-datasets[-]" ``` -------------------------------- ### Custom project creation prompt example Source: https://docs.kedro.org/en/1.0.0/extend/create_a_starter An example of a custom prompt configuration in `prompts.yml` for Kedro starters. It defines a title and a multi-line text for user guidance during project creation. ```yaml custom_prompt: title: "Prompt title" text: | Prompt description that explains to the user what information they should provide. ``` -------------------------------- ### Install Kedro-Datasets Group Dependencies Source: https://docs.kedro.org/en/1.0.0/develop/dependencies Installs Kedro and dependencies for a specific group of data types from kedro-datasets. Replace '' with the desired group name, e.g., 'pandas'. ```bash pip install "kedro-datasets[]" ``` -------------------------------- ### Install Great Expectations Source: https://docs.kedro.org/en/1.0.0/extend/hooks/examples Command to install the Great Expectations library, used for data validation in Kedro hooks. ```bash pip install great-expectations ``` -------------------------------- ### Instantiate OmegaConfigLoader and Load Configurations Source: https://docs.kedro.org/en/1.0.0/configure/configuration_basics Demonstrates how to create an OmegaConfigLoader instance using the project path, access catalog and credentials configurations, and load the DataCatalog with resolved credentials. ```python from kedro.config import OmegaConfigLoader from kedro.extras.datasets.catalog import DataCatalog # Assuming project_path and settings are defined elsewhere # conf_path = str(project_path / settings.CONF_SOURCE) # conf_loader = OmegaConfigLoader( # conf_source=conf_path, base_env="base", default_run_env="local" # ) # conf_catalog = conf_loader["catalog"] # conf_credentials = conf_loader["credentials"] # catalog = DataCatalog.from_config(catalog=conf_catalog, credentials=conf_credentials) ``` -------------------------------- ### Install Latest Kedro Source: https://docs.kedro.org/en/1.0.0/configure/config_loader_migration Installs the most recent version of Kedro, which also includes `omegaconf` as a dependency. ```bash pip install -U kedro ``` -------------------------------- ### Create a new Kedro project using pipx Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command shows how to create a new Kedro project by running `kedro new` using `pipx run`. ```bash pipx run kedro new ``` -------------------------------- ### Install Kedro with Conda Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Installs the Kedro framework on the server using the conda package manager from the conda-forge channel. ```bash conda install -c conda-forge kedro ``` -------------------------------- ### Navigate to the Kedro project directory Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command changes the current directory to the newly created Kedro project directory. ```bash cd spaceflights ``` -------------------------------- ### Install Kedro >= 0.18.13 Source: https://docs.kedro.org/en/1.0.0/configure/config_loader_migration Installs Kedro version 0.18.13 or later, which is recommended for replacing `TemplatedConfigLoader` functionality with `OmegaConfigLoader`. ```bash pip install "kedro>=0.18.13" ``` -------------------------------- ### Run the default Kedro pipeline Source: https://docs.kedro.org/en/1.0.0/getting-started/install This command executes the default Kedro pipeline using `uv run`. ```bash uv run kedro run --pipeline __default__ ``` -------------------------------- ### Install Kedro 0.18.5 Source: https://docs.kedro.org/en/1.0.0/configure/config_loader_migration Installs Kedro version 0.18.5, which includes `omegaconf` as a dependency, a prerequisite for using `OmegaConfigLoader`. ```bash pip install kedro==0.18.5 ``` -------------------------------- ### Install Kedro Core Source: https://docs.kedro.org/en/1.0.0/develop/dependencies Installs the core Kedro module, including the CLI tool, project template, pipeline abstraction, framework, and configuration support. This can be done using either pip or conda. ```bash pip install kedro ``` ```bash conda install -c conda-forge kedro ``` -------------------------------- ### Initialize pyproject.toml with uv init Source: https://docs.kedro.org/en/1.0.0/create/minimal_kedro_project Initializes a new project with basic metadata using `uv init`. The `--bare` flag creates a minimal configuration, and `--lib` suggests it's a library project. ```Bash uv init --bare --lib ``` -------------------------------- ### Bootstrap Kedro Project Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro Initializes a Kedro project by running setup procedures and returning project metadata. It resolves the project path, retrieves metadata, adds the source directory to the Python path, and configures the project. ```Python def bootstrap_project(project_path: str | Path) -> ProjectMetadata: """Run setup required at the beginning of the workflow when running in project mode, and return project metadata. """ project_path = Path(project_path).expanduser().resolve() metadata = _get_project_metadata(project_path) _add_src_to_path(metadata.source_dir, project_path) configure_project(metadata.package_name) return metadata ``` -------------------------------- ### Start Prefect Agent Source: https://docs.kedro.org/en/1.0.0/deploy/supported-platforms/prefect Starts a Prefect Agent that connects to the Prefect API and subscribes to a specific work queue within a work pool to execute flow runs. ```Shell prefect agent start --pool --work-queue ``` -------------------------------- ### Kedro Starter Argument Help Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro Defines the help text for the `--starter` argument in the `kedro new` command, explaining how to specify a starter template from a local path, remote URL, or alias. ```Bash STARTER_ARG_HELP = 'Specify the starter template to use when creating the project.\nThis can be the path to a local directory, a URL to a remote VCS repository supported\nby `cookiecutter` or one of the aliases listed in ``kedro starter list``.\n' ``` -------------------------------- ### Install Kedro Project Wheel Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Installs a Kedro project packaged as a Python wheel file using pip. This is typically done on the production server after transferring the wheel file. ```bash pip install ``` -------------------------------- ### Run Kedro Project Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Executes the Kedro project. This command should be run from the root directory of the project after all dependencies have been installed. ```bash kedro run ``` -------------------------------- ### Create New Kedro Project with Example and Logging Source: https://docs.kedro.org/en/1.0.0/deploy/supported-platforms/airflow Initializes a new Kedro project, including example pipelines and custom logging configurations. This command sets up the basic structure for a Kedro project designed for further customization. ```bash kedro new --example=yes --name=new-kedro-project --tools=log ``` -------------------------------- ### List Available Kedro Starter Aliases Source: https://docs.kedro.org/en/1.0.0/create/starters This command lists all the available starter aliases maintained by the Kedro team. These aliases can be used with the `kedro new --starter` command. ```bash kedro starter list ``` -------------------------------- ### Check Git Version Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Verifies if Git is installed on the server by checking its version. This is a prerequisite for cloning and managing code repositories. ```bash git --version ``` -------------------------------- ### Create Kedro Project from Custom Starter Source: https://docs.kedro.org/en/1.0.0/create/starters This command creates a Kedro project from a custom-built starter template. It requires specifying the path to the starter and the directory for the new project. ```bash uvx kedro new --starter= --directory ``` -------------------------------- ### Rename extra_params to runtime_params in KedroSession Source: https://docs.kedro.org/en/1.0.0/about/migration This code example demonstrates renaming the `extra_params` argument to `runtime_params` when creating a `KedroSession` in Kedro 1.0.0. ```python with KedroSession.create( project_path=project_path, - extra_params={"param1": "value1", "param2": "value2"}, + runtime_params={"param1": "value1", "param2": "value2"}, ) as session: session.run() ``` -------------------------------- ### Get Global Variable Value Source: https://docs.kedro.org/en/1.0.0/api/config/kedro Retrieves the value of a global variable from the configuration. It supports interpolation and raises an error if the variable is not found or if it starts with an underscore. ```Python def _get_globals_value(self, variable: str, default_value: Any = _NO_VALUE) -> Any: """Return the globals values to the resolver""" if variable.startswith("_"): raise InterpolationResolutionError( "Keys starting with '_' are not supported for globals." ) if not self._globals_oc: self._globals_oc = OmegaConf.create(self._globals) interpolated_value = OmegaConf.select( self._globals_oc, variable, default=default_value ) if interpolated_value != _NO_VALUE: return interpolated_value else: raise InterpolationResolutionError( f"Globals key '{variable}' not found and no default value provided." ) ``` -------------------------------- ### Create Kedro Project from Starter Source: https://docs.kedro.org/en/1.0.0/create/starters This command creates a new Kedro project using a specified starter template. The starter can be a local directory path or a URL to a remote version control repository supported by Cookiecutter. ```bash uvx kedro new --starter= ``` -------------------------------- ### Check Module Importability Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro Checks if a given module name can be imported. If an `ImportError` occurs, it raises a `KedroCliError` with a helpful message guiding the user to install dependencies. ```python def _check_module_importable(module_name: str) -> None: try: import_module(module_name) except ImportError as exc: raise KedroCliError( f"Module '{module_name}' not found. Make sure to install required project " f"dependencies by running the 'pip install -r requirements.txt' command first." ) from exc ``` -------------------------------- ### Create Kedro Project using Starter Alias Source: https://docs.kedro.org/en/1.0.0/create/starters This command creates a Kedro project using a pre-defined alias for a starter. Aliases simplify the process by avoiding the need to specify the full path to the starter template. ```bash uvx kedro new --starter=spaceflights-pandas ``` -------------------------------- ### Update catalog.yml for Dataset Layer Metadata Source: https://docs.kedro.org/en/1.0.0/about/migration Provides an example of how the `layer` attribute in `catalog.yml` has moved from the top level to within `metadata.kedro-viz` in Kedro 0.19.x. ```yaml companies: type: pandas.CSVDataset filepath: data/01_raw/companies.csv metadata: kedro-viz: layer: raw ``` -------------------------------- ### Kedro Pipeline Slicing Examples Source: https://docs.kedro.org/en/1.0.0/getting-started/glossary Demonstrates various methods for executing subsets of a Kedro pipeline. This includes slicing by specific inputs, starting nodes, ending nodes, or tags. ```Python pipeline.from_inputs pipeline.from_nodes pipeline.to_nodes pipeline.only_nodes_with_tags pipeline.only_nodes ``` -------------------------------- ### Run Packaged Kedro Project Source: https://docs.kedro.org/en/1.0.0/deploy/single_machine Executes a Kedro project that has been installed via a Python wheel file. This command is run from the root of the project directory on the server. ```bash python -m project_name ``` -------------------------------- ### Python Kedro Setup and Data Loading Source: https://docs.kedro.org/en/1.0.0/integrations-and-plugins/notebooks_and_ipython/notebook-example/add_kedro_to_a_notebook Demonstrates the initial Kedro setup for loading configuration and datasets. It initializes OmegaConfigLoader and DataCatalog, then loads 'companies', 'reviews', and 'shuttles' datasets along with model parameters. ```python # Kedro setup for data management and configuration from kedro.config import OmegaConfigLoader from kedro.io import DataCatalog conf_loader = OmegaConfigLoader(conf_source=".") conf_catalog = conf_loader["catalog"] conf_params = conf_loader["parameters"] # Create the DataCatalog instance from the configuration catalog = DataCatalog.from_config(conf_catalog) # Load the datasets companies = catalog.load("companies") reviews = catalog.load("reviews") shuttles = catalog.load("shuttles") # Load the configuration data test_size = conf_params["model_options"]["test_size"] random_state = conf_params["model_options"]["random_state"] ``` -------------------------------- ### Compile Requirements with Pip-Tools Source: https://docs.kedro.org/en/1.0.0/develop/dependencies Compiles the requirements.txt file into a requirements.lock file, pinning all project and transitive dependencies to specific versions for reproducibility. This command should be run from the project root. ```bash pip-compile /requirements.txt --output-file /requirements.lock ``` -------------------------------- ### Run Kedro Visualization Server Source: https://docs.kedro.org/en/1.0.0/tutorials/create_a_pipeline Starts the Kedro-Viz server, which automatically opens a browser tab to display the project visualization at http://127.0.0.1:4141/. This command allows you to explore your project's structure and data flow. ```bash kedro viz run ``` -------------------------------- ### Access Kedro Configuration in Code Source: https://docs.kedro.org/en/1.0.0/configure/configuration_basics Provides a Python code example demonstrating how to instantiate `OmegaConfigLoader` to access project configuration, specifically the catalog configuration, within a Kedro project. ```python from kedro.config import OmegaConfigLoader from kedro.framework.project import settings # Instantiate an `OmegaConfigLoader` instance with the location of your project configuration. conf_path = str(project_path / settings.CONF_SOURCE) conf_loader = OmegaConfigLoader(conf_source=conf_path) # This line shows how to access the catalog configuration. You can access other configuration in the same way. conf_catalog = conf_loader["catalog"] ``` -------------------------------- ### Create uv Virtual Environment Source: https://docs.kedro.org/en/1.0.0/getting-started/install This snippet demonstrates how to create a new virtual environment using the `uv` tool. It involves navigating to the project directory and then executing the `uv venv` command. ```shell cd your-kedro-project uv venv ``` -------------------------------- ### Create Kedro Project with Archived Starter Version Source: https://docs.kedro.org/en/1.0.0/create/starters This command demonstrates how to create a project using an archived starter (e.g., `pandas-iris`) with a specific Kedro version (0.18.14) that supports it. ```bash kedro new --starter=pandas-iris --checkout=0.18.14 ``` -------------------------------- ### Get Kedro Information Source: https://docs.kedro.org/en/1.0.0/api/framework/kedro The `info()` function displays Kedro's logo and a description of its purpose. It also lists installed plugins and their versions, along with their entry points. This function is part of the Kedro CLI framework. ```Python import click from collections import defaultdict # Assuming LOGO, ENTRY_POINT_GROUPS, and _get_entry_points are defined elsewhere @click.command() def info() -> None: """Get more information about kedro.""" # click.secho(LOGO, fg="green") # Placeholder for actual LOGO click.echo( "Kedro is a Python framework for\n" "creating reproducible, maintainable\n" "and modular data science code." ) plugin_versions = {} plugin_entry_points = defaultdict(set) # for plugin_entry_point in ENTRY_POINT_GROUPS: # Placeholder for actual ENTRY_POINT_GROUPS # for entry_point in _get_entry_points(plugin_entry_point): # Placeholder for actual _get_entry_points # module_name = entry_point.module.split(".")[0] # plugin_versions[module_name] = entry_point.dist.version # plugin_entry_points[module_name].add(plugin_entry_point) click.echo() if plugin_versions: click.echo("Installed plugins:") for plugin_name, plugin_version in sorted(plugin_versions.items()): entrypoints_str = ",".join(sorted(plugin_entry_points[plugin_name])) click.echo( f"{plugin_name}: {plugin_version} (entry points:{entrypoints_str})" ) else: # pragma: no cover click.echo("No plugins installed") ``` -------------------------------- ### Search Datasets with Regex Source: https://docs.kedro.org/en/1.0.0/tutorials/notebooks_tutorial Demonstrates how to search for datasets in the Kedro catalog using a regular expression. This is useful when the exact dataset name is unknown. It shows an example of listing datasets that start with 'pre*'. ```Python catalog.list("pre*") ``` -------------------------------- ### Run Kedro-Viz Source: https://docs.kedro.org/en/1.0.0/create/new_project Starts the Kedro-Viz server to visualize the project. This command automatically opens a browser tab at http://127.0.0.1:4141/. ```shell kedro viz run ``` -------------------------------- ### Update kedro run command from --namespace to --namespaces Source: https://docs.kedro.org/en/1.0.0/about/migration This example shows the change in the `kedro run` command, where the `--namespace` argument has been removed and replaced by `--namespaces`, which accepts a comma-separated list of namespaces. ```bash kedro run --namespace=preprocessing You should now use the following: ```bash kedro run --namespaces=preprocessing ``` ``` -------------------------------- ### Kedro New Example Pipeline Prompt Source: https://docs.kedro.org/en/1.0.0/create/new_project This displays the prompt for including example pipelines when creating a new Kedro project. The choice affects which starter code is included based on selected tools. ```Shell Would you like to include an example pipeline? : (no): ``` -------------------------------- ### Update pipeline initialization to use Node and Pipeline Source: https://docs.kedro.org/en/1.0.0/about/migration This example demonstrates updating the import statements and the initialization of nodes and pipelines from wrapper functions (`node`, `pipeline`) to the preferred class-based approach (`Node`, `Pipeline`) in Kedro 1.0.0. ```python - from kedro.pipeline.modular_pipeline import node, pipeline # Old import + from kedro.pipeline import Node, Pipeline # New import from .nodes import create_model_input_table, preprocess_companies, preprocess_shuttles def create_pipeline(**kwargs) -> Pipeline: - return pipeline( + return Pipeline( [ - node( + Node( func=preprocess_companies, inputs="preprocessed_companies", outputs="preprocessed_companies", name="preprocess_companies_node", ), - node( + Node( func=preprocess_shuttles, inputs="shuttles", outputs="preprocessed_shuttles", name="preprocess_shuttles_node", ), - node( + Node( func=create_model_input_table, inputs=["preprocessed_shuttles", "preprocessed_companies", "reviews"], outputs="model_input_table", name="create_model_input_table_node", ), ] ) ```