Skip to content

Commit

Permalink
Merge branch 'main' into release/0.6
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/ansys/aedt/toolkits/common/__init__.py
  • Loading branch information
Samuelopez-ansys committed Oct 14, 2024
2 parents b5361db + 9d02b92 commit 07510a8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 66 deletions.
64 changes: 12 additions & 52 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}

Expand All @@ -330,62 +330,22 @@ 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"
runs-on: ubuntu-latest
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 }}
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

* [Giulia Malinverno](https://github.com/gmalinve)
* [Sébastien Morais](https://github.com/SMoraisAnsys)
* [Kathy Pippert](https://github.com/PipKat)
* [Kathy Pippert](https://github.com/PipKat)
3 changes: 1 addition & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"

Expand All @@ -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,
Expand Down
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,44 +24,44 @@ 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",
"qdarkstyle",
"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]
Expand Down
13 changes: 12 additions & 1 deletion src/ansys/aedt/toolkits/common/backend/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 07510a8

Please sign in to comment.