Skip to content

Commit

Permalink
python/ci: adjust CI testing for python 3.8 (#5782)
Browse files Browse the repository at this point in the history
addresses #5136
~addresses #5137~ NOTE: due to `ibis-framework[duckdb]` not being
available for 3.13, we will not be able to test at this time

- Slightly adjust cadence of Python 3.8 from every commit in a PR to
nightly for ipykernel Positron tests (keep as-is for upstream tests,
which only run on earliest and latest versions)
- Add in testing for Python 3.13 

This closely follows the strategy of upstream, which [tests on
3.8-3.13](https://github.com/microsoft/vscode-python/blob/d50b7cca88f7f81cef22516ef557b9aae5e9219e/.github/workflows/pr-check.yml#L150).

### 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
  • Loading branch information
isabelizimm authored Dec 20, 2024
1 parent fc1fdd3 commit b99414b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/positron-python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ jobs:
strategy:
matrix:
include:
- os: 'ubuntu-latest'
python: '3.8'
- os: 'macos-latest'
python: '3.9'
- os: 'windows-latest'
Expand All @@ -159,6 +157,9 @@ 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'

steps:
- name: Checkout
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/positron-python-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ 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'


steps:
- name: Checkout
Expand Down Expand Up @@ -94,6 +98,10 @@ 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'


steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ def get_display_value(
"edgeitems": ARRAY_EDGEITEMS,
"linewidth": print_width,
}
options_obj = torch._tensor_str.PRINT_OPTS
options_obj = torch._tensor_str.PRINT_OPTS # type: ignore[reportGeneralTypeIssues]
original_options = {k: getattr(options_obj, k) for k in new_options}

torch.set_printoptions(**new_options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ def test_set_console_width(ui_comm: DummyComm) -> None:
assert np.get_printoptions()["linewidth"] == width
assert pd.get_option("display.width") is None
assert pl.Config.state()["POLARS_TABLE_WIDTH"] == str(width)
if torch is not None: # temporary workaround for Python 3.12
assert torch._tensor_str.PRINT_OPTS.linewidth == width
assert torch._tensor_str.PRINT_OPTS.linewidth == width # type: ignore[reportGeneralTypeIssues]


def test_open_editor(ui_service: UiService, ui_comm: DummyComm) -> None:
Expand Down

0 comments on commit b99414b

Please sign in to comment.