Skip to content

Commit

Permalink
Support for Python 3.11 (#1502)
Browse files Browse the repository at this point in the history
* initial draft for python 3.11 support

* update release doc

* add python warnings for e2e tests

* modify e2e test

* modify e2e test

* test by removing lower req scenario

* skip e2e tests for lower bound requirement on python 3.11

* skip e2e tests for lower bound requirement on python 3.11

* remove print statements

---------

Co-authored-by: Nok Lam Chan <[email protected]>
Signed-off-by: ravi-kumar-pilla <[email protected]>
  • Loading branch information
ravi-kumar-pilla and noklam committed Aug 31, 2023
1 parent fb24aaf commit d935065
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
20 changes: 10 additions & 10 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,11 @@ workflows:
- e2e_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- win_e2e_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
filters:
branches:
only:
Expand All @@ -354,11 +354,11 @@ workflows:
- unit_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- win_unit_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
filters:
branches:
only:
Expand All @@ -367,7 +367,7 @@ workflows:
- lint:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- all_circleci_checks_succeeded:
requires:
- e2e_tests
Expand All @@ -393,21 +393,21 @@ workflows:
- e2e_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- win_e2e_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- unit_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- win_unit_tests:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- lint:
matrix:
parameters:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
- javascript_lint_and_tests
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ build:
cp -R build package/kedro_viz/html

PROJECT_PATH ?= demo-project
PYTHONWARNINGS ?= "ignore:Kedro is not yet fully compatible"

run:
PYTHONPATH="$(shell pwd)/package" python3 package/kedro_viz/server.py $(PROJECT_PATH)
PYTHONWARNINGS=$(PYTHONWARNINGS) PYTHONPATH="$(shell pwd)/package" python3 package/kedro_viz/server.py $(PROJECT_PATH)

pytest:
cd package && pytest --cov-fail-under=100
cd package && PYTHONWARNINGS=$(PYTHONWARNINGS) pytest --cov-fail-under=100

e2e-tests:
cd package && behave
cd package && PYTHONWARNINGS=$(PYTHONWARNINGS) behave

lint: format-fix lint-check

Expand Down
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Please follow the established format:

## Major features and improvements

- Add support for Python 3.11 (#1502)

## Bug fixes and other changes

- Fix to search for a '<lambda' Python function in the sidebar. (#1497)
Expand Down
5 changes: 5 additions & 0 deletions package/features/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def before_scenario(context, scenario):
print(f"{scenario} will be skipped on Windows with Python 3.7")
scenario.skip()

# skip lower-bound scenario for python versions greater than 3.10
if sys.version_info >= (3, 11) and "lower-bound" in scenario.name:
print(f"{scenario} will be skipped for Python version greater than 3.10")
scenario.skip()

for step in scenario.steps:
if "I have installed kedro version" in step.name:
match = re.search(r"\b\d+\.\d+\.\d+\b", step.name)
Expand Down
2 changes: 1 addition & 1 deletion package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
long_description_content_type="text/markdown",
license="Apache Software License (Apache 2.0)",
url="https://github.com/kedro-org/kedro-viz",
python_requires=">=3.7, <3.11",
python_requires=">=3.7, <3.12",
install_requires=requires,
keywords="pipelines, machine learning, data pipelines, data science, data engineering, visualisation",
author="Kedro",
Expand Down

0 comments on commit d935065

Please sign in to comment.