Skip to content

Commit

Permalink
feat: remove Python 3.8 support and add Python 3.12 (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue authored Jan 4, 2024
1 parent 9ce566b commit e994751
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 28 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,11 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: ansys/actions/build-wheelhouse@v5
with:
library-name: ${{ env.PACKAGE_NAME }}
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -238,4 +237,3 @@ jobs:
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
12 changes: 6 additions & 6 deletions doc/source/getting-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Both these modules are gRPC enabled and hence need to be run using server-client

Install the client
------------------
The ``ansys.dyna.core`` package supports Python 3.8 through
Python 3.11 on Windows, Linux, and MacOS.
The ``ansys.dyna.core`` package supports Python 3.9 through
Python 3.12 on Windows, Linux, and MacOS.

You should consider installing PyDYNA in a virtual environment.
For more information, see Python's
Expand Down Expand Up @@ -66,18 +66,18 @@ PyDYNA by downloading the wheelhouse archive for your corresponding machine
architecture from the `Releases Page <https://github.com/pyansys/pydyna/releases>`_.

Each wheelhouse archive contains all the Python wheels necessary to install
PyDYNA from scratch on Windows and Linux for Python 3.8 through 3.11. You can install
PyDYNA from scratch on Windows and Linux for Python 3.9 through 3.12. You can install
PyDYNA on an isolated system with a fresh Python installation or on a virtual environment.

For example, on Linux with Python 3.8, unzip the wheelhouse archive and install PyDYNA
For example, on Linux with Python 3.9, unzip the wheelhouse archive and install PyDYNA
with these commands:

.. code:: bash
unzip ansys-dyna-core-v0.3.dev0-wheelhouse-Linux-3.8.zip -d wheelhouse
unzip ansys-dyna-core-v0.3.dev0-wheelhouse-Linux-3.9.zip -d wheelhouse
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
If you're on Windows with Python 3.8, unzip the wheelhouse archive to a ``wheelhouse``
If you're on Windows with Python 3.9, unzip the wheelhouse archive to a ``wheelhouse``
directory and install PyDYNA using the preceding command.

Run PyDYNA Server locally
Expand Down
2 changes: 1 addition & 1 deletion docker/pre/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pydyna-pre service Linux-based Dockerfile

FROM python:3.8-slim-buster
FROM python:3.9-slim-buster

# Define the working directory
WORKDIR /server
Expand Down
19 changes: 7 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name = "ansys-dyna-core"
version = "0.4.dev0"
description = "Python interface to LS-DYNA Service"
readme = "README.rst"
requires-python = ">=3.8,<4"
license = {file = "LICENSE"}
authors = [{name = "ANSYS, Inc.", email = "[email protected]"}]
maintainers = [{name = "ANSYS, Inc.", email = "[email protected]"}]
requires-python = ">=3.9,<4"
license = { file = "LICENSE" }
authors = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
maintainers = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
keywords = ["Ansys", "LS-DYNA", "gRPC"]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -19,16 +19,13 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

dependencies = [
"ansys-dpf-core>=0.7.2",
"ansys-api-dyna==0.3.5",
]
dependencies = ["ansys-dpf-core>=0.7.2", "ansys-api-dyna==0.3.5"]

[project.optional-dependencies]
tests = [
Expand Down Expand Up @@ -99,6 +96,4 @@ show_missing = true
[tool.pytest.ini_options]
minversion = "7.1"
addopts = "-ra --cov=ansys.dyna.core --cov-report html:.cov/html --cov-report xml:.cov/xml --cov-report term -vv"
testpaths = [
"tests",
]
testpaths = ["tests"]
6 changes: 1 addition & 5 deletions src/ansys/dyna/core/pre/dynalogging.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,7 @@ def __init__(
validate=True,
defaults=None,
):
if sys.version_info[1] < 8:
super().__init__(fmt, datefmt, style)
else:
# 3.8: The validate parameter was added
super().__init__(fmt, datefmt, style, validate)
super().__init__(fmt, datefmt, style, validate)
self._style = PymapdlPercentStyle(fmt, defaults=defaults) # overwriting


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ isolated_build_env = build
[testenv]
description = Checks for project testing with desired extras
basepython =
tests38: python3.8
tests39: python3.9
test310: python3.10
test311: python3.11
test312: python3.12
{style,tests,doc}: python3
passenv = *
setenv =
Expand Down

0 comments on commit e994751

Please sign in to comment.