From 327c36d8c19a44b0bed353686b71520657b559b3 Mon Sep 17 00:00:00 2001 From: Antony Milne <49395058+AntonyMilneQB@users.noreply.github.com> Date: Mon, 1 Nov 2021 10:53:35 +0000 Subject: [PATCH] Remove git-dependency (#1284) Signed-off-by: Laurens Vijnck --- RELEASE.md | 1 + kedro/framework/cli/starters.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 3e71110b71..0a8f921358 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -22,6 +22,7 @@ * Fixed slow startup because of catalog processing by reducing the exponential growth of extra processing during `_FrozenDatasets` creations. * Removed `.coveragerc` from the Kedro project template. `coverage` settings are now given in `pyproject.toml`. * Fixed a bug where packaging or pulling a modular pipeline with the same name as the project's package name would throw an error (or silently pass without including the pipeline source code in the wheel file). +* Removed unintentional dependency on `git`. ## Minor breaking changes to the API diff --git a/kedro/framework/cli/starters.py b/kedro/framework/cli/starters.py index ed7a0c469d..234a7a823a 100644 --- a/kedro/framework/cli/starters.py +++ b/kedro/framework/cli/starters.py @@ -42,7 +42,6 @@ from typing import Any, Callable, Dict, List, Optional, Tuple import click -import git import yaml import kedro @@ -410,6 +409,10 @@ def validate(self, user_input: str) -> None: def _get_available_tags(template_path: str) -> List: + # Not at top level so that kedro CLI works without a working git executable. + # pylint: disable=import-outside-toplevel + import git + try: tags = git.cmd.Git().ls_remote("--tags", template_path.replace("git+", ""))