From 107af3f5ae662a9ac90ddf243447d0efa7ccaa1f Mon Sep 17 00:00:00 2001 From: laizaparizotto Date: Fri, 21 Jul 2023 16:36:51 +0200 Subject: [PATCH 1/4] Fixing typo n on line 114 file /docs/source/nodes_and_pipelines/run_a_pipeline.md from issue #2607 Signed-off-by: laizaparizotto --- docs/source/nodes_and_pipelines/run_a_pipeline.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/nodes_and_pipelines/run_a_pipeline.md b/docs/source/nodes_and_pipelines/run_a_pipeline.md index c9a9790302..5105cd5b00 100644 --- a/docs/source/nodes_and_pipelines/run_a_pipeline.md +++ b/docs/source/nodes_and_pipelines/run_a_pipeline.md @@ -111,7 +111,6 @@ class DryRunner(AbstractRunner): self._logger.info( "Actual run would execute %d nodes:\n%s", len(nodes), - "\n", pipeline.describe(), ) self._logger.info("Checking inputs...") From cc6c1af6d7a6f26b2f857451b7e8b3f52e7939ea Mon Sep 17 00:00:00 2001 From: laizaparizotto Date: Fri, 21 Jul 2023 16:53:54 +0200 Subject: [PATCH 2/4] Removed redundant packages at lines 66, 67 and 68 on file kedro/docs/source/nodes_and_pipelines/run_a_pipeline.md, packages: from kedro.io import AbstractDataSet, DataCatalog, MemoryDataSet, from kedro.pipeline import Pipeline and from kedro.runner.runner import AbstractRunner Signed-off-by: laizaparizotto --- docs/source/nodes_and_pipelines/run_a_pipeline.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/source/nodes_and_pipelines/run_a_pipeline.md b/docs/source/nodes_and_pipelines/run_a_pipeline.md index 5105cd5b00..417510fe8e 100644 --- a/docs/source/nodes_and_pipelines/run_a_pipeline.md +++ b/docs/source/nodes_and_pipelines/run_a_pipeline.md @@ -63,11 +63,6 @@ from kedro.runner.runner import AbstractRunner from pluggy import PluginManager -from kedro.io import AbstractDataSet, DataCatalog, MemoryDataSet -from kedro.pipeline import Pipeline -from kedro.runner.runner import AbstractRunner - - class DryRunner(AbstractRunner): """``DryRunner`` is an ``AbstractRunner`` implementation. It can be used to list which nodes would be run without actually executing anything. It also checks if all the From 81b52c8d239a718b11ad7eea6f34a40830335ee8 Mon Sep 17 00:00:00 2001 From: laizaparizotto Date: Wed, 26 Jul 2023 09:56:21 +0200 Subject: [PATCH 3/4] Add logger object for logging when computing micropackage version Signed-off-by: laizaparizotto --- kedro/framework/cli/micropkg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kedro/framework/cli/micropkg.py b/kedro/framework/cli/micropkg.py index ea9a34bd96..716e0c2149 100644 --- a/kedro/framework/cli/micropkg.py +++ b/kedro/framework/cli/micropkg.py @@ -52,6 +52,8 @@ find = {{}} """ +logger = logging.getLogger(__name__) + class _EquivalentRequirement(Requirement): """Parse a requirement according to PEP 508. From b746f3e09ad8c275542b9fec55eee4727c2d16f3 Mon Sep 17 00:00:00 2001 From: laizaparizotto Date: Thu, 27 Jul 2023 12:26:23 +0200 Subject: [PATCH 4/4] Added new format to the logging Signed-off-by: laizaparizotto --- kedro/framework/cli/micropkg.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kedro/framework/cli/micropkg.py b/kedro/framework/cli/micropkg.py index 80d1f0f473..ade2d7a712 100644 --- a/kedro/framework/cli/micropkg.py +++ b/kedro/framework/cli/micropkg.py @@ -2,6 +2,7 @@ # ruff: noqa: I001 # https://github.com/kedro-org/kedro/pull/2634 from __future__ import annotations +import logging import re import shutil import sys @@ -12,7 +13,6 @@ from typing import Any, Iterable, Iterator, List, Tuple, Union import click -import logging from build.util import project_wheel_metadata from packaging.requirements import InvalidRequirement, Requirement from packaging.utils import canonicalize_name @@ -595,7 +595,12 @@ def _get_default_version(metadata: ProjectMetadata, micropkg_module_path: str) - ) return micropkg_module.__version__ # type: ignore except (AttributeError, ModuleNotFoundError): - logger.warning(f"Micropackage version not found in '{metadata.package_name}.{micropkg_module_path}', will take the top-level one in '{metadata.package_name}'") + logger.warning( + "Micropackage version not found in '%s.%s', will take the top-level one in '%s'", + metadata.package_name, + micropkg_module_path, + metadata.package_name, + ) # if micropkg version doesn't exist, take the project one project_module = import_module(f"{metadata.package_name}") return project_module.__version__ # type: ignore