Skip to content

Commit

Permalink
Release kedro-docker 0.3.0 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
merelcht authored Apr 1, 2022
1 parent 99bb612 commit d9feed2
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions kedro-docker/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 5 additions & 1 deletion kedro-docker/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions kedro-docker/features/docker.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down
16 changes: 16 additions & 0 deletions kedro-docker/features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
2 changes: 1 addition & 1 deletion kedro-docker/kedro_docker/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" Kedro plugin for packaging a project with Docker """

__version__ = "0.2.2"
__version__ = "0.3.0"
6 changes: 4 additions & 2 deletions kedro-docker/kedro_docker/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion kedro-docker/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions kedro-docker/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion kedro-telemetry/README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit d9feed2

Please sign in to comment.