From 903dd1403a5c2a779a79fd7f28733e2caffd9066 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 29 Apr 2025 17:52:12 +0200 Subject: [PATCH 01/19] CHORE: Update install targets and use dependency groups --- pyproject.toml | 90 ++++++++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 53d2d70f49b..f5faf300924 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,53 @@ dependencies = [ ] [project.optional-dependencies] +dotnet = [ + "ansys-pythonnet>=3.1.0rc3", + "cffi==1.17.1; platform_system=='Linux' and python_version == '3.7'", + "cffi>=1.16.0,<1.18; platform_system=='Linux' and python_version > '3.7'", + "dotnetcore2==3.1.23; platform_system=='Linux'", + "pywin32>=303; platform_system=='Windows'", +] +jupyter = [ + "jupyterlab>=3.6.0,<4.4", + "ipython>=7.30.0,<9.1", + "ipyvtklink>=0.2.0,<0.2.4", +] +graphics = [ + "ansys-tools-visualization-interface; python_version >= '3.10'", + "pyvista[io]>=0.38.0,<0.45", + "matplotlib>=3.5.0,<3.11", + "vtk>=9.0,<9.4", +] +analysis = [ + "fast-simplification>=0.1.7", + "numpy>=1.20.0,<2.3", + "osmnx>=1.1.0,<2.1", + "pandas>=1.1.0,<2.3", + "scikit-rf>=0.30.0,<1.7", +] +io = [ + "openpyxl>=3.1.0,<3.3", + "tables; python_version >= '3.10'", +] +all = [ + "pyaedt[analysis,graphics,io,jupyter]", +] +examples = [ + "imageio>=2.34.0,<2.38", + "matplotlib>=3.5.0,<3.11", + "numpy>=1.20.0,<2.3", + "openpyxl>=3.1.0,<3.3", + "osmnx>=1.1.0,<2.1", + "pandas>=1.1.0,<2.3", + "pyvista>=0.38.0,<0.45", + "fast-simplification>=0.1.7", + "joblib>=1.4.0,<1.5", + "plotly>=6.0,<6.1", + "scikit-rf>=0.30.0,<1.7", +] + +[dependency-groups] unit-tests = [ "pytest>=7.4.0,<8.4", "pytest-cov>=4.0.0,<6.2", @@ -56,25 +103,18 @@ integration-tests = [ "matplotlib>=3.5.0,<3.11", "numpy>=1.20.0,<2.3", "pandas>=1.1.0,<2.3", - "pyaedt[unit-tests]", + {include-group = "unit-tests"}, ] tests = [ "ansys-tools-visualization-interface; python_version >= '3.10'", "openpyxl>=3.1.0,<3.3", "osmnx>=1.1.0,<2.1", - "pyaedt[integration-tests]", "pytest-timeout>=2.3.0,<2.4", "pytest-xdist>=3.5.0,<3.7", "pyvista[io]>=0.38.0,<0.45", "scikit-rf>=0.30.0,<1.7", "tables; python_version >= '3.10'", -] -dotnet = [ - "ansys-pythonnet>=3.1.0rc3", - "cffi==1.17.1; platform_system=='Linux' and python_version == '3.7'", - "cffi>=1.16.0,<1.18; platform_system=='Linux' and python_version > '3.7'", - "dotnetcore2==3.1.23; platform_system=='Linux'", - "pywin32>=303; platform_system=='Windows'", + {include-group = "integration-tests"}, ] doc = [ "ansys-sphinx-theme>=1.0.0,<1.4", @@ -91,37 +131,7 @@ doc = [ "pyvista[io]>=0.38.0,<0.45", "ansys-tools-visualization-interface; python_version >= '3.10'", ] -jupyter = [ - "jupyterlab>=3.6.0,<4.4", - "ipython>=7.30.0,<9.1", - "ipyvtklink>=0.2.0,<0.2.4", -] -all = [ - "matplotlib>=3.5.0,<3.11", - "numpy>=1.20.0,<2.3", - "openpyxl>=3.1.0,<3.3", - "osmnx>=1.1.0,<2.1", - "pandas>=1.1.0,<2.3", - "pyvista[io]>=0.38.0,<0.45", - "fast-simplification>=0.1.7", - "ansys-tools-visualization-interface; python_version >= '3.10'", - "tables; python_version >= '3.10'", - "scikit-rf>=0.30.0,<1.7", - "pyaedt[jupyter]", -] -examples = [ - "imageio>=2.34.0,<2.38", - "matplotlib>=3.5.0,<3.11", - "numpy>=1.20.0,<2.3", - "openpyxl>=3.1.0,<3.3", - "osmnx>=1.1.0,<2.1", - "pandas>=1.1.0,<2.3", - "pyvista>=0.38.0,<0.45", - "fast-simplification>=0.1.7", - "joblib>=1.4.0,<1.5", - "plotly>=6.0,<6.1", - "scikit-rf>=0.30.0,<1.7", -] + [tool.setuptools.dynamic] version = {attr = "ansys.aedt.core.__version__"} From 17ff602643c258b7e30efba3fe81b2a00ca889e5 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 30 Apr 2025 09:52:03 +0200 Subject: [PATCH 02/19] CI: Use dependency groups --- .github/workflows/ci_cd.yml | 12 ++++++------ .github/workflows/manual_draft.yml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index fa39265d931..536f5a87972 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -221,7 +221,7 @@ jobs: - name: Install pyaedt and tests dependencies run: | .venv\Scripts\Activate.ps1 - pip install .[tests] + pip install --group tests . - name: Install CI dependencies (e.g. vtk-osmesa) run: | @@ -284,7 +284,7 @@ jobs: run: | export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH source .venv/bin/activate - pip install .[tests] + pip install --group tests . - name: Run tests marked with 'solvers' run: | @@ -334,7 +334,7 @@ jobs: - name: Install pyaedt and tests dependencies run: | .venv\Scripts\Activate.ps1 - pip install .[tests] + pip install --group tests . - name: Install CI dependencies (e.g. vtk-osmesa) run: | @@ -402,7 +402,7 @@ jobs: run: | export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH source .venv/bin/activate - pip install .[tests] + pip install --group tests . - name: Install CI dependencies (e.g. vtk-osmesa) run: | @@ -465,7 +465,7 @@ jobs: - name: Install pyaedt and tests dependencies run: | .venv\Scripts\Activate.ps1 - pip install .[tests] + pip install --group tests . - name: Install CI dependencies (e.g. vtk-osmesa) run: | @@ -533,7 +533,7 @@ jobs: run: | export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH source .venv/bin/activate - pip install .[tests] + pip install --group tests . - name: Install CI dependencies (e.g. vtk-osmesa) run: | diff --git a/.github/workflows/manual_draft.yml b/.github/workflows/manual_draft.yml index 89e8a1ff8dd..a3fada987c6 100644 --- a/.github/workflows/manual_draft.yml +++ b/.github/workflows/manual_draft.yml @@ -62,7 +62,7 @@ jobs: - name: Install pyaedt and tests dependencies run: | .venv\Scripts\Activate.ps1 - pip install .[tests] + pip install --group tests . pip install pytest-azurepipelines - name: Install CI dependencies (e.g. vtk-osmesa) @@ -121,7 +121,7 @@ jobs: run: | export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH source .venv/bin/activate - pip install .[tests] + pip install --group tests . pip install pytest-azurepipelines - name: Run tests marked with 'solvers' @@ -167,7 +167,7 @@ jobs: - name: Install pyaedt and tests dependencies run: | .venv\Scripts\Activate.ps1 - pip install .[tests] + pip install --group tests . pip install pytest-azurepipelines - name: Install CI dependencies (e.g. vtk-osmesa) From 2478e00a84f2c1325ac65e3cbaf376fb96aac1a9 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 30 Apr 2025 09:53:37 +0200 Subject: [PATCH 03/19] TBR: Test ansys action update --- .github/workflows/ci_cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 536f5a87972..6edd0aa9ae4 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -104,7 +104,7 @@ jobs: needs: [doc-style] steps: - name: Documentation build - uses: ansys/actions/doc-build@v9 + uses: ansys/actions/doc-build@feat/work-with-dependency-groups with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -144,7 +144,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run unit tests - uses: ansys/actions/tests-pytest@v9 + uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups with: pytest-postargs: 'tests/unit' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} @@ -171,7 +171,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run integration tests - uses: ansys/actions/tests-pytest@v9 + uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups with: pytest-postargs: 'tests/integration' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} From a15b1180f341c165b5bb59b53083d5fb2ad7c0ec Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 30 Apr 2025 12:14:55 +0200 Subject: [PATCH 04/19] TBR: extend testing --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6edd0aa9ae4..f42d3146598 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -93,7 +93,7 @@ jobs: needs: [pr-title] steps: - name: Check documentation style - uses: ansys/actions/doc-style@v9 + uses: ansys/actions/doc-style@feat/work-with-dependency-groups with: token: ${{ secrets.GITHUB_TOKEN }} fail-level: 'warning' From 4b3fd820dd3d0447004071532ac33afc9a84687c Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 30 Apr 2025 14:02:52 +0200 Subject: [PATCH 05/19] TBR: test changelog-fragment --- .github/workflows/label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 63e61df4bda..0b6f2d7b2f2 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -102,7 +102,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-changelog@v9 + - uses: ansys/actions/doc-changelog@chore/use-dependency-groups with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} use-conventional-commits: true From 0c3dfd854ee8e459c80c5f2739089050abba6311 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 30 Apr 2025 14:06:24 +0200 Subject: [PATCH 06/19] CI: Update wrong ref --- .github/workflows/label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 0b6f2d7b2f2..e29a044d48d 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -102,7 +102,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-changelog@chore/use-dependency-groups + - uses: ansys/actions/doc-changelog@feat/work-with-dependency-groups with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} use-conventional-commits: true From aa1887d6cedc33e8e1cf027566cfda8f8f921e45 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 30 Apr 2025 12:08:17 +0000 Subject: [PATCH 07/19] chore: adding changelog file 6093.maintenance.md [dependabot-skip] --- doc/changelog.d/6093.maintenance.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/6093.maintenance.md diff --git a/doc/changelog.d/6093.maintenance.md b/doc/changelog.d/6093.maintenance.md new file mode 100644 index 00000000000..9826ecc5d7f --- /dev/null +++ b/doc/changelog.d/6093.maintenance.md @@ -0,0 +1 @@ +Update install targets and use dependency groups \ No newline at end of file From ffeaf792ea21c517ec59dff2e7d6edc637c29316 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Mon, 5 May 2025 09:03:55 +0200 Subject: [PATCH 08/19] WIP: Revert test branch --- .github/workflows/ci_cd.yml | 8 ++++---- .github/workflows/label.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index f42d3146598..536f5a87972 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -93,7 +93,7 @@ jobs: needs: [pr-title] steps: - name: Check documentation style - uses: ansys/actions/doc-style@feat/work-with-dependency-groups + uses: ansys/actions/doc-style@v9 with: token: ${{ secrets.GITHUB_TOKEN }} fail-level: 'warning' @@ -104,7 +104,7 @@ jobs: needs: [doc-style] steps: - name: Documentation build - uses: ansys/actions/doc-build@feat/work-with-dependency-groups + uses: ansys/actions/doc-build@v9 with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -144,7 +144,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run unit tests - uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups + uses: ansys/actions/tests-pytest@v9 with: pytest-postargs: 'tests/unit' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} @@ -171,7 +171,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run integration tests - uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups + uses: ansys/actions/tests-pytest@v9 with: pytest-postargs: 'tests/integration' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index e29a044d48d..63e61df4bda 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -102,7 +102,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-changelog@feat/work-with-dependency-groups + - uses: ansys/actions/doc-changelog@v9 with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} use-conventional-commits: true From 15ea4a93717fee301ae41a73f47eeef6ae547938 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 14 May 2025 10:39:22 +0200 Subject: [PATCH 09/19] TBR: Test with branch --- .github/workflows/ci_cd.yml | 22 +++++++++++----------- .github/workflows/label.yml | 2 +- .github/workflows/nightly-docs.yml | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7159710b35d..fbea25b1e7a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -33,7 +33,7 @@ jobs: contents: write pull-requests: write steps: - - uses: ansys/actions/doc-deploy-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + - uses: ansys/actions/doc-deploy-changelog@feat/work-with-dependency-groups with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} @@ -44,7 +44,7 @@ jobs: name: "Vulnerabilities" runs-on: ubuntu-latest steps: - - uses: ansys/actions/check-vulnerabilities@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + - uses: ansys/actions/check-vulnerabilities@feat/work-with-dependency-groups with: python-version: ${{ env.MAIN_PYTHON_VERSION }} python-package-name: ${{ env.PACKAGE_NAME }} @@ -89,7 +89,7 @@ jobs: steps: - name: Check the title of the pull request if: github.event_name == 'pull_request' - uses: ansys/actions/check-pr-title@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/check-pr-title@feat/work-with-dependency-groups with: token: ${{ secrets.GITHUB_TOKEN }} use-upper-case: true @@ -104,7 +104,7 @@ jobs: needs: [pr-title] steps: - name: Check documentation style - uses: ansys/actions/doc-style@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-style@feat/work-with-dependency-groups with: token: ${{ secrets.GITHUB_TOKEN }} fail-level: 'warning' @@ -115,7 +115,7 @@ jobs: needs: [doc-style] steps: - name: Documentation build - uses: ansys/actions/doc-style@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-style@feat/work-with-dependency-groups with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -138,7 +138,7 @@ jobs: python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - name: Build wheelhouse and perform smoke test - uses: ansys/actions/build-wheelhouse@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/build-wheelhouse@feat/work-with-dependency-groups with: library-name: ${{ env.PACKAGE_NAME }} operating-system: ${{ matrix.os }} @@ -155,7 +155,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run unit tests - uses: ansys/actions/tests-pytest@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups with: pytest-postargs: 'tests/unit' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} @@ -182,7 +182,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run integration tests - uses: ansys/actions/tests-pytest@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups with: pytest-postargs: 'tests/integration' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} @@ -593,7 +593,7 @@ jobs: id-token: write steps: - name: Build library source and wheel artifacts - uses: ansys/actions/build-library@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/build-library@feat/work-with-dependency-groups with: library-name: ${{ env.PACKAGE_NAME }} python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -626,7 +626,7 @@ jobs: skip-existing: false - name: Release to GitHub - uses: ansys/actions/release-github@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/release-github@feat/work-with-dependency-groups with: library-name: ${{ env.PACKAGE_NAME }} token: ${{ secrets.GITHUB_TOKEN }} @@ -640,7 +640,7 @@ jobs: needs: [release] steps: - name: Deploy the stable documentation - uses: ansys/actions/doc-deploy-stable@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-deploy-stable@feat/work-with-dependency-groups with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 97e85ed5c2f..e29a044d48d 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -102,7 +102,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + - uses: ansys/actions/doc-changelog@feat/work-with-dependency-groups with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} use-conventional-commits: true diff --git a/.github/workflows/nightly-docs.yml b/.github/workflows/nightly-docs.yml index d911b01c8cf..1ed46c88d09 100644 --- a/.github/workflows/nightly-docs.yml +++ b/.github/workflows/nightly-docs.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Documentation build - uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-build@feat/work-with-dependency-groups with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -35,7 +35,7 @@ jobs: needs: doc-build steps: - name: Upload development documentation - uses: ansys/actions/doc-deploy-dev@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-deploy-dev@feat/work-with-dependency-groups with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} From 364984fa3b4bb875d3afe465b4a9e682824f2d6f Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 14 May 2025 10:59:48 +0200 Subject: [PATCH 10/19] BUILD: Update vtk upper bound --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b7f2b055716..1d6a05d0934 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ graphics = [ "ansys-tools-visualization-interface; python_version >= '3.10'", "pyvista[io]>=0.38.0,<0.45", "matplotlib>=3.5.0,<3.11", - "vtk>=9.0,<9.4", + "vtk>=9.0,<9.5", ] analysis = [ "fast-simplification>=0.1.7", From 06ecc5a2073f662c7de67a563ed9d5c997aa1d74 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 14 May 2025 14:27:25 +0200 Subject: [PATCH 11/19] CI: Fix wrong action call --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index fbea25b1e7a..feddfd027d6 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -115,7 +115,7 @@ jobs: needs: [doc-style] steps: - name: Documentation build - uses: ansys/actions/doc-style@feat/work-with-dependency-groups + uses: ansys/actions/doc-build@feat/work-with-dependency-groups with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} From 4bd5260399ac67f5b7ac3c5507c6a26504165fd6 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Thu, 15 May 2025 09:36:47 +0200 Subject: [PATCH 12/19] CHORE: Revert ref to dev branch --- .github/workflows/ci_cd.yml | 20 ++++++++++---------- .github/workflows/label.yml | 2 +- .github/workflows/nightly-docs.yml | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index fa0df6b3ec3..4f130f935a8 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -33,7 +33,7 @@ jobs: contents: write pull-requests: write steps: - - uses: ansys/actions/doc-deploy-changelog@feat/work-with-dependency-groups + - uses: ansys/actions/doc-deploy-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} @@ -44,7 +44,7 @@ jobs: name: "Vulnerabilities" runs-on: ubuntu-latest steps: - - uses: ansys/actions/check-vulnerabilities@feat/work-with-dependency-groups + - uses: ansys/actions/check-vulnerabilities@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} python-package-name: ${{ env.PACKAGE_NAME }} @@ -89,7 +89,7 @@ jobs: steps: - name: Check the title of the pull request if: github.event_name == 'pull_request' - uses: ansys/actions/check-pr-title@feat/work-with-dependency-groups + uses: ansys/actions/check-pr-title@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: token: ${{ secrets.GITHUB_TOKEN }} use-upper-case: true @@ -104,7 +104,7 @@ jobs: needs: [pr-title] steps: - name: Check documentation style - uses: ansys/actions/doc-style@feat/work-with-dependency-groups + uses: ansys/actions/doc-style@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: token: ${{ secrets.GITHUB_TOKEN }} fail-level: 'warning' @@ -138,7 +138,7 @@ jobs: python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - name: Build wheelhouse and perform smoke test - uses: ansys/actions/build-wheelhouse@feat/work-with-dependency-groups + uses: ansys/actions/build-wheelhouse@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: library-name: ${{ env.PACKAGE_NAME }} operating-system: ${{ matrix.os }} @@ -155,7 +155,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run unit tests - uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups + uses: ansys/actions/tests-pytest@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: pytest-postargs: 'tests/unit' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} @@ -182,7 +182,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run integration tests - uses: ansys/actions/tests-pytest@feat/work-with-dependency-groups + uses: ansys/actions/tests-pytest@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: pytest-postargs: 'tests/integration' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} @@ -593,7 +593,7 @@ jobs: id-token: write steps: - name: Build library source and wheel artifacts - uses: ansys/actions/build-library@feat/work-with-dependency-groups + uses: ansys/actions/build-library@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: library-name: ${{ env.PACKAGE_NAME }} python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -626,7 +626,7 @@ jobs: skip-existing: false - name: Release to GitHub - uses: ansys/actions/release-github@feat/work-with-dependency-groups + uses: ansys/actions/release-github@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: library-name: ${{ env.PACKAGE_NAME }} token: ${{ secrets.GITHUB_TOKEN }} @@ -640,7 +640,7 @@ jobs: needs: [release] steps: - name: Deploy the stable documentation - uses: ansys/actions/doc-deploy-stable@feat/work-with-dependency-groups + uses: ansys/actions/doc-deploy-stable@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index e29a044d48d..97e85ed5c2f 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -102,7 +102,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-changelog@feat/work-with-dependency-groups + - uses: ansys/actions/doc-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} use-conventional-commits: true diff --git a/.github/workflows/nightly-docs.yml b/.github/workflows/nightly-docs.yml index 1ed46c88d09..d911b01c8cf 100644 --- a/.github/workflows/nightly-docs.yml +++ b/.github/workflows/nightly-docs.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Documentation build - uses: ansys/actions/doc-build@feat/work-with-dependency-groups + uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -35,7 +35,7 @@ jobs: needs: doc-build steps: - name: Upload development documentation - uses: ansys/actions/doc-deploy-dev@feat/work-with-dependency-groups + uses: ansys/actions/doc-deploy-dev@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 with: cname: ${{ env.DOCUMENTATION_CNAME }} token: ${{ secrets.GITHUB_TOKEN }} From dec3c786a0f9c64c038382daa504ebb3e83c2c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Thu, 22 May 2025 09:58:35 +0200 Subject: [PATCH 13/19] CI: test new refactoring --- .github/workflows/ci_cd.yml | 1144 ++++++++++++++++++----------------- 1 file changed, 573 insertions(+), 571 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 4f130f935a8..6183ee6f14a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -25,142 +25,143 @@ concurrency: jobs: - update-changelog: - name: "Update CHANGELOG (on release)" - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: ansys/actions/doc-deploy-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} - bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} - use-upper-case: true - - vulnerabilities: - name: "Vulnerabilities" - runs-on: ubuntu-latest - steps: - - uses: ansys/actions/check-vulnerabilities@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - python-package-name: ${{ env.PACKAGE_NAME }} - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - dev-mode: ${{ github.ref != 'refs/heads/main' }} - - # NOTE: We do not allow dependabot to trigger the CI/CD pipeline automatically. - # This is to mitigate supply chain attacks, where a malicious dependency update - # could execute arbitrary code in our build environment. - # Dependabot PRs must be reviewed carefully and approved manually before - # running the CI. - block-dependabot: - name: "Block dependabot (on dependabot PR)" - runs-on: ubuntu-latest - steps: - - name: Exit if dependabot triggered the workflow - if: github.triggering_actor == 'dependabot[bot]' - run: | - echo "::warning::Dependabot is not allowed to trigger this workflow. Please review carefully the changes before running the workflow manually." - exit 1 - - # NOTE: We do not allow pyansys-ci-bot to trigger the CI/CD pipeline automatically - # on dependabot's PR. This is to mitigate supply chain attacks, where a malicious - # dependency update could execute arbitrary code in our build environment. - # Dependabot PRs must be reviewed carefully and approved manually before - # running the CI. - block-pyansys-ci-bot: - name: "Block PyAnsys-CI-bot (on dependabot PR)" - needs: block-dependabot - runs-on: ubuntu-latest - steps: - - name: Exit if pyansys-ci-bot triggered the workflow on dependabot's PR - if: github.triggering_actor == 'pyansys-ci-bot' && startsWith(github.head_ref, 'dependabot') - run: | - echo "::warning::PyAnsys CI bot is not allowed to trigger this workflow in dependabot's PR. Please review carefully the changes before running the workflow manually." - exit 1 - - pr-title: - name: Check the title of the PR (if needed) - runs-on: ubuntu-latest - needs: [block-pyansys-ci-bot] - steps: - - name: Check the title of the pull request - if: github.event_name == 'pull_request' - uses: ansys/actions/check-pr-title@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - token: ${{ secrets.GITHUB_TOKEN }} - use-upper-case: true - - name: Check the title of the pull request - if: github.event_name != 'pull_request' - shell: bash - run: echo "::notice::Skipping PR title check for non-PR events" - - doc-style: - name: Documentation style check - runs-on: ubuntu-latest - needs: [pr-title] - steps: - - name: Check documentation style - uses: ansys/actions/doc-style@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fail-level: 'warning' - - doc-build: - name: Documentation build - runs-on: ubuntu-latest - needs: [doc-style] - steps: - - name: Documentation build - uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" - python-version: ${{ env.MAIN_PYTHON_VERSION }} - sphinxopts: '-j auto --color -w build_errors.txt' - check-links: false - needs-quarto: true - - smoke-tests: - name: Build wheelhouse and smoke tests - runs-on: ${{ matrix.os }} - permissions: - attestations: write - contents: read - id-token: write - needs: [pr-title] - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - python-version: ['3.10', '3.11', '3.12', '3.13'] - steps: - - name: Build wheelhouse and perform smoke test - uses: ansys/actions/build-wheelhouse@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - library-name: ${{ env.PACKAGE_NAME }} - operating-system: ${{ matrix.os }} - python-version: ${{ matrix.python-version }} - target: 'all' - attest-provenance: true - - name: Import python package - run: | - python -c "import ansys.aedt.core; from ansys.aedt.core import __version__" + # update-changelog: + # name: "Update CHANGELOG (on release)" + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # runs-on: ubuntu-latest + # permissions: + # contents: write + # pull-requests: write + # steps: + # - uses: ansys/actions/doc-deploy-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + # with: + # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} + # bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} + # bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} + # use-upper-case: true + + # vulnerabilities: + # name: "Vulnerabilities" + # runs-on: ubuntu-latest + # steps: + # - uses: ansys/actions/check-vulnerabilities@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + # python-package-name: ${{ env.PACKAGE_NAME }} + # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} + # dev-mode: ${{ github.ref != 'refs/heads/main' }} + + # # NOTE: We do not allow dependabot to trigger the CI/CD pipeline automatically. + # # This is to mitigate supply chain attacks, where a malicious dependency update + # # could execute arbitrary code in our build environment. + # # Dependabot PRs must be reviewed carefully and approved manually before + # # running the CI. + # block-dependabot: + # name: "Block dependabot (on dependabot PR)" + # runs-on: ubuntu-latest + # steps: + # - name: Exit if dependabot triggered the workflow + # if: github.triggering_actor == 'dependabot[bot]' + # run: | + # echo "::warning::Dependabot is not allowed to trigger this workflow. Please review carefully the changes before running the workflow manually." + # exit 1 + + # # NOTE: We do not allow pyansys-ci-bot to trigger the CI/CD pipeline automatically + # # on dependabot's PR. This is to mitigate supply chain attacks, where a malicious + # # dependency update could execute arbitrary code in our build environment. + # # Dependabot PRs must be reviewed carefully and approved manually before + # # running the CI. + # block-pyansys-ci-bot: + # name: "Block PyAnsys-CI-bot (on dependabot PR)" + # needs: block-dependabot + # runs-on: ubuntu-latest + # steps: + # - name: Exit if pyansys-ci-bot triggered the workflow on dependabot's PR + # if: github.triggering_actor == 'pyansys-ci-bot' && startsWith(github.head_ref, 'dependabot') + # run: | + # echo "::warning::PyAnsys CI bot is not allowed to trigger this workflow in dependabot's PR. Please review carefully the changes before running the workflow manually." + # exit 1 + + # pr-title: + # name: Check the title of the PR (if needed) + # runs-on: ubuntu-latest + # needs: [block-pyansys-ci-bot] + # steps: + # - name: Check the title of the pull request + # if: github.event_name == 'pull_request' + # uses: ansys/actions/check-pr-title@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # use-upper-case: true + # - name: Check the title of the pull request + # if: github.event_name != 'pull_request' + # shell: bash + # run: echo "::notice::Skipping PR title check for non-PR events" + + # doc-style: + # name: Documentation style check + # runs-on: ubuntu-latest + # needs: [pr-title] + # steps: + # - name: Check documentation style + # uses: ansys/actions/doc-style@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # fail-level: 'warning' + + # doc-build: + # name: Documentation build + # runs-on: ubuntu-latest + # needs: [doc-style] + # steps: + # - name: Documentation build + # uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + # with: + # dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + # sphinxopts: '-j auto --color -w build_errors.txt' + # check-links: false + # needs-quarto: true + + # smoke-tests: + # name: Build wheelhouse and smoke tests + # runs-on: ${{ matrix.os }} + # permissions: + # attestations: write + # contents: read + # id-token: write + # needs: [pr-title] + # strategy: + # fail-fast: false + # matrix: + # os: [ubuntu-latest, windows-latest] + # python-version: ['3.10', '3.11', '3.12', '3.13'] + # steps: + # - name: Build wheelhouse and perform smoke test + # uses: ansys/actions/build-wheelhouse@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + # with: + # library-name: ${{ env.PACKAGE_NAME }} + # operating-system: ${{ matrix.os }} + # python-version: ${{ matrix.python-version }} + # target: 'all' + # attest-provenance: true + # - name: Import python package + # run: | + # python -c "import ansys.aedt.core; from ansys.aedt.core import __version__" unit-tests: name: Running unit tests - needs: [smoke-tests] + # needs: [smoke-tests] runs-on: ubuntu-latest steps: - name: Run unit tests - uses: ansys/actions/tests-pytest@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/tests-pytest@chore/update-pytest-inputs # v9.0.9 with: pytest-postargs: 'tests/unit' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} python-version: ${{ env.MAIN_PYTHON_VERSION }} - optional-dependencies-name: unit-tests + optional-dependencies-name: io + group-dependencies-name: unit-tests - name: Upload coverage to Codecov uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 @@ -182,12 +183,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Run integration tests - uses: ansys/actions/tests-pytest@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/tests-pytest@chore/update-pytest-inputs # v9.0.9 with: pytest-postargs: 'tests/integration' pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }} python-version: ${{ env.MAIN_PYTHON_VERSION }} - optional-dependencies-name: integration-tests + optional-dependencies-name: io + group-dependencies-name: integration-tests - name: Upload coverage to Codecov uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 @@ -203,446 +205,446 @@ jobs: path: junit/test-results.xml if: ${{ always() }} -# # ================================================================================================= -# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# # ================================================================================================= - - system-tests-solvers-windows: - name: Testing solvers and coverage (Windows) - needs: [integration-tests] - if: github.event.pull_request.draft == false - runs-on: [ self-hosted, Windows, pyaedt ] - steps: - - name: Install Git and checkout project - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - run: | - python -m venv .venv - .venv\Scripts\Activate.ps1 - python -m pip install pip -U - python -m pip install wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - run: | - .venv\Scripts\Activate.ps1 - pip install --group tests . - - - name: Install CI dependencies (e.g. vtk-osmesa) - run: | - .venv\Scripts\Activate.ps1 - # Uninstall conflicting dependencies - pip uninstall --yes vtk - pip install --extra-index-url https://wheels.vtk.org vtk-osmesa - - - name: Run tests marked with 'solvers' - env: - PYTHONMALLOC: malloc - run: | - .venv\Scripts\Activate.ps1 - pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m solvers --deselect=tests/system/solvers/test_45_FilterSolutions - - - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 - with: - name: codecov-system-solvers-tests-windows - files: ./coverage.xml - flags: windows_system_solvers - - - name: Upload pytest test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: pytest-solvers-windows - path: junit/test-results.xml - if: ${{ always() }} - -# # ================================================================================================= -# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# # ================================================================================================= - - system-tests-solvers-linux: - name: Testing solvers and coverage (Linux) - needs: [integration-tests] - if: github.event.pull_request.draft == false - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT251: '/opt/AnsysEM/v251/AnsysEM' - ANS_NODEPCHECK: '1' - steps: - - name: Install Git and checkout project - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - python -m venv .venv - source .venv/bin/activate - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - source .venv/bin/activate - pip install --group tests . - - - name: Run tests marked with 'solvers' - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - source .venv/bin/activate - pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m solvers - - - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 - with: - name: codecov-system-solvers-tests-linux - files: ./coverage.xml - flags: linux_system_solvers - - - name: Upload pytest test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: pytest-solvers-linux - path: junit/test-results.xml - if: ${{ always() }} - -# # ================================================================================================= -# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# # ================================================================================================= - - system-tests-general-windows: - name: Testing and coverage (Windows) - needs: [integration-tests] - if: github.event.pull_request.draft == false - runs-on: [ self-hosted, Windows, pyaedt ] - steps: - - name: Install Git and checkout project - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - run: | - python -m venv .venv - .venv\Scripts\Activate.ps1 - python -m pip install pip -U - python -m pip install wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - run: | - .venv\Scripts\Activate.ps1 - pip install --group tests . - - - name: Install CI dependencies (e.g. vtk-osmesa) - run: | - .venv\Scripts\Activate.ps1 - # Uninstall conflicting dependencies - pip uninstall --yes vtk - pip install --extra-index-url https://wheels.vtk.org vtk-osmesa - - - name: Run tests marked with 'general' - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - env: - PYTHONMALLOC: malloc - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - .venv\Scripts\Activate.ps1 - pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m general - - - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 - with: - name: codecov-system-general-tests-windows - files: ./coverage.xml - flags: windows_system_general - - - name: Upload pytest test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: pytest-general-windows - path: junit/test-results.xml - if: ${{ always() }} - -# # ================================================================================================= -# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# # ================================================================================================= - - system-tests-general-linux: - name: Testing and coverage (Linux) - if: github.event.pull_request.draft == false - needs: [integration-tests] - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT251: '/opt/AnsysEM/v251/AnsysEM' - ANS_NODEPCHECK: '1' - steps: - - name: Install Git and checkout project - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - python -m venv .venv - source .venv/bin/activate - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - source .venv/bin/activate - pip install --group tests . - - - name: Install CI dependencies (e.g. vtk-osmesa) - run: | - source .venv/bin/activate - # Uninstall conflicting dependencies - pip uninstall --yes vtk - pip install --extra-index-url https://wheels.vtk.org vtk-osmesa - - - name: Run tests marked with 'general' - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - source .venv/bin/activate - pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m general - - - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 - with: - name: codecov-system-general-tests-linux - files: ./coverage.xml - flags: linux_system_general - - - name: Upload pytest test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: pytest-general-linux - path: junit/test-results.xml - if: ${{ always() }} - - -# # ================================================================================================= -# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# # ================================================================================================= - - system-tests-visualization-windows: - name: Testing and coverage Visualization (Windows) - needs: [integration-tests] - if: github.event.pull_request.draft == false - runs-on: [ self-hosted, Windows, pyaedt ] - steps: - - name: Install Git and checkout project - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - run: | - python -m venv .venv - .venv\Scripts\Activate.ps1 - python -m pip install pip -U - python -m pip install wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - run: | - .venv\Scripts\Activate.ps1 - pip install --group tests . - - - name: Install CI dependencies (e.g. vtk-osmesa) - run: | - .venv\Scripts\Activate.ps1 - # Uninstall conflicting dependencies - pip uninstall --yes vtk - pip install --extra-index-url https://wheels.vtk.org vtk-osmesa - - - name: Run tests marked with 'visualization' - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - env: - PYTHONMALLOC: malloc - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - .venv\Scripts\Activate.ps1 - pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m visualization - - - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 - with: - name: codecov-system-visualization-tests-windows - files: ./coverage.xml - flags: windows_system_visualization - - - name: Upload pytest test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: pytest-visualization-windows - path: junit/test-results.xml - if: ${{ always() }} - -# # ================================================================================================= -# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -# # ================================================================================================= - - system-tests-visualization-linux: - name: Testing and coverage visualization(Linux) - if: github.event.pull_request.draft == false - needs: [integration-tests] - runs-on: [ self-hosted, Linux, pyaedt ] - env: - ANSYSEM_ROOT251: '/opt/AnsysEM/v251/AnsysEM' - ANS_NODEPCHECK: '1' - steps: - - name: Install Git and checkout project - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: Create virtual environment - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - python -m venv .venv - source .venv/bin/activate - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U - python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U - python -c "import sys; print(sys.executable)" - - - name: Install pyaedt and tests dependencies - run: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - source .venv/bin/activate - pip install --group tests . - - - name: Install CI dependencies (e.g. vtk-osmesa) - run: | - source .venv/bin/activate - # Uninstall conflicting dependencies - pip uninstall --yes vtk - pip install --extra-index-url https://wheels.vtk.org vtk-osmesa - - - name: Run tests marked with 'visualization' - uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 - with: - max_attempts: 2 - retry_on: error - timeout_minutes: 120 - command: | - export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH - source .venv/bin/activate - pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m visualization - - - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 - with: - name: codecov-system-visualization-tests-linux - files: ./coverage.xml - flags: linux_system_visualization - - - name: Upload pytest test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: pytest-visualization-linux - path: junit/test-results.xml - if: ${{ always() }} - - package: - name: Package library - needs: [system-tests-general-windows, - system-tests-general-linux, - system-tests-solvers-windows, - system-tests-solvers-linux, - system-tests-visualization-windows, - system-tests-visualization-linux, - doc-build] - runs-on: ubuntu-latest - permissions: - attestations: write - contents: read - id-token: write - steps: - - name: Build library source and wheel artifacts - uses: ansys/actions/build-library@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - library-name: ${{ env.PACKAGE_NAME }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} - attest-provenance: true - - # TODO: Si if we can fix the PDF issue and leverage classic ansys/release-github - release: - name: Release project - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [package, doc-build] - runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged - environment: release - permissions: - id-token: write - contents: write - steps: - - name: Download the library artifacts from build-library step - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: ${{ env.PACKAGE_NAME }}-artifacts - path: ${{ env.PACKAGE_NAME }}-artifacts - - - name: Release to PyPI using trusted publisher - uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 - with: - repository-url: "https://upload.pypi.org/legacy/" - print-hash: true - packages-dir: ${{ env.PACKAGE_NAME }}-artifacts - skip-existing: false - - - name: Release to GitHub - uses: ansys/actions/release-github@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - library-name: ${{ env.PACKAGE_NAME }} - token: ${{ secrets.GITHUB_TOKEN }} - generate_release_notes: false - add-artifact-attestation-notes: true - - upload-release-doc: - name: Upload release documentation - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - runs-on: ubuntu-latest - needs: [release] - steps: - - name: Deploy the stable documentation - uses: ansys/actions/doc-deploy-stable@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - cname: ${{ env.DOCUMENTATION_CNAME }} - token: ${{ secrets.GITHUB_TOKEN }} - bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} - bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} +# # # ================================================================================================= +# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +# # # ================================================================================================= + +# system-tests-solvers-windows: +# name: Testing solvers and coverage (Windows) +# needs: [integration-tests] +# if: github.event.pull_request.draft == false +# runs-on: [ self-hosted, Windows, pyaedt ] +# steps: +# - name: Install Git and checkout project +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + +# - name: Setup Python +# uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 +# with: +# python-version: ${{ env.MAIN_PYTHON_VERSION }} + +# - name: Create virtual environment +# run: | +# python -m venv .venv +# .venv\Scripts\Activate.ps1 +# python -m pip install pip -U +# python -m pip install wheel setuptools -U +# python -c "import sys; print(sys.executable)" + +# - name: Install pyaedt and tests dependencies +# run: | +# .venv\Scripts\Activate.ps1 +# pip install --group tests . + +# - name: Install CI dependencies (e.g. vtk-osmesa) +# run: | +# .venv\Scripts\Activate.ps1 +# # Uninstall conflicting dependencies +# pip uninstall --yes vtk +# pip install --extra-index-url https://wheels.vtk.org vtk-osmesa + +# - name: Run tests marked with 'solvers' +# env: +# PYTHONMALLOC: malloc +# run: | +# .venv\Scripts\Activate.ps1 +# pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m solvers --deselect=tests/system/solvers/test_45_FilterSolutions + +# - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 +# with: +# name: codecov-system-solvers-tests-windows +# files: ./coverage.xml +# flags: windows_system_solvers + +# - name: Upload pytest test results +# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 +# with: +# name: pytest-solvers-windows +# path: junit/test-results.xml +# if: ${{ always() }} + +# # # ================================================================================================= +# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +# # # ================================================================================================= + +# system-tests-solvers-linux: +# name: Testing solvers and coverage (Linux) +# needs: [integration-tests] +# if: github.event.pull_request.draft == false +# runs-on: [ self-hosted, Linux, pyaedt ] +# env: +# ANSYSEM_ROOT251: '/opt/AnsysEM/v251/AnsysEM' +# ANS_NODEPCHECK: '1' +# steps: +# - name: Install Git and checkout project +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + +# - name: Setup Python +# uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 +# with: +# python-version: ${{ env.MAIN_PYTHON_VERSION }} + +# - name: Create virtual environment +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# python -m venv .venv +# source .venv/bin/activate +# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U +# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U +# python -c "import sys; print(sys.executable)" + +# - name: Install pyaedt and tests dependencies +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# source .venv/bin/activate +# pip install --group tests . + +# - name: Run tests marked with 'solvers' +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# source .venv/bin/activate +# pytest ${{ env.PYTEST_ARGUMENTS }} --timeout=600 -m solvers + +# - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 +# with: +# name: codecov-system-solvers-tests-linux +# files: ./coverage.xml +# flags: linux_system_solvers + +# - name: Upload pytest test results +# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 +# with: +# name: pytest-solvers-linux +# path: junit/test-results.xml +# if: ${{ always() }} + +# # # ================================================================================================= +# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +# # # ================================================================================================= + +# system-tests-general-windows: +# name: Testing and coverage (Windows) +# needs: [integration-tests] +# if: github.event.pull_request.draft == false +# runs-on: [ self-hosted, Windows, pyaedt ] +# steps: +# - name: Install Git and checkout project +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + +# - name: Setup Python +# uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 +# with: +# python-version: ${{ env.MAIN_PYTHON_VERSION }} + +# - name: Create virtual environment +# run: | +# python -m venv .venv +# .venv\Scripts\Activate.ps1 +# python -m pip install pip -U +# python -m pip install wheel setuptools -U +# python -c "import sys; print(sys.executable)" + +# - name: Install pyaedt and tests dependencies +# run: | +# .venv\Scripts\Activate.ps1 +# pip install --group tests . + +# - name: Install CI dependencies (e.g. vtk-osmesa) +# run: | +# .venv\Scripts\Activate.ps1 +# # Uninstall conflicting dependencies +# pip uninstall --yes vtk +# pip install --extra-index-url https://wheels.vtk.org vtk-osmesa + +# - name: Run tests marked with 'general' +# uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 +# env: +# PYTHONMALLOC: malloc +# with: +# max_attempts: 2 +# retry_on: error +# timeout_minutes: 120 +# command: | +# .venv\Scripts\Activate.ps1 +# pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m general + +# - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 +# with: +# name: codecov-system-general-tests-windows +# files: ./coverage.xml +# flags: windows_system_general + +# - name: Upload pytest test results +# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 +# with: +# name: pytest-general-windows +# path: junit/test-results.xml +# if: ${{ always() }} + +# # # ================================================================================================= +# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +# # # ================================================================================================= + +# system-tests-general-linux: +# name: Testing and coverage (Linux) +# if: github.event.pull_request.draft == false +# needs: [integration-tests] +# runs-on: [ self-hosted, Linux, pyaedt ] +# env: +# ANSYSEM_ROOT251: '/opt/AnsysEM/v251/AnsysEM' +# ANS_NODEPCHECK: '1' +# steps: +# - name: Install Git and checkout project +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + +# - name: Setup Python +# uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 +# with: +# python-version: ${{ env.MAIN_PYTHON_VERSION }} + +# - name: Create virtual environment +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# python -m venv .venv +# source .venv/bin/activate +# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U +# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U +# python -c "import sys; print(sys.executable)" + +# - name: Install pyaedt and tests dependencies +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# source .venv/bin/activate +# pip install --group tests . + +# - name: Install CI dependencies (e.g. vtk-osmesa) +# run: | +# source .venv/bin/activate +# # Uninstall conflicting dependencies +# pip uninstall --yes vtk +# pip install --extra-index-url https://wheels.vtk.org vtk-osmesa + +# - name: Run tests marked with 'general' +# uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 +# with: +# max_attempts: 2 +# retry_on: error +# timeout_minutes: 120 +# command: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# source .venv/bin/activate +# pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m general + +# - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 +# with: +# name: codecov-system-general-tests-linux +# files: ./coverage.xml +# flags: linux_system_general + +# - name: Upload pytest test results +# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 +# with: +# name: pytest-general-linux +# path: junit/test-results.xml +# if: ${{ always() }} + + +# # # ================================================================================================= +# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +# # # ================================================================================================= + +# system-tests-visualization-windows: +# name: Testing and coverage Visualization (Windows) +# needs: [integration-tests] +# if: github.event.pull_request.draft == false +# runs-on: [ self-hosted, Windows, pyaedt ] +# steps: +# - name: Install Git and checkout project +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + +# - name: Setup Python +# uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 +# with: +# python-version: ${{ env.MAIN_PYTHON_VERSION }} + +# - name: Create virtual environment +# run: | +# python -m venv .venv +# .venv\Scripts\Activate.ps1 +# python -m pip install pip -U +# python -m pip install wheel setuptools -U +# python -c "import sys; print(sys.executable)" + +# - name: Install pyaedt and tests dependencies +# run: | +# .venv\Scripts\Activate.ps1 +# pip install --group tests . + +# - name: Install CI dependencies (e.g. vtk-osmesa) +# run: | +# .venv\Scripts\Activate.ps1 +# # Uninstall conflicting dependencies +# pip uninstall --yes vtk +# pip install --extra-index-url https://wheels.vtk.org vtk-osmesa + +# - name: Run tests marked with 'visualization' +# uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 +# env: +# PYTHONMALLOC: malloc +# with: +# max_attempts: 2 +# retry_on: error +# timeout_minutes: 120 +# command: | +# .venv\Scripts\Activate.ps1 +# pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m visualization + +# - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 +# with: +# name: codecov-system-visualization-tests-windows +# files: ./coverage.xml +# flags: windows_system_visualization + +# - name: Upload pytest test results +# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 +# with: +# name: pytest-visualization-windows +# path: junit/test-results.xml +# if: ${{ always() }} + +# # # ================================================================================================= +# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +# # # ================================================================================================= + +# system-tests-visualization-linux: +# name: Testing and coverage visualization(Linux) +# if: github.event.pull_request.draft == false +# needs: [integration-tests] +# runs-on: [ self-hosted, Linux, pyaedt ] +# env: +# ANSYSEM_ROOT251: '/opt/AnsysEM/v251/AnsysEM' +# ANS_NODEPCHECK: '1' +# steps: +# - name: Install Git and checkout project +# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + +# - name: Setup Python +# uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 +# with: +# python-version: ${{ env.MAIN_PYTHON_VERSION }} + +# - name: Create virtual environment +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# python -m venv .venv +# source .venv/bin/activate +# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U +# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U +# python -c "import sys; print(sys.executable)" + +# - name: Install pyaedt and tests dependencies +# run: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# source .venv/bin/activate +# pip install --group tests . + +# - name: Install CI dependencies (e.g. vtk-osmesa) +# run: | +# source .venv/bin/activate +# # Uninstall conflicting dependencies +# pip uninstall --yes vtk +# pip install --extra-index-url https://wheels.vtk.org vtk-osmesa + +# - name: Run tests marked with 'visualization' +# uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 +# with: +# max_attempts: 2 +# retry_on: error +# timeout_minutes: 120 +# command: | +# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT251 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH +# source .venv/bin/activate +# pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile --timeout=600 -m visualization + +# - uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2 +# with: +# name: codecov-system-visualization-tests-linux +# files: ./coverage.xml +# flags: linux_system_visualization + +# - name: Upload pytest test results +# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 +# with: +# name: pytest-visualization-linux +# path: junit/test-results.xml +# if: ${{ always() }} + +# package: +# name: Package library +# needs: [system-tests-general-windows, +# system-tests-general-linux, +# system-tests-solvers-windows, +# system-tests-solvers-linux, +# system-tests-visualization-windows, +# system-tests-visualization-linux, +# doc-build] +# runs-on: ubuntu-latest +# permissions: +# attestations: write +# contents: read +# id-token: write +# steps: +# - name: Build library source and wheel artifacts +# uses: ansys/actions/build-library@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 +# with: +# library-name: ${{ env.PACKAGE_NAME }} +# python-version: ${{ env.MAIN_PYTHON_VERSION }} +# attest-provenance: true + +# # TODO: Si if we can fix the PDF issue and leverage classic ansys/release-github +# release: +# name: Release project +# if: github.event_name == 'push' && contains(github.ref, 'refs/tags') +# needs: [package, doc-build] +# runs-on: ubuntu-latest +# # Specifying a GitHub environment is optional, but strongly encouraged +# environment: release +# permissions: +# id-token: write +# contents: write +# steps: +# - name: Download the library artifacts from build-library step +# uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 +# with: +# name: ${{ env.PACKAGE_NAME }}-artifacts +# path: ${{ env.PACKAGE_NAME }}-artifacts + +# - name: Release to PyPI using trusted publisher +# uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 +# with: +# repository-url: "https://upload.pypi.org/legacy/" +# print-hash: true +# packages-dir: ${{ env.PACKAGE_NAME }}-artifacts +# skip-existing: false + +# - name: Release to GitHub +# uses: ansys/actions/release-github@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 +# with: +# library-name: ${{ env.PACKAGE_NAME }} +# token: ${{ secrets.GITHUB_TOKEN }} +# generate_release_notes: false +# add-artifact-attestation-notes: true + +# upload-release-doc: +# name: Upload release documentation +# if: github.event_name == 'push' && contains(github.ref, 'refs/tags') +# runs-on: ubuntu-latest +# needs: [release] +# steps: +# - name: Deploy the stable documentation +# uses: ansys/actions/doc-deploy-stable@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 +# with: +# cname: ${{ env.DOCUMENTATION_CNAME }} +# token: ${{ secrets.GITHUB_TOKEN }} +# bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} +# bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} From b3f83d8f861a8b1e49901d0c987786fccdef00d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 26 May 2025 14:16:57 +0200 Subject: [PATCH 14/19] TESTS: Use both group and optional --- .github/workflows/ci_cd.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 6183ee6f14a..079202236df 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -109,19 +109,21 @@ jobs: # token: ${{ secrets.GITHUB_TOKEN }} # fail-level: 'warning' - # doc-build: - # name: Documentation build - # runs-on: ubuntu-latest - # needs: [doc-style] - # steps: - # - name: Documentation build - # uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - # with: - # dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - # sphinxopts: '-j auto --color -w build_errors.txt' - # check-links: false - # needs-quarto: true + doc-build: + name: Documentation build + runs-on: ubuntu-latest + needs: [doc-style] + steps: + - name: Documentation build + uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + with: + dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" + python-version: ${{ env.MAIN_PYTHON_VERSION }} + sphinxopts: '-j auto --color -w build_errors.txt' + check-links: false + needs-quarto: true + optional-dependencies-name: io + group-dependencies-name: doc # smoke-tests: # name: Build wheelhouse and smoke tests From 4588abe4901ac74bfa73880d51bb9ed3d2b37cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 26 May 2025 14:35:58 +0200 Subject: [PATCH 15/19] test --- .github/workflows/ci_cd.yml | 1 - .github/workflows/label.yml | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index b63a73f3fe3..1abc2d5e06a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -112,7 +112,6 @@ jobs: doc-build: name: Documentation build runs-on: ubuntu-latest - needs: [doc-style] steps: - name: Documentation build uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 97e85ed5c2f..180e2fd9212 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -93,19 +93,3 @@ jobs: - [maintenance](https://github.com/ansys/pyaedt/pulls?q=label%3Amaintenance+) - [release](https://github.com/ansys/pyaedt/pulls?q=label%3Arelease+) - [testing](https://github.com/ansys/pyaedt/pulls?q=label%Atesting+) - - changelog-fragment: - name: "Create changelog fragment" - needs: [labeler] - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: ansys/actions/doc-changelog@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 - with: - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} - use-conventional-commits: true - use-default-towncrier-config: true - bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} - bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} \ No newline at end of file From 9b204b2b9305331c3d96eef5fbfb79dfb69afd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 26 May 2025 15:35:17 +0200 Subject: [PATCH 16/19] test dev branch --- .github/workflows/ci_cd.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 1abc2d5e06a..4af52106666 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -110,7 +110,7 @@ jobs: # fail-level: 'warning' doc-build: - name: Documentation build + name: Documentation build linux runs-on: ubuntu-latest steps: - name: Documentation build @@ -124,6 +124,20 @@ jobs: optional-dependencies-name: io group-dependencies-name: doc + doc-build: + name: Documentation build windows + runs-on: windows-latest + steps: + - name: Documentation build + uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} + sphinxopts: '-j auto --color -w build_errors.txt' + check-links: false + needs-quarto: false + optional-dependencies-name: io + group-dependencies-name: doc + # smoke-tests: # name: Build wheelhouse and smoke tests # runs-on: ${{ matrix.os }} From 7278b06447f3598635c51698726aa306c1d64281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 26 May 2025 16:45:52 +0200 Subject: [PATCH 17/19] tests --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 4af52106666..4a87484c7b8 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -109,7 +109,7 @@ jobs: # token: ${{ secrets.GITHUB_TOKEN }} # fail-level: 'warning' - doc-build: + doc-build-linux: name: Documentation build linux runs-on: ubuntu-latest steps: @@ -124,7 +124,7 @@ jobs: optional-dependencies-name: io group-dependencies-name: doc - doc-build: + doc-build-windows: name: Documentation build windows runs-on: windows-latest steps: From 59dd01ce5693d3d75214419d888bb90ffff69da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 26 May 2025 16:52:13 +0200 Subject: [PATCH 18/19] ref to dev rbanch --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 4a87484c7b8..232ae1617ad 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -114,7 +114,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Documentation build - uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-build@chore/update-pytest-inputs with: dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra" python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -129,7 +129,7 @@ jobs: runs-on: windows-latest steps: - name: Documentation build - uses: ansys/actions/doc-build@2cf9a9c43235a000d613c2b13e64c954232a4553 # v9.0.9 + uses: ansys/actions/doc-build@chore/update-pytest-inputs with: python-version: ${{ env.MAIN_PYTHON_VERSION }} sphinxopts: '-j auto --color -w build_errors.txt' From ab947f917545f8c9d39aea71e8dd1a541bd10246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Fri, 6 Jun 2025 11:08:54 +0200 Subject: [PATCH 19/19] wip --- pyproject.toml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f6df652aff4..5b3855de849 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,26 +100,17 @@ unit-tests = [ "pytest-cov>=4.0.0,<6.2", "mock>=5.1.0,<5.3", ] -integration-tests = [ - "matplotlib>=3.5.0,<3.11", - "numpy>=1.20.0,<2.3", - "pandas>=1.1.0,<2.3", - {include-group = "unit-tests"}, -] tests = [ - "ansys-tools-visualization-interface; python_version >= '3.10'", - "openpyxl>=3.1.0,<3.3", - "osmnx>=1.1.0,<2.1", "pytest-timeout>=2.3.0,<2.5", "pytest-xdist>=3.5.0,<3.7", - "pyvista[io]>=0.38.0,<0.45", - "scikit-rf>=0.30.0,<1.8", - "tables; python_version >= '3.10'", - {include-group = "integration-tests"}, + # Avoid using include-group ftm due to dependabot missing support + "pytest>=7.4.0,<8.4", + "pytest-cov>=4.0.0,<6.2", + "mock>=5.1.0,<5.3", + # {include-group = "unit-tests"}, ] doc = [ "ansys-sphinx-theme>=1.0.0,<1.5", - "jupyter", "numpydoc>=1.5.0,<1.9", "recommonmark", "Sphinx>=7.1.0,<8.3", @@ -129,8 +120,6 @@ doc = [ "sphinx-copybutton>=0.5.0,<0.6", "sphinx-gallery>=0.14.0,<0.20", "sphinx_design>=0.4.0,<0.7", - "pyvista[io]>=0.38.0,<0.45", - "ansys-tools-visualization-interface; python_version >= '3.10'", ] [tool.setuptools.dynamic]