module documentation

This module provides metadata for a Kedro project.

Class ProjectMetadata Structure holding project metadata derived from pyproject.toml
Function bootstrap_project Run setup required at the beginning of the workflow when running in project mode, and return project metadata.
Function _add_src_to_path Undocumented
Function _get_project_metadata Read project metadata from <project_root>/pyproject.toml config file, under the [tool.kedro] section.
Function _is_project Undocumented
Function _validate_source_path Validate the source path exists and is relative to the project path.
Function _version_mismatch_error Undocumented
Constant _PYPROJECT Undocumented
def bootstrap_project(project_path: Path) -> ProjectMetadata: (source)

Run setup required at the beginning of the workflow when running in project mode, and return project metadata.

def _add_src_to_path(source_dir: Path, project_path: Path): (source)

Undocumented

def _get_project_metadata(project_path: Union[str, Path]) -> ProjectMetadata: (source)

Read project metadata from <project_root>/pyproject.toml config file, under the [tool.kedro] section.

Parameters
project_path:Union[str, Path]Local path to project root directory to look up pyproject.toml in.
Returns
ProjectMetadataA named tuple that contains project metadata.
Raises
RuntimeErrorpyproject.toml was not found or the [tool.kedro] section is missing, or config file cannot be parsed.
ValueErrorIf project version is different from Kedro package version. Note: Project version is the Kedro version the project was generated with.
def _is_project(project_path: Union[str, Path]) -> bool: (source)

Undocumented

def _validate_source_path(source_path: Path, project_path: Path): (source)

Validate the source path exists and is relative to the project path.

Parameters
source_path:PathAbsolute source path.
project_path:PathPath to the Kedro project.
Raises
ValueErrorIf source_path is not relative to project_path.
NotADirectoryErrorIf source_path does not exist.
def _version_mismatch_error(kedro_init_version) -> str: (source)

Undocumented

_PYPROJECT: str = (source)

Undocumented

Value
'pyproject.toml'