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 Python 3.12 to tests #216

Merged
merged 14 commits into from
Dec 18, 2023
4 changes: 3 additions & 1 deletion .github/workflows/test-integration-vizro-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
hatch-env: all.py3.10
- python-version: "3.11"
hatch-env: all.py3.11
- python-version: "3.11"
- python-version: "3.12"
hatch-env: all.py3.12
- python-version: "3.12"
huong-li-nguyen marked this conversation as resolved.
Show resolved Hide resolved
hatch-env: lower-bounds
label: lower bounds

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-integration-vizro-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
hatch-env: all.py3.10
- python-version: "3.11"
hatch-env: all.py3.11
- python-version: "3.11"
- python-version: "3.12"
hatch-env: all.py3.12
- python-version: "3.12"
hatch-env: lower-bounds
label: lower bounds

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-unit-vizro-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
hatch-env: all.py3.10
- python-version: "3.11"
hatch-env: all.py3.11
- python-version: "3.11"
- python-version: "3.12"
hatch-env: all.py3.12
- python-version: "3.12"
hatch-env: lower-bounds
label: lower bounds

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-unit-vizro-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ jobs:
hatch-env: all.py3.10
- python-version: "3.11"
hatch-env: all.py3.11
- python-version: "3.11"
- python-version: "3.12"
hatch-env: all.py3.12
- python-version: "3.12"
hatch-env: lower-bounds
label: lower bounds

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div align="center" markdown="1">

[![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/vizro/)
[![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/vizro/)
[![PyPI version](https://badge.fury.io/py/vizro.svg)](https://badge.fury.io/py/vizro)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/mckinsey/vizro/blob/main/LICENSE.md)
[![Documentation](https://readthedocs.org/projects/vizro/badge/?version=stable)](https://vizro.readthedocs.io/)
Expand Down
4 changes: 3 additions & 1 deletion vizro-ai/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Vizro-AI README
# Vizro-AI

[![Python version](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/vizro/)

Vizro-AI is a tool for generating visualizations.

Expand Down
huong-li-nguyen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
2 changes: 1 addition & 1 deletion vizro-ai/hatch.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[envs.all]

[[envs.all.matrix]]
python = ["3.9", "3.10", "3.11"]
python = ["3.9", "3.10", "3.11", "3.12"]

[envs.changelog]
dependencies = ["scriv"]
Expand Down
9 changes: 7 additions & 2 deletions vizro-ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
dependencies = [
"pandas",
Expand Down Expand Up @@ -48,4 +49,8 @@ parallel = true
source_pkgs = ["vizro_ai"]

[tool.pytest.ini_options]
filterwarnings = "error"
filterwarnings = [
"error",
# Ignore this warning here as it comes from pandas until pandas is made compatible with Python 3.12
'ignore:.*utcfromtimestamp.*:DeprecationWarning'
huong-li-nguyen marked this conversation as resolved.
Show resolved Hide resolved
]
2 changes: 1 addition & 1 deletion vizro-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div align="center" markdown="1">

[![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/vizro/)
[![Python version](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/vizro/)
[![PyPI version](https://badge.fury.io/py/vizro.svg)](https://badge.fury.io/py/vizro)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/mckinsey/vizro/blob/main/LICENSE.md)
[![Documentation](https://readthedocs.org/projects/vizro/badge/?version=stable)](https://vizro.readthedocs.io/)
Expand Down
huong-li-nguyen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
13 changes: 8 additions & 5 deletions vizro-core/hatch.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
[envs.all]
features = ["kedro"]

[[envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[envs.all.overrides]
matrix.python.features = [
{value = "kedro", if = ["3.8", "3.9", "3.10"]}
]
[envs."all.py3.12".env-vars]
# Kedro converts warning "not yet fully compatible with this Python version" into an
# exception, so it can't be filtered out by pytest's filterwarnings. Instead we need
# to modify sys.warnoptions upfront so that Kedro does not convert the warning to an
# exception.
PYTHONWARNINGS = "ignore:Kedro is not yet fully compatible"

[envs.changelog]
dependencies = ["scriv"]
Expand Down
9 changes: 7 additions & 2 deletions vizro-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
dependencies = [
"dash>=2.14.1", # 2.14.1 needed for compatibility with werkzeug
Expand Down Expand Up @@ -71,6 +72,10 @@ addopts = [
# Allow test files to have the same name in different directories.
"--import-mode=importlib"
]
filterwarnings = "error"
filterwarnings = [
"error",
# Ignore this warning here as it comes from pandas until pandas is made compatible with Python 3.12
"ignore:.*utcfromtimestamp:DeprecationWarning"
]
norecursedirs = ["tests/tests_utils", "tests/js"]
pythonpath = ["tests/tests_utils"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

import pytest
import yaml
from kedro.io import DataCatalog

kedro = pytest.importorskip("kedro")

from kedro.io import DataCatalog # noqa: E402

from vizro.integrations.kedro import datasets_from_catalog # noqa: E402
from vizro.integrations.kedro import datasets_from_catalog


@pytest.fixture
Expand Down
Loading