Skip to content

Commit

Permalink
Merge branch 'main' into add-telemetry-flag-to-kedro-run
Browse files Browse the repository at this point in the history
  • Loading branch information
lrcouto authored May 21, 2024
2 parents 59900fe + 3ac8b52 commit 9d142dc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

## Breaking changes to the API

## Upcoming deprecations for Kedro 0.20.0
* All micro-packaging commands (`kedro micropkg pull`, `kedro micropkg package`) are deprecated and will be removed in Kedro 0.20.0.

## Documentation changes
* Improved documentation for custom starters
* Added a new section on deploying Kedro project on AWS Airflow MWAA
Expand Down
16 changes: 14 additions & 2 deletions docs/source/development/commands_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Here is a list of Kedro CLI commands, as a shortcut to the descriptions below. P
* [`kedro ipython`](#notebooks)
* [`kedro jupyter lab`](#notebooks)
* [`kedro jupyter notebook`](#notebooks)
* [`kedro micropkg package <pipeline_name>`](#package-a-micro-package)
* [`kedro micropkg pull <package_name>`](#pull-a-micro-package)
* [`kedro micropkg package <pipeline_name>`](#package-a-micro-package) (deprecated from version 0.20.0)
* [`kedro micropkg pull <package_name>`](#pull-a-micro-package) (deprecated from version 0.20.0)
* [`kedro package`](#deploy-the-project)
* [`kedro pipeline create <pipeline_name>`](#create-a-new-modular-pipeline-in-your-project)
* [`kedro pipeline delete <pipeline_name>`](#delete-a-modular-pipeline)
Expand Down Expand Up @@ -335,6 +335,10 @@ See [the Python documentation for further information about packaging](https://p
### Pull a micro-package
Since Kedro 0.17.7 you can pull a micro-package into your Kedro project as follows:

```{warning}
_This command is deprecated and will be removed from Kedro in version 0.20.0._
```

```bash
kedro micropkg pull <link-to-micro-package-sdist-file>
```
Expand Down Expand Up @@ -366,6 +370,10 @@ kedro pipeline create <pipeline_name>
##### Package a micro-package
The following command packages all the files related to a micro-package, e.g. a modular pipeline, into a [Python source distribution file](https://packaging.python.org/overview/#python-source-distributions):

```{warning}
_This command is deprecated and will be removed from Kedro in version 0.20.0._
```

```bash
kedro micropkg package <package_module_path>
```
Expand All @@ -375,6 +383,10 @@ Further information is available in the [micro-packaging documentation](../nodes
##### Pull a micro-package in your project
The following command pulls all the files related to a micro-package, e.g. a modular pipeline, from either [PyPI](https://pypi.org/) or a storage location of a [Python source distribution file](https://packaging.python.org/overview/#python-source-distributions).

```{warning}
_This command is deprecated and will be removed from Kedro in version 0.20.0._
```

```bash
kedro micropkg pull <package_name> (or path to a sdist file)
```
Expand Down
4 changes: 4 additions & 0 deletions docs/source/nodes_and_pipelines/micro_packaging.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Micro-packaging

```{warning}
_Micro-packaging is deprecated and will be removed from Kedro version 0.20.0._
```

Micro-packaging allows users to share Kedro micro-packages across codebases, organisations and beyond. A micro-package can be any part of Python code in a Kedro project including pipelines and utility functions.

## Package a micro-package
Expand Down
19 changes: 16 additions & 3 deletions kedro/framework/cli/micropkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def micropkg_cli() -> None: # pragma: no cover

@micropkg_cli.group()
def micropkg() -> None:
"""Commands for working with micro-packages."""
"""(DEPRECATED) Commands for working with micro-packages. DeprecationWarning: micro-packaging is deprecated
and will not be available from Kedro 0.20.0."""


@command_with_verbosity(micropkg, "pull")
Expand Down Expand Up @@ -167,7 +168,13 @@ def pull_package( # noqa: PLR0913
all_flag: str,
**kwargs: Any,
) -> None:
"""Pull and unpack a modular pipeline and other micro-packages in your project."""
"""(DEPRECATED) Pull and unpack a modular pipeline and other micro-packages in your project."""
deprecation_message = (
"DeprecationWarning: Command 'kedro micropkg pull' is deprecated and "
"will not be available from Kedro 0.20.0."
)
click.secho(deprecation_message, fg="red")

if not package_path and not all_flag:
click.secho(
"Please specify a package path or add '--all' to pull all micro-packages in the "
Expand Down Expand Up @@ -341,7 +348,13 @@ def package_micropkg( # noqa: PLR0913
all_flag: str,
**kwargs: Any,
) -> None:
"""Package up a modular pipeline or micro-package as a Python source distribution."""
"""(DEPRECATED) Package up a modular pipeline or micro-package as a Python source distribution."""
deprecation_message = (
"DeprecationWarning: Command 'kedro micropkg package' is deprecated and "
"will not be available from Kedro 0.20.0."
)
click.secho(deprecation_message, fg="red")

if not module_path and not all_flag:
click.secho(
"Please specify a micro-package name or add '--all' to package all micro-packages in "
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ test = [
"pytest-mock>=1.7.1, <4.0",
"pytest-xdist[psutil]~=2.2.1",
"pytest>=7.2,<9.0",
"s3fs>=2021.4, <2024.4", # Upper bound set arbitrarily, to be reassessed in early 2024
"s3fs>=2021.4, <2024.6", # Upper bound set arbitrarily, to be reassessed in early 2024
"trufflehog~=2.1",
# mypy related dependencies
"pandas-stubs",
Expand Down

0 comments on commit 9d142dc

Please sign in to comment.