Skip to content

Commit 28990e1

Browse files
sufikaurSufi Kaur
andauthored
Add testing 3.13 python to workflow (#1669)
* add testing 3.13 python to workflow * update documentation --------- Co-authored-by: Sufi Kaur <[email protected]>
1 parent d495c8d commit 28990e1

File tree

5 files changed

+14
-21
lines changed

5 files changed

+14
-21
lines changed

.github/workflows/core.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
strategy:
8989
fail-fast: false
9090
matrix:
91-
python-version: ['3.9', '3.10', '3.11', '3.12']
91+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
9292
os:
9393
- linux
9494
- win64
@@ -101,15 +101,17 @@ jobs:
101101
# only generate coverage report for a single python version in the matrix
102102
# to avoid overloading Codecov
103103
cov-report: true
104+
104105
steps:
105-
- uses: actions/checkout@v4
106+
- uses: actions/checkout@v5
106107
- uses: ./.github/actions/display-debug-info
107108
- name: Set up Conda environment
108109
uses: conda-incubator/setup-miniconda@v3
109110
with:
110111
activate-environment: ${{ env.IDAES_CONDA_ENV_NAME_DEV }}
111112
python-version: ${{ matrix.python-version }}
112113
miniforge-version: latest
114+
113115
- name: Set up idaes
114116
uses: ./.github/actions/setup-idaes
115117
with:
@@ -128,7 +130,7 @@ jobs:
128130
name: coverage-report-${{ matrix.os }}
129131
path: coverage.xml
130132
if-no-files-found: error
131-
133+
132134
upload-coverage:
133135
name: Upload coverage report (Codecov)
134136
needs: [pytest]

.github/workflows/integration.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,20 @@ jobs:
8787
run: |
8888
import json
8989
from os import environ as env
90-
9190
def _display_on_run_dashboard(msg):
9291
# workflow warnings are displayed on the workflow run dashboard,
9392
# so we use this as a way to display a short summary of why this workflow is being run
9493
# without having to dig in each job's log output
9594
print(f'::warning ::{msg}')
9695
def _set_output(name, val):
9796
print(f'::set-output name={name}::{val}')
98-
9997
event_name = env["GITHUB_EVENT_NAME"]
10098
event_action = env["_GITHUB_EVENT_ACTION"]
10199
is_pr = 'pull_request' in event_name.lower()
102100
# if the event is not a PR event, the "is_pr_approved" env var will be set to an empty string,
103101
# which cannot be parsed as valid json
104102
is_pr_approved = json.loads(env.get("is_pr_approved") or "null")
105-
106103
workflow_trigger = 'undetermined'
107-
108104
if is_pr:
109105
if event_action == 'labeled':
110106
workflow_trigger = 'user_dispatch'
@@ -114,11 +110,9 @@ jobs:
114110
workflow_trigger = 'unapproved_pr'
115111
else:
116112
workflow_trigger = 'not_pr'
117-
118113
msg = f'{workflow_trigger=} event/action={event_name}/{event_action or "N/A"} is_pr_approved={is_pr_approved or "N/A"}'
119114
_display_on_run_dashboard(msg)
120115
_set_output('workflow-trigger', workflow_trigger)
121-
122116
pytest:
123117
name: pytest (py${{ matrix.python-version }}/${{ matrix.os }}/integration)
124118
runs-on: ${{ matrix.runner-image }}
@@ -132,7 +126,7 @@ jobs:
132126
strategy:
133127
fail-fast: false
134128
matrix:
135-
python-version: ['3.9', '3.10', '3.11', '3.12']
129+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
136130
os:
137131
- linux
138132
- win64
@@ -170,7 +164,7 @@ jobs:
170164
strategy:
171165
fail-fast: false
172166
matrix:
173-
python-version: ['3.9', '3.10', '3.11', '3.12']
167+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
174168
os:
175169
- linux
176170
- win64
@@ -259,4 +253,4 @@ jobs:
259253
run: |
260254
pushd "$(mktemp -d)"
261255
pip install pytest
262-
pytest --pyargs idaes -W ignore -rs
256+
pytest --pyargs idaes -W ignore -rs

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ for Python 3. The following sub-versions are supported:
8686
* Python 3.10
8787
* Python 3.11
8888
* Python 3.12
89+
* Python 3.13
90+
8991

9092
> [!IMPORTANT]
9193
> Note that Python 3.8 is no longer officially supported.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
todo_include_todos = False
9191

9292
# Global constants for supported Python versions
93-
IDAES_PV_MIN, IDAES_PV_MAX, IDAES_PV_DEFAULT = "3.9", "3.12", "3.10"
93+
IDAES_PV_MIN, IDAES_PV_MAX, IDAES_PV_DEFAULT = "3.9", "3.13", "3.10"
9494

9595
# This block of text will be virtually present at the end of every file.
9696
# Used here to define substitutions for re-used URLs, e.g. just add "|examples-site|" to

setup.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ class ExtraDependencies:
3737
"""
3838

3939
ui = [
40-
# FIXME this must be changed to the PyPI distribution for the release
41-
# "idaes-ui",
42-
"idaes-ui @ git+https://github.com/IDAES/idaes-ui@main",
40+
"idaes-ui",
4341
]
4442
omlt = [
4543
"omlt==1.1", # fix the version for now as package evolves
@@ -52,11 +50,7 @@ class ExtraDependencies:
5250
coolprop = [
5351
"coolprop>=7.0", # idaes.generic_models.properties.general.coolprop
5452
]
55-
testing = [
56-
"pytest",
57-
"addheader",
58-
"pyyaml",
59-
]
53+
testing = ["pytest", "addheader", "pyyaml"]
6054

6155
def __init__(self):
6256
self._data = dict(type(self).__dict__)
@@ -156,6 +150,7 @@ def __getitem__(self, key):
156150
"Programming Language :: Python :: 3.10",
157151
"Programming Language :: Python :: 3.11",
158152
"Programming Language :: Python :: 3.12",
153+
"Programming Language :: Python :: 3.13",
159154
"Programming Language :: Python :: Implementation :: CPython",
160155
"Topic :: Scientific/Engineering :: Mathematics",
161156
"Topic :: Scientific/Engineering :: Chemistry",

0 commit comments

Comments
 (0)