Skip to content

Update ci_cd.yml to run on Python 3.12 #548

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
MAIN_PYTHON_VERSION: '3.10'
MAIN_PYTHON_VERSION: '3.12'
LIBRARY_NAME: ansys-motorcad-core
LIBRARY_NAMESPACE: 'ansys.motorcad.core'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v8
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:

- name: Test with tox
# Only the tox environment specified in the tox.ini gh-actions is run
run: tox -e py310-coverage
run: tox -e py312-coverage

- uses: codecov/codecov-action@v4
name: 'Upload coverage to Codecov'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/nightly-motorcad-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
strategy:
matrix:
os: [windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

fail-fast: false

steps:
Expand All @@ -38,4 +39,4 @@ jobs:
python -m pip install --upgrade pip tox tox-gh-actions

- name: Test with tox
run: tox -e py310-coverage
run: tox
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8

Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Installation

Python module
--------------
The ``ansys.motorcad.core`` package currently supports Python 3.7 through Python 3.10 on Windows.
The ``ansys.motorcad.core`` package currently supports Python 3.7 through Python 3.12 on Windows.

Install the latest release from
`PyPi <https://pypi.org/project/ansys-motorcad-core/>`_ with:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgsdavies, should Python 3.7 come off this list, I don't think we're building wheels for it already?

"Programming Language :: Python :: 3.12",
]
dependencies = [
"psutil >= 5.9.0",
Expand Down
8 changes: 5 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
[tox]
description = Default tox environments list
envlist =
style,{py37,py38,py39,py310}{,-coverage},doc
style,{py38,py39,py310,py311,py312}{,-coverage},doc
skip_missing_interpreters = true
isolated_build = true
isolated_build_env = build

[gh-actions]
description = The tox environment to be executed in gh-actions for a given python version
python =
3.7: style,py37-coverage,doc
3.8: style,py38-coverage,doc
3.9: style,py39-coverage,doc
3.10: style,py310-coverage,doc
3.11: style,py311-coverage,doc
3.12: style,py312-coverage,doc

[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
py: python3
{style,reformat,doc,build}: python3
setenv =
Expand Down
Loading