Skip to content

Commit

Permalink
MAINT: Update python version compatibility (#299)
Browse files Browse the repository at this point in the history
* MAINT: Remove python 3.7 compatibility

* MAINT: Update dependencies with ranges

Note: Drop dependencies compatibility with python 3.7

* CI: Update workflow to not check python3.7

* CHORE: Remove Python3.7 references

* CHORE: Update sphinx extensions

* CI: Update setup-python version

* MAINT: Temporarily keep recommonmark

* MISC: Add forgotten extension

* MAINT: Add forgotten extension

* Revert "MAINT: Add forgotten extension"

This reverts commit e1a0945.

* MISC: Remove jinja in conf.py
  • Loading branch information
SMoraisAnsys authored Apr 5, 2024
1 parent e65a0f4 commit 500756e
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 69 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
steps:
Expand All @@ -99,6 +99,7 @@ jobs:
- name: "Install Git and clone project"
uses: actions/checkout@v4

# Revert to previous verison due too setup-python#819
- name: "Set up Python"
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -163,6 +164,7 @@ jobs:
- name: Install Git and checkout project
uses: actions/checkout@v4

# Revert to previous verison due too setup-python#819
- name: Setup Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -237,6 +239,7 @@ jobs:
steps:
- uses: actions/checkout@v4

# Revert to previous verison due too setup-python#819
- name: "Set up Python"
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# PyEDB

[![PyAnsys](https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC)](https://docs.pyansys.com/)
[![PythonVersion](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![PythonVersion](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## What is PyEDB?
Expand Down
14 changes: 7 additions & 7 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ def setup(app):
"sphinx.ext.coverage",
"sphinx_copybutton",
"sphinx_design",
"sphinx_jinja",
"recommonmark",
"sphinx.ext.graphviz",
"sphinx.ext.mathjax",
"sphinx.ext.inheritance_diagram",
"numpydoc",
"ansys_sphinx_theme.extension.linkcode",
# TODO: Remove once we switch for new example format.
"recommonmark",
]

# Intersphinx mapping
Expand Down Expand Up @@ -267,11 +267,11 @@ def setup(app):
"thumbnail_size": (350, 350),
}

jinja_contexts = {
"main_toctree": {
"run_examples": config["run_examples"],
},
}
# jinja_contexts = {
# "main_toctree": {
# "run_examples": config["run_examples"],
# },
# }
# def prepare_jinja_env(jinja_env) -> None:
# """
# Customize the jinja env.
Expand Down
8 changes: 4 additions & 4 deletions doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ as an argument.
Install on CPython from PyPI
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can install PyEDB on CPython 3.7 through 3.10 from PyPI, the Python Package Index,
You can install PyEDB on CPython 3.8 through 3.11 from PyPI, the Python Package Index,
with this command:

.. code:: shell
Expand All @@ -47,7 +47,7 @@ with this command:
Linux support
~~~~~~~~~~~~~

PyEDB works with CPython 3.7 through 3.10 on Linux in AEDT 2022 R2 and later.
PyEDB works with CPython 3.8 through 3.10 on Linux in AEDT 2022 R2 and later.
However, you must set up the following environment variables:

.. code::
Expand Down Expand Up @@ -75,12 +75,12 @@ from your Python terminal, providing the full path to the ZIP file as an argumen
pip install --no-cache-dir --no-index --find-links=/path/to/pyansys-edb/wheelhouse pyansys-edb
For example, on Windows with Python 3.7, install PyEDB and all its dependencies from a
For example, on Windows with Python 3.8, install PyEDB and all its dependencies from a
wheelhouse with code like this:

.. code::
pip install --no-cache-dir --no-index --find-links=file:///<path_to_wheelhouse>/PyEDB-v<release_version>-wheelhouse-Windows-3.7 pyedb
pip install --no-cache-dir --no-index --find-links=file:///<path_to_wheelhouse>/PyEDB-v<release_version>-wheelhouse-Windows-3.8 pyedb
Update PyEDB to the latest version
Expand Down
7 changes: 3 additions & 4 deletions doc/source/getting_started/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ use the Python interpreter available in the AEDT installation.

.. note::

Python 3.7 is available in AEDT 2023 R1 and earlier. Python 3.10 is available in AEDT 2023 R2
and later.
Python 3.10 is available in AEDT 2023 R2 and later.

Here is the path to the Python 3.7 interpreter for the 2023 R1 installation:
Here is the path to the Python 3.10 interpreter for the 2023 R1 installation:

.. code:: python
"path\to\AnsysEM\v231\commonfiles\CPython\3_7\winx64\Release\python"
"path\to\AnsysEM\v231\commonfiles\CPython\3_10\winx64\Release\python"
Error installing PyEDB using ``pip``
Expand Down
79 changes: 28 additions & 51 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name = "pyedb"
dynamic = ["version"]
description = "Higher-Level Pythonic Ansys Electronics Data Base"
readme = "README.md"
requires-python = ">=3.7,<4"
requires-python = ">=3.8,<4"
license = {file = "LICENSE"}
authors = [{name = "ANSYS, Inc.", email = "[email protected]"}]
maintainers = [{name = "PyEDB developers", email = "[email protected]"}]
Expand All @@ -18,16 +18,14 @@ classifiers = [
"Topic :: Scientific/Engineering :: Information Analysis",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

dependencies = [
"cffi == 1.15.1;platform_system=='Linux' and python_version == '3.7'",
"cffi == 1.16.0;platform_system=='Linux' and python_version > '3.7'",
"cffi>=1.16.0,<1.17; platform_system=='Linux'",
"pywin32 >= 303;platform_system=='Windows'",
"ansys-pythonnet >= 3.1.0rc3",
"dotnetcore2 ==3.1.23;platform_system=='Linux'",
Expand All @@ -36,57 +34,36 @@ dependencies = [

[project.optional-dependencies]
tests = [
"matplotlib==3.5.3; python_version == '3.7'",
"matplotlib==3.7.3; python_version == '3.8'",
"matplotlib==3.8.2; python_version > '3.8'",
"numpy==1.21.6; python_version <= '3.9'",
"numpy==1.26.0; python_version > '3.9'",
"mock",
"pandas==1.3.5; python_version == '3.7'",
"pandas==2.0.3; python_version == '3.8'",
"pandas==2.1.1; python_version > '3.9'",
"pytest==7.4.3",
"pytest-cov==4.1.0",
"pytest-xdist==3.3.1",
"matplotlib>=3.5.0,<3.9",
"numpy>=1.20.0,<2",
"mock>=5.1.0,<5.2",
"pandas>=1.1.0,<2.3",
"pytest>=7.4.0,<8.2",
"pytest-cov>=4.0.0,<4.2",
"pytest-xdist>=3.5.0,<3.6",
]
doc = [
"ansys-sphinx-theme==0.13.1",
"imageio==2.34.0",
"imageio-ffmpeg==0.4.9",
"ipython==8.13.0; python_version < '3.9'",
"ipython==8.22.2; python_version >= '3.9'",
"ipywidgets==8.1.1",
"jupyterlab==4.1.3",
"matplotlib==3.5.3; python_version == '3.7'",
"matplotlib==3.7.3; python_version == '3.8'",
"matplotlib==3.8.2; python_version > '3.8'",
"nbsphinx==0.9.3",
"numpydoc==1.5.0; python_version == '3.7'",
"numpydoc==1.6.0; python_version > '3.7'",
"pypandoc==1.13",
"pytest-sphinx==0.5.0",
"recommonmark==0.7.1",
"Sphinx==7.1.2; python_version <= '3.9'",
"Sphinx==7.2.6; python_version >= '3.9'",
"sphinx-autobuild==2021.3.14",
"sphinx-autodoc-typehints==1.24.0",
"sphinx-copybutton==0.5.2",
"sphinx-gallery==0.14.0",
"sphinx-notfound-page==1.0.0",
"sphinxcontrib-websupport==1.2.4; python_version <= '3.9'",
"sphinxcontrib-websupport==1.2.5; python_version <= '3.7'",
"sphinx_design",
"sphinx_jinja",
"ansys-sphinx-theme>=0.10.0,<0.15",
"imageio>=2.30.0,<2.35",
"ipython>=8.13.0,<8.23",
"jupyterlab>=4.0.0,<4.3",
"matplotlib>=3.5.0,<3.9",
"nbsphinx>=0.9.0,<0.10",
"numpydoc>=1.5.0,<1.7",
"pypandoc>=1.10.0,<1.14",
# NOTE: Remove recommonmark once examples are reworked.
"recommonmark",
"Sphinx>=7.1.0,<7.3",
"sphinx-autobuild==2021.3.14; python_version == '3.8'",
"sphinx-autobuild==2024.2.4; python_version > '3.8'",
"sphinx-copybutton>=0.5.0,<0.6",
"sphinx-gallery>=0.14.0,<0.16",
"sphinx_design>=0.4.0,<0.6",
]
full = [
"matplotlib==3.5.3; python_version == '3.7'",
"matplotlib==3.7.3; python_version == '3.8'",
"matplotlib==3.8.2; python_version > '3.8'",
"numpy==1.21.6; python_version <= '3.9'",
"numpy==1.26.0; python_version > '3.9'",
"pandas==1.3.5; python_version == '3.7'",
"pandas==2.0.3; python_version == '3.9'",
"pandas==2.1.1; python_version > '3.9'",
"matplotlib>=3.5.0,<3.9",
"numpy>=1.20.0,<2",
"pandas>=1.1.0,<2.3",
]


Expand Down
2 changes: 1 addition & 1 deletion src/pyedb/dotnet/clr_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
)
edb_initialized = False
elif sys.version[0] == 3 and sys.version[1] < 7:
warnings.warn("EDB requires Linux Python 3.7 or later.")
warnings.warn("EDB requires Linux Python 3.8 or later.")
_clr = None
String = None
Double = None
Expand Down

0 comments on commit 500756e

Please sign in to comment.