Skip to content

Commit

Permalink
Merge branch 'main' into release/0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed Nov 8, 2024
2 parents 21f1909 + b240d8b commit 6838c2f
Show file tree
Hide file tree
Showing 866 changed files with 16,595 additions and 10,136 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.github/* @MaxJPRey @maxcapodi78 @Samuelopez-ansys
.github/* @MaxJPRey @maxcapodi78 @Samuelopez-ansys @SMoraisAnsys

/_unittest/test_26_emit.py @jsalant22 @myoung301
/tests/system/solvers/test_26_emit.py @jsalant22 @myoung301
/src/ansys/aedt/core/emit.py @jsalant22 @myoung301
/src/ansys/aedt/core/emit_core/ @jsalant22 @myoung301
/src/ansys/aedt/core/modeler/circuits/PrimitivesEmit.py @jsalant22 @myoung301
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ body:
- '3.9'
- '3.10'
- '3.11'
- 'IronPython'
- '3.12'
validations:
required: true

Expand Down
8 changes: 5 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ maintenance:
testing:
- changed-files:
- any-glob-to-any-file:
- "_unittest/conftest.py"
- "_unittest_ironpython/run_unittests.py"
- "_unittest_ironpython/run_unittests_batchmode.cmd"
- "tests/conftest.py"
- "tests/unit/conftest.py"
- "tests/system/conftest.py"
- "tests/system/solvers/conftest.py"
- "tests/system/general/conftest.py"

examples:
- changed-files:
Expand Down
115 changes: 67 additions & 48 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ env:
MAIN_PYTHON_VERSION: '3.10'
PACKAGE_NAME: 'PyAEDT'
DOCUMENTATION_CNAME: 'aedt.docs.pyansys.com'
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_HOST_URL: ${{ vars.MEILISEARCH_HOST_URL }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
ON_CI: True
PYTEST_ARGUMENTS: '-vvv --color=yes -ra --durations=25 --maxfail=10 --cov=ansys.aedt.core --cov-report=html --cov-report=xml --junitxml=junit/test-results.xml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -32,13 +30,12 @@ jobs:
name: Check the title of the pull request
runs-on: ubuntu-latest
steps:
- name: Check commit name
- name: Check the title of the pull request
uses: ansys/actions/check-pr-title@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
use-upper-case: true

# TODO: Update to ansys/actions/doc-style@v6
doc-style:
name: Documentation style check
runs-on: ubuntu-latest
Expand All @@ -48,6 +45,19 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

doc-build:
name: Documentation build
runs-on: ubuntu-latest
needs: [doc-style]
steps:
- name: Documentation build
uses: ansys/actions/doc-build@v8
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

smoke-tests:
name: Build wheelhouse and smoke tests
runs-on: ${{ matrix.os }}
Expand All @@ -70,27 +80,42 @@ jobs:
run: |
python -c "import ansys.aedt.core; from ansys.aedt.core import __version__"
doc-build:
name: Documentation build
unit-tests:
name: Running unit tests
needs: [smoke-tests]
runs-on: ubuntu-latest
needs: [doc-style]
steps:
- name: Documentation build
uses: ansys/actions/doc-build@v8
- name: Run unit tests
uses: ansys/actions/tests-pytest@v8
with:
dependencies: "graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra"
pytest-markers: -m unit
pytest-extra-args: ${{ env.PYTEST_ARGUMENTS }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
sphinxopts: '-j auto --color -w build_errors.txt'
check-links: false
optional-dependencies-name: unit-tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-unit-tests
file: ./coverage.xml
flags: unit

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-unit
path: junit/test-results.xml
if: ${{ always() }}

# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================

test-solvers-windows:
system-tests-solvers-windows:
name: Testing solvers and coverage (Windows)
needs: [unit-tests]
if: github.event.pull_request.draft == false
needs: [smoke-tests]
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
Expand All @@ -113,7 +138,6 @@ jobs:
run: |
.venv\Scripts\Activate.ps1
pip install .[tests]
pip install pytest-azurepipelines
- name: Install CI dependencies (e.g. vtk-osmesa)
run: |
Expand All @@ -122,36 +146,35 @@ jobs:
pip uninstall --yes vtk
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
- name: Run tests on _unittest_solvers
- name: Run tests marked with 'solvers'
env:
PYTHONMALLOC: malloc
run: |
.venv\Scripts\Activate.ps1
pytest --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
pytest ${{ env.PYTEST_ARGUMENTS }} -m solvers
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-system-solver-tests
name: codecov-system-solvers-tests-windows
file: ./coverage.xml
flags: system,solver
flags: system,solvers,windows

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-solver-windows
name: pytest-solvers-windows
path: junit/test-results.xml
if: ${{ always() }}

# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================

# TODO: Si if we can use ansys/actions
test-solvers-linux:
system-tests-solvers-linux:
name: Testing solvers and coverage (Linux)
needs: [unit-tests]
if: github.event.pull_request.draft == false
needs: [smoke-tests]
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT242: '/opt/AnsysEM/v242/Linux64'
Expand Down Expand Up @@ -179,36 +202,35 @@ jobs:
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH
source .venv/bin/activate
pip install .[tests]
pip install pytest-azurepipelines
- name: Run tests on _unittest_solvers
- name: Run tests marked with 'solvers'
run: |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH
source .venv/bin/activate
pytest --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
pytest ${{ env.PYTEST_ARGUMENTS }} -m solvers
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-system-solver-tests
name: codecov-system-solvers-tests-linux
file: ./coverage.xml
flags: system,solver
flags: system,solvers,linux

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-solver-linux
name: pytest-solvers-linux
path: junit/test-results.xml
if: ${{ always() }}

# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================

test-windows:
system-tests-general-windows:
name: Testing and coverage (Windows)
needs: [unit-tests]
if: github.event.pull_request.draft == false
needs: [smoke-tests]
runs-on: [ self-hosted, Windows, pyaedt ]
steps:
- name: Install Git and checkout project
Expand All @@ -231,7 +253,6 @@ jobs:
run: |
.venv\Scripts\Activate.ps1
pip install .[tests]
pip install pytest-azurepipelines
- name: Install CI dependencies (e.g. vtk-osmesa)
run: |
Expand All @@ -240,7 +261,7 @@ jobs:
pip uninstall --yes vtk
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
- name: Run tests on _unittest
- name: Run tests marked with 'general'
uses: nick-fields/retry@v3
env:
PYTHONMALLOC: malloc
Expand All @@ -250,31 +271,30 @@ jobs:
timeout_minutes: 50
command: |
.venv\Scripts\Activate.ps1
pytest -n 4 --dist loadfile --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile -m general
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-system-tests
name: codecov-system-general-tests-windows
file: ./coverage.xml
flags: system
flags: system,general,windows

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-windows
name: pytest-general-windows
path: junit/test-results.xml
if: ${{ always() }}

# # =================================================================================================
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# # =================================================================================================

# TODO: Si if we can use ansys/actions
test-linux:
system-tests-general-linux:
name: Testing and coverage (Linux)
if: github.event.pull_request.draft == false
needs: [smoke-tests]
needs: [unit-tests]
runs-on: [ self-hosted, Linux, pyaedt ]
env:
ANSYSEM_ROOT242: '/opt/AnsysEM/v242/Linux64'
Expand Down Expand Up @@ -302,7 +322,6 @@ jobs:
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH
source .venv/bin/activate
pip install .[tests]
pip install pytest-azurepipelines
- name: Install CI dependencies (e.g. vtk-osmesa)
run: |
Expand All @@ -311,7 +330,7 @@ jobs:
pip uninstall --yes vtk
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
- name: Run tests on _unittest
- name: Run tests marked with 'general'
uses: nick-fields/retry@v3
with:
max_attempts: 2
Expand All @@ -320,25 +339,25 @@ jobs:
command: |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH
source .venv/bin/activate
pytest -n 2 --dist loadfile --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
pytest ${{ env.PYTEST_ARGUMENTS }} -n 4 --dist loadfile -m general
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-system-solver-tests
name: codecov-system-general-tests
file: ./coverage.xml
flags: system,solver
flags: system,general,linux

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-linux
name: pytest-general-linux
path: junit/test-results.xml
if: ${{ always() }}

package:
name: Package library
needs: [test-windows, test-solvers-windows, test-linux, test-solvers-linux, doc-build]
needs: [system-tests-general-windows, system-tests-general-linux, system-tests-solvers-windows, system-tests-solvers-linux, doc-build]
runs-on: ubuntu-latest
steps:
- name: Build library source and wheel artifacts
Expand Down
Loading

0 comments on commit 6838c2f

Please sign in to comment.