diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 5a6b21e7..2493eaf4 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -33,7 +33,7 @@ jobs: name: "Code style" runs-on: ubuntu-latest steps: - - uses: ansys/actions/code-style@v6 + - uses: ansys/actions/code-style@v8 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} use-python-cache: false @@ -42,7 +42,7 @@ jobs: name: "Documentation style" runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-style@v6 + - uses: ansys/actions/doc-style@v8 with: token: ${{ secrets.GITHUB_TOKEN }} vale-version: "3.4.1" @@ -136,7 +136,7 @@ jobs: runs-on: ${{ matrix.os }} needs: [ code-style ] steps: - - uses: ansys/actions/build-wheelhouse@v6 + - uses: ansys/actions/build-wheelhouse@v8 with: library-name: ${{ env.LIBRARY_NAME }} operating-system: ${{ matrix.os }} @@ -297,7 +297,7 @@ jobs: runs-on: ubuntu-latest needs: [ doc-build, tests_windows, tests_linux ] steps: - - uses: ansys/actions/build-library@v6 + - uses: ansys/actions/build-library@v8 with: library-name: ${{ env.LIBRARY_NAME }} python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -314,13 +314,13 @@ jobs: contents: write steps: - name: "Release to the public PyPI repository" - uses: ansys/actions/release-pypi-public@v6 + uses: ansys/actions/release-pypi-public@v8 with: library-name: ${{ env.LIBRARY_NAME }} use-trusted-publisher: true - name: "Release to GitHub" - uses: ansys/actions/release-github@v6 + uses: ansys/actions/release-github@v8 with: library-name: ${{ env.LIBRARY_NAME }} @@ -330,25 +330,12 @@ jobs: needs: build-library if: github.event_name == 'push' steps: - - uses: ansys/actions/doc-deploy-dev@v6 + - uses: ansys/actions/doc-deploy-dev@v8 with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} - - doc-index-dev: - name: "Deploy development index documentation" - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - needs: doc-deploy-dev - steps: - - name: "Deploy the latest documentation index" - uses: ansys/actions/doc-deploy-index@v6 - with: - cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev - index-name: pyaedt-toolkits-common-vdev - host-url: ${{ env.MEILISEARCH_HOST_URL }} - api-key: ${{ env.MEILISEARCH_API_KEY }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} + bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} + bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} doc-deploy-stable: name: "Deploy stable documentation" @@ -356,36 +343,9 @@ jobs: needs: release if: github.event_name == 'push' && contains(github.ref, 'refs/tags') steps: - - uses: ansys/actions/doc-deploy-stable@v6 + - uses: ansys/actions/doc-deploy-stable@v8 with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} - - doc-index-stable: - name: "Deploy stable documentation index" - runs-on: ubuntu-latest - needs: doc-deploy-stable - steps: - - name: "Install Git and clone project" - uses: actions/checkout@v4 - - - name: "Install the package requirements" - run: pip install -e . - - - name: "Get the version to PyMeilisearch" - run: | - VERSION=$(python -c "from ansys.aedt.toolkits.common import __version__; print('.'.join(__version__.split('.')[:2]))") - VERSION_MEILI=$(python -c "from ansys.aedt.toolkits.common import __version__; print('-'.join(__version__.split('.')[:2]))") - echo "Calculated VERSION: $VERSION" - echo "Calculated VERSION_MEILI: $VERSION_MEILI" - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV - - - name: "Deploy the latest documentation index" - uses: ansys/actions/doc-deploy-index@v6 - with: - cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }} - index-name: pyaedt-toolkits-common-v${{ env.VERSION_MEILI }} - host-url: ${{ env.MEILISEARCH_HOST_URL }} - api-key: ${{ env.MEILISEARCH_API_KEY }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} + bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} + bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} \ No newline at end of file diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 7f96dc7f..8c949e65 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,4 +8,4 @@ * [Giulia Malinverno](https://github.com/gmalinve) * [Sébastien Morais](https://github.com/SMoraisAnsys) -* [Kathy Pippert](https://github.com/PipKat) \ No newline at end of file +* [Kathy Pippert](https://github.com/PipKat) diff --git a/doc/source/conf.py b/doc/source/conf.py index 35080824..ee52e001 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -31,7 +31,6 @@ from ansys_sphinx_theme import ansys_logo_white_cropped from ansys_sphinx_theme import get_version_match from ansys_sphinx_theme import latex -from ansys_sphinx_theme import pyansys_logo_black from ansys_sphinx_theme import watermark from sphinx.util import logging @@ -108,7 +107,6 @@ def setup(app): print(copyright) # Select desired logo, theme, and declare the html title -html_logo = pyansys_logo_black html_theme = "ansys_sphinx_theme" html_short_title = html_title = "ansys-aedt-toolkits-common" @@ -120,6 +118,7 @@ def setup(app): "doc_path": "doc/source", } html_theme_options = { + "logo": "pyansys", "switcher": { "json_url": f"https://{cname}/versions.json", "version_match": switcher_version, diff --git a/pyproject.toml b/pyproject.toml index f426b77a..bb15fe14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,16 +24,16 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "build==1.2.1", + "build==1.2.2.post1", "twine==5.1.1", - "pyaedt>=0.8.0,<0.11", + "pyaedt>=0.10.0,<0.12", "pydantic", "tomli; python_version < '3.12'", ] [project.optional-dependencies] all = [ - "pyaedt[all]>=0.8.0,<0.11", + "pyaedt[all]>=0.10.0,<0.12", "flask", "PySide6-Essentials", "pyqtgraph", @@ -41,27 +41,27 @@ all = [ "pyvistaqt", ] tests = [ - "pyaedt[all]>=0.8.0,<0.11", + "pyaedt[all]>=0.10.0,<0.12", "flask", "pytest>=7.4.0,<8.4", "pytest-cov>=4.0.0,<5.1", ] doc = [ - "pyaedt[all]>=0.8.0,<0.11", + "pyaedt[all]>=0.10.0,<0.12", "recommonmark>=0.7.0,<0.8", "PySide6-Essentials", - "ansys-sphinx-theme>=0.10.0,<0.17", + "ansys-sphinx-theme>=0.10.0,<1.1", "numpydoc>=1.5.0,<1.9", - "Sphinx>=7.1.0,<7.4", + "Sphinx>=7.1.0,<8.2", "sphinx-copybutton>=0.5.0,<0.6", "sphinx-autobuild==2021.3.14; python_version == '3.8'", - "sphinx-autobuild==2024.4.16; python_version > '3.8'", + "sphinx-autobuild==2024.10.3; python_version > '3.8'", "nbsphinx>=0.9.0,<0.10", "sphinx_design", "jupytext", - "ipython>=8.13.0,<8.27", + "ipython>=8.13.0,<8.29", "jupyterlab>=4.0.0,<4.3", - "pypandoc>=1.10.0,<1.14", + "pypandoc>=1.10.0,<1.15", ] [tool.flit.module] diff --git a/src/ansys/aedt/toolkits/common/backend/api.py b/src/ansys/aedt/toolkits/common/backend/api.py index 487ffaec..f6556c8d 100644 --- a/src/ansys/aedt/toolkits/common/backend/api.py +++ b/src/ansys/aedt/toolkits/common/backend/api.py @@ -35,6 +35,17 @@ from ansys.aedt.core import Desktop from ansys.aedt.core.generic.general_methods import active_sessions from ansys.aedt.core.misc import list_installed_ansysem + +if ansys.aedt.core.__version__ <= "0.11.0": + from ansys.aedt.core.misc import list_installed_ansysem + + list_installed_aedt = list_installed_ansysem() +else: + from ansys.aedt.core.generic.aedt_versions import aedt_versions + + list_installed_aedt = aedt_versions.list_installed_ansysem + + from pydantic import ValidationError from ansys.aedt.toolkits.common.backend.constants import NAME_TO_AEDT_APP @@ -219,7 +230,7 @@ def installed_aedt_version() -> List: # Detect existing AEDT installation installed_versions = [] - for ver in list_installed_ansysem(): + for ver in list_installed_aedt: if "ANSYSEMSV_ROOT" in ver: # pragma: no cover # Handle the special case installed_versions.append(