Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.8 #173

Merged
merged 12 commits into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ jobs:
environment:
CONDA_ENV_PY_VERSION: "3.7"

build_38:
<<: *DEFAULT
environment:
CONDA_ENV_PY_VERSION: "3.8"

deploy_demo:
<<: *DEFAULT
steps:
Expand All @@ -167,10 +172,12 @@ workflows:
jobs:
- build_36
- build_37
- build_38
- deploy_demo:
requires:
- build_36
- build_37
- build_38
filters:
branches:
only: master
Expand All @@ -186,3 +193,4 @@ workflows:
jobs:
- build_36
- build_37
- build_38
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![npm version](https://img.shields.io/npm/v/@quantumblack/kedro-viz.svg?color=cc3534)](https://badge.fury.io/js/%40quantumblack%2Fkedro-viz)
[![PyPI version](https://img.shields.io/pypi/v/kedro-viz.svg?color=yellow)](https://pypi.org/project/kedro-viz/)
[![License](https://img.shields.io/badge/license-Apache%202.0-3da639.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python Version](https://img.shields.io/badge/python-3.6%20%7C%203.7-blue.svg)](https://pypi.org/project/kedro-viz/)
[![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-viz/)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

Kedro-Viz shows you how your [Kedro](https://github.com/quantumblacklabs/kedro) data pipelines are structured.
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Please follow the established format:
## Major features and improvements

<!-- Add release notes for the upcoming release here -->

- Add support for Python 3.8 (#173)
## Bug fixes and other changes

<!-- Add release notes for the upcoming release here -->
Expand Down
12 changes: 10 additions & 2 deletions package/features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,25 @@
import os
import shutil
import stat
import sys
import tempfile
from pathlib import Path

from features.steps.sh_run import run
from features.steps.util import create_new_venv


def before_scenario(context, feature): # pylint: disable=unused-argument
def _should_exclude_scenario(scenario):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

pre_16_scenario = any(key in scenario.name for key in ["0.14", "0.15"])
return sys.version_info >= (3, 8) and pre_16_scenario


def before_scenario(context, scenario): # pylint: disable=unused-argument
"""Environment preparation before other cli tests are run.
Installs kedro by running pip in the top level directory.
"""
if _should_exclude_scenario(scenario):
scenario.skip()

def call(cmd, verbose=False):
res = run(cmd, env=context.env)
Expand Down Expand Up @@ -96,7 +104,7 @@ def call(cmd, verbose=False):
context.temp_dir = Path(tempfile.mkdtemp())


def after_scenario(context, feature):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feature arg was never used, so I removed it.

def after_scenario(context, scenario):
# pylint: disable=unused-argument
rmtree(str(context.temp_dir))
if "E2E_VENV" not in os.environ:
Expand Down
7 changes: 7 additions & 0 deletions package/features/viz.feature
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ Feature: Viz plugin in new project
When I execute the kedro viz command "viz"
Then kedro-viz should start successfully

Scenario: Execute viz with Kedro 0.16.1
Given I have installed kedro version "0.16.1"
And I have run a non-interactive kedro new
And I have executed the kedro command "install"
When I execute the kedro viz command "viz"
Then kedro-viz should start successfully

Scenario: Execute viz with latest Kedro
Given I have installed kedro version "latest"
And I have run a non-interactive kedro new
Expand Down
2 changes: 1 addition & 1 deletion package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
long_description_content_type="text/markdown",
license="Apache Software License (Apache 2.0)",
url="https://github.com/quantumblacklabs/kedro-viz",
python_requires=">=3.6, <3.8",
python_requires=">=3.6, <3.9",
install_requires=requires,
tests_require=test_requires,
keywords="pipelines, machine learning, data pipelines, data science, data engineering, visualisation",
Expand Down