diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 6484d3b63..d04d14e37 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -217,17 +217,17 @@ workflows: plugin: "kedro-docker" matrix: parameters: - python_version: ["3.6", "3.7", "3.8"] + python_version: ["3.7", "3.8", "3.9", "3.10"] - e2e_tests: plugin: "kedro-docker" matrix: parameters: - python_version: ["3.6", "3.7", "3.8"] + python_version: ["3.7", "3.8", "3.9", "3.10"] - win_unit_tests: plugin: "kedro-docker" matrix: parameters: - python_version: ["3.6", "3.7", "3.8"] + python_version: ["3.7", "3.8", "3.9", "3.10"] - lint: plugin: "kedro-docker" # when pipeline parameter, run-build-kedro-airflow is true, the diff --git a/kedro-docker/README.md b/kedro-docker/README.md index 6afb12496..d6d13e748 100644 --- a/kedro-docker/README.md +++ b/kedro-docker/README.md @@ -1,8 +1,8 @@ # Kedro-Docker -[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -[![Python Version](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue.svg)](https://pypi.org/project/kedro-docker/) +[![Python Version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue.svg)](https://pypi.org/project/kedro-docker/) [![PyPI version](https://badge.fury.io/py/kedro-docker.svg)](https://pypi.org/project/kedro-docker/) +[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black) Docker is a tool that makes it easier to create, deploy and run applications. It uses containers to package an application along with its dependencies and then runs the application in an isolated virtualised environment. diff --git a/kedro-docker/RELEASE.md b/kedro-docker/RELEASE.md index 41ef464f4..7c88b34e2 100644 --- a/kedro-docker/RELEASE.md +++ b/kedro-docker/RELEASE.md @@ -6,7 +6,11 @@ ## Breaking changes to the API -## Thanks for supporting contributions +# Release 0.3.0 +## Major features and improvements +* Add compatibility with `kedro` 0.18.0 +* Add compatibility with Python 3.9 and 3.10 +* Remove compatibility with Python 3.6 # Release 0.2.2 diff --git a/kedro-docker/features/docker.feature b/kedro-docker/features/docker.feature index 44acb3f7b..5ea3b329b 100644 --- a/kedro-docker/features/docker.feature +++ b/kedro-docker/features/docker.feature @@ -5,7 +5,7 @@ Feature: Docker commands in new projects Given I have prepared a config file And I run a non-interactive kedro new with starter And I have fixed logs write permission - And I have executed the kedro command "install" + And I have installed the project dependencies And I have removed old docker image of test project Scenario: Execute docker init @@ -58,7 +58,7 @@ Feature: Docker commands in new projects Scenario: Execute docker run in parallel mode Given I have executed the kedro command "docker build" - When I execute the kedro command "docker run --parallel" + When I execute the kedro command "docker run --runner=ParallelRunner" Then I should get a successful exit code And I should get a message including "kedro.runner.parallel_runner - INFO - Pipeline execution completed successfully" @@ -118,7 +118,7 @@ Feature: Docker commands in new projects When I execute the kedro command "docker ipython" Then I should see messages from docker ipython startup including "An enhanced Interactive Python" And I should see messages from docker ipython startup including "INFO - ** Kedro project project-dummy" - And I should see messages from docker ipython startup including "Starting a Kedro session with the following variables in scope" + And I should see messages from docker ipython startup including "Defined global variable `context`, `session`, `catalog` and `pipelines`" Scenario: Execute docker run target without building image When I execute the kedro command "docker run" diff --git a/kedro-docker/features/steps/cli_steps.py b/kedro-docker/features/steps/cli_steps.py index 752062310..6660d5b94 100644 --- a/kedro-docker/features/steps/cli_steps.py +++ b/kedro-docker/features/steps/cli_steps.py @@ -177,6 +177,22 @@ def exec_kedro_command(context, command): assert False +@given("I have installed the project dependencies") +def pip_install_dependencies(context): + """Install project dependencies using pip.""" + reqs_path = Path("src", "requirements.txt") + res = run( + [context.pip, "install", "-r", str(reqs_path)], + env=context.env, + cwd=str(context.root_project_dir), + ) + + if res.returncode != OK_EXIT_CODE: + print(res.stdout) + print(res.stderr) + assert False + + @given("I have removed old docker image of test project") def remove_old_docker_images(context): """Remove old docker images of project""" diff --git a/kedro-docker/kedro_docker/__init__.py b/kedro-docker/kedro_docker/__init__.py index a579bbb23..6483ef836 100644 --- a/kedro-docker/kedro_docker/__init__.py +++ b/kedro-docker/kedro_docker/__init__.py @@ -1,3 +1,3 @@ """ Kedro plugin for packaging a project with Docker """ -__version__ = "0.2.2" +__version__ = "0.3.0" diff --git a/kedro-docker/kedro_docker/plugin.py b/kedro-docker/kedro_docker/plugin.py index d42937952..3fb4906a1 100644 --- a/kedro-docker/kedro_docker/plugin.py +++ b/kedro-docker/kedro_docker/plugin.py @@ -164,14 +164,16 @@ def docker_init(spark): type=str, default=DEFAULT_BASE_IMAGE, show_default=True, - help="Base image for Dockerfile.", # pylint: disable=too-many-arguments + help="Base image for Dockerfile.", ) @_make_image_option() @_make_docker_args_option( help="Optional arguments to be passed to `docker build` command" ) @click.pass_context -def docker_build(ctx, uid, gid, spark, base_image, image, docker_args): +def docker_build( + ctx, uid, gid, spark, base_image, image, docker_args +): # pylint: disable=too-many-arguments """Build a Docker image for the project.""" uid, gid = get_uid_gid(uid, gid) project_path = Path.cwd() diff --git a/kedro-docker/setup.py b/kedro-docker/setup.py index b03bc9f1b..bf150ba9a 100644 --- a/kedro-docker/setup.py +++ b/kedro-docker/setup.py @@ -35,7 +35,7 @@ long_description_content_type="text/markdown", url="https://github.com/kedro-org/kedro-plugins/tree/main/kedro-docker", license="Apache Software License (Apache 2.0)", - python_requires=">=3.6, <3.9", + python_requires=">=3.7, <3.11", install_requires=requires, tests_require=test_requires, author="Kedro", diff --git a/kedro-docker/test_requirements.txt b/kedro-docker/test_requirements.txt index cd222a8a9..165b1d131 100644 --- a/kedro-docker/test_requirements.txt +++ b/kedro-docker/test_requirements.txt @@ -1,15 +1,15 @@ -r requirements.txt bandit>=1.6.2, <2.0 behave>=1.2.6, <2.0 -black==v19.10.b0 +black~=22.0 docker flake8>=3.5, <4.0 pre-commit>=1.17.0, <2.0 -psutil==5.6.6 +psutil pylint>=2.4.4, <3.0 -pytest-cov>=2.7.1, <3.0 -pytest-mock>=1.10.4, <2.0 -pytest>=4.4.2, <5.0 +pytest +pytest-cov +pytest-mock PyYAML>=5.1, <6.0 trufflehog>=2.0.99, <3.0 wheel==0.32.2 diff --git a/kedro-telemetry/README.md b/kedro-telemetry/README.md index 200915e18..8a2c991b2 100644 --- a/kedro-telemetry/README.md +++ b/kedro-telemetry/README.md @@ -1,6 +1,6 @@ # Kedro-Telemetry -[![Python Version](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue.svg)](https://pypi.org/project/kedro-telemetry/) +[![Python Version](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue.svg)](https://pypi.org/project/kedro-telemetry/) [![PyPI version](https://badge.fury.io/py/kedro-telemetry.svg)](https://pypi.org/project/kedro-telemetry/) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black)