Skip to content

Commit

Permalink
python: add Python 3.13 testing in CI (#6108)
Browse files Browse the repository at this point in the history
In an effort to get testing available for Python 3.13, let's skip the
tests for ibis, since it cannot be downloaded for 3.13 anyway.


### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- addresses #5137 by adding in testing infrastructure for Python 3.13

#### Bug Fixes

- N/A


### QA Notes

<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->

should pass CI

---------

Signed-off-by: Isabel Zimmerman <[email protected]>
  • Loading branch information
isabelizimm authored Jan 24, 2025
1 parent 9404206 commit 4b958a9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/positron-python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
matrix:
os: [ubuntu-latest]
# Run the tests on the oldest and most recent versions of Python.
python: ['3.8', '3.12']
python: ['3.8', '3.13']

steps:
- name: Checkout
Expand Down Expand Up @@ -157,9 +157,8 @@ jobs:
python: '3.11'
- os: 'ubuntu-latest'
python: '3.12'
# add in 3.13 when ibis-framework[duckdb] supports it
# - os: 'ubuntu-latest'
# python: '3.13'
- os: 'ubuntu-latest'
python: '3.13'

steps:
- name: Checkout
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/positron-python-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ jobs:
python: '3.11'
- os: 'ubuntu-latest'
python: '3.12'
# add in 3.13 when ibis-framework[duckdb] supports it
# - os: 'ubuntu-latest'
# python: '3.13'
- os: 'ubuntu-latest'
python: '3.13'


steps:
Expand Down Expand Up @@ -98,9 +97,8 @@ jobs:
python: '3.11'
- os: 'ubuntu-latest'
python: '3.12'
# add in 3.13 when ibis-framework[duckdb] supports it
# - os: 'ubuntu-latest'
# python: '3.13'
- os: 'ubuntu-latest'
python: '3.13'


steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ geopandas==0.13.2; python_version < '3.9'
geopandas==1.0.1; python_version >= '3.9'
hvplot==0.10.0 ; python_version >= '3.9'
hvplot==0.8.0 ; python_version < '3.9'
ibis-framework[duckdb]==9.5.0; python_version >= '3.10'
# TODO: 3.13 maint. install ibis when available for 3.13
ibis-framework[duckdb]==9.5.0; python_version >= '3.10' and python_version < '3.13'
ipykernel==6.29.5
ipywidgets==8.1.5
lightning==2.3.2
Expand All @@ -14,16 +15,17 @@ matplotlib==3.7.4; python_version < '3.9'
numpy==2.1.1; python_version >= '3.10'
numpy==1.24.4; python_version < '3.9'
numpy==2.0.2; python_version == '3.9'
pandas==2.2.2; python_version >= '3.9'
pandas==2.2.3; python_version >= '3.9'
pandas==2.0.3; python_version < '3.9'
plotly==5.24.1
polars==1.7.1
polars[timezone]==1.7.1; python_version < '3.9' or sys_platform == 'win32'
pyarrow==17.0.0
pyarrow==17.0.0; python_version < '3.13'
pyarrow==19.0.0; python_version >= '3.13'
pytest==8.0.2
pytest-asyncio==0.23.8
pytest-mock==3.14.0
torch==2.4.1; python_version >= '3.10'
torch==2.5.1; python_version >= '3.10'
torch==2.1.2; python_version < '3.10'
SQLAlchemy==2.0.34
SQLAlchemy==2.0.37

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from typing import Any, Callable, Iterable, Optional, Tuple

import geopandas
import torch
import numpy as np
import pandas as pd
import polars as pl
Expand Down Expand Up @@ -42,11 +43,6 @@
)
from .utils import get_type_as_str

try:
import torch # type: ignore [reportMissingImports] for 3.12
except ImportError:
torch = None


def verify_inspector(
value: Any,
Expand Down Expand Up @@ -915,6 +911,8 @@ def test_get_child(value: Any, key: Any, expected: Any) -> None:
assert get_inspector(child).equals(expected)


# TODO: 3.13 maint. run this test once ibis is available in 3.13
@pytest.mark.xfail(sys.version_info >= (3, 13), reason="ibis not available in 3.13", strict=True)
@pytest.mark.skipif(sys.version_info < (3, 10), reason="requires Python 3.10 or higher")
def test_inspect_ibis_exprs() -> None:
import ibis
Expand Down Expand Up @@ -962,7 +960,7 @@ def test_inspect_ibis_exprs() -> None:
("value", "expected"),
[
(np.array([[1, 2, 3], [4, 5, 6]], dtype="int64"), 48),
(torch.Tensor([[1, 2, 3], [4, 5, 6]]) if torch else None, 24),
(torch.Tensor([[1, 2, 3], [4, 5, 6]]), 24),
(pd.Series([1, 2, 3, 4]), 32),
(pl.Series([1, 2, 3, 4]), 32),
(pd.DataFrame({"a": [1, 2], "b": ["3", "4"]}), 4),
Expand Down

0 comments on commit 4b958a9

Please sign in to comment.