diff --git a/RELEASE.md b/RELEASE.md index 9c95e7f0be..2dad086227 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -14,9 +14,10 @@ ## Bug fixes and other changes -* Fixed `format` in `save_args` for `SparkHiveDataSet`, previously it didn't allow you to save it as delta format. +## Upcoming deprecations for Kedro 0.19.0 -## Breaking changes to the API +* `kedro test` and `kedro lint` will be deprecated. +* Fixed `format` in `save_args` for `SparkHiveDataSet`, previously it didn't allow you to save it as delta format. # Release 0.18.3 diff --git a/kedro/framework/cli/project.py b/kedro/framework/cli/project.py index 0f61394049..bcea4c4320 100644 --- a/kedro/framework/cli/project.py +++ b/kedro/framework/cli/project.py @@ -71,7 +71,14 @@ def project_group(): # pragma: no cover @forward_command(project_group, forward_help=True) @click.pass_obj # this will pass the metadata as first argument def test(metadata: ProjectMetadata, args, **kwargs): # pylint: disable=unused-argument - """Run the test suite.""" + """Run the test suite. (DEPRECATED)""" + deprecation_message = ( + "DeprecationWarning: Command 'kedro test' is deprecated and " + "will not be available from Kedro 0.19.0. " + "Use the command 'pytest' instead. " + ) + click.secho(deprecation_message, fg="red") + try: _check_module_importable("pytest") except KedroCliError as exc: @@ -90,7 +97,13 @@ def test(metadata: ProjectMetadata, args, **kwargs): # pylint: disable=unused-a def lint( metadata: ProjectMetadata, files, check_only, **kwargs ): # pylint: disable=unused-argument - """Run flake8, isort and black.""" + """Run flake8, isort and black. (DEPRECATED)""" + deprecation_message = ( + "DeprecationWarning: Command 'kedro lint' is deprecated and " + "will not be available from Kedro 0.19.0." + ) + click.secho(deprecation_message, fg="red") + source_path = metadata.source_dir package_name = metadata.package_name files = files or (str(source_path / "tests"), str(source_path / package_name)) @@ -171,13 +184,15 @@ def package(metadata: ProjectMetadata): @click.pass_obj # this will pass the metadata as first argument def build_docs(metadata: ProjectMetadata, open_docs): """Build the project documentation. (DEPRECATED)""" - source_path = metadata.source_dir - package_name = metadata.package_name deprecation_message = ( "DeprecationWarning: Command 'kedro build-docs' is deprecated and " "will not be available from Kedro 0.19.0." ) click.secho(deprecation_message, fg="red") + + source_path = metadata.source_dir + package_name = metadata.package_name + python_call("pip", ["install", str(source_path / "[docs]")]) python_call("pip", ["install", "-r", str(source_path / "requirements.txt")]) python_call("ipykernel", ["install", "--user", f"--name={package_name}"]) @@ -262,12 +277,13 @@ def activate_nbstripout( metadata: ProjectMetadata, **kwargs ): # pylint: disable=unused-argument """Install the nbstripout git hook to automatically clean notebooks. (DEPRECATED)""" - source_path = metadata.source_dir deprecation_message = ( "DeprecationWarning: Command 'kedro activate-nbstripout' is deprecated and " "will not be available from Kedro 0.19.0." ) click.secho(deprecation_message, fg="red") + + source_path = metadata.source_dir click.secho( ( "Notebook output cells will be automatically cleared before committing"