Skip to content

Commit

Permalink
Merge branch 'main' into issue_4779_enable_harmonic_force
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys authored Jun 25, 2024
2 parents 9fc52fe + 369ed4a commit b9b6f1b
Show file tree
Hide file tree
Showing 300 changed files with 15,751 additions and 4,104 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: ['all', 'installer']
exclude:
- python-version: '3.7'
Expand Down Expand Up @@ -205,11 +205,11 @@ jobs:
.venv\Scripts\Activate.ps1
.\doc\make.bat pdf
- name: Add assets to HTML docs
run: |
zip -r documentation-html.zip ./doc/_build/html
mv documentation-html.zip ./doc/_build/html/_static/assets/download/
cp doc/_build/latex/PyAEDT-Documentation-*.pdf ./doc/_build/html/_static/assets/download/pyaedt.pdf
# - name: Add assets to HTML docs
# run: |
# zip -r documentation-html.zip ./doc/_build/html
# mv documentation-html.zip ./doc/_build/html/_static/assets/download/
# cp doc/_build/latex/PyAEDT-Documentation-*.pdf ./doc/_build/html/_static/assets/download/pyaedt.pdf

- name: Upload HTML documentation with examples artifact
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -458,7 +458,7 @@ jobs:
command: |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT241 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT241 }}/Delcross:$LD_LIBRARY_PATH
source .venv/bin/activate
pytest -n 4 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
pytest -n 2 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
- uses: codecov/codecov-action@v4
with:
Expand Down
77 changes: 6 additions & 71 deletions .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
MAIN_PYTHON_VERSION: '3.10'
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 }}

concurrency:
Expand Down Expand Up @@ -83,11 +84,11 @@ jobs:
.venv\Scripts\Activate.ps1
.\doc\make.bat pdf
- name: Add assets to HTML docs
run: |
zip -r documentation-html.zip ./doc/_build/html
mv documentation-html.zip ./doc/_build/html/_static/assets/download/
cp doc/_build/latex/PyAEDT-Documentation-*.pdf ./doc/_build/html/_static/assets/download/pyaedt.pdf
# - name: Add assets to HTML docs
# run: |
# zip -r documentation-html.zip ./doc/_build/html
# mv documentation-html.zip ./doc/_build/html/_static/assets/download/
# cp doc/_build/latex/PyAEDT-Documentation-*.pdf ./doc/_build/html/_static/assets/download/pyaedt.pdf

- name: Upload HTML documentation with examples artifact
uses: actions/upload-artifact@v3
Expand All @@ -103,72 +104,6 @@ jobs:
path: doc/_build/latex/PyAEDT-Documentation-*.pdf
retention-days: 7

# doc-build-without-examples:
# name: Documentation build without examples
# runs-on: ubuntu-latest
# steps:
# - name: Install Git and checkout project
# uses: actions/checkout@v4

# - name: Setup Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.MAIN_PYTHON_VERSION }}

# - name: Update pip
# run: |
# pip install --upgrade pip

# - name: Install pyaedt and documentation dependencies
# run: |
# pip install .[doc-no-examples]

# - name: Retrieve PyAEDT version
# id: version
# run: |
# echo "PYAEDT_VERSION=$(python -c 'from pyaedt import __version__; print(__version__)')" >> $GITHUB_OUTPUT
# echo "PyAEDT version is: $(python -c "from pyaedt import __version__; print(__version__)")"

# - name: Install doc build requirements
# run: |
# sudo apt update
# sudo apt install graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra -y

# # TODO: Update this step once pyaedt-examples is ready
# - name: Build HTML documentation without examples
# run: |
# make -C doc clean
# make -C doc html-no-examples

# # Verify that sphinx generates no warnings
# - name: Check for warnings
# run: |
# python doc/print_errors.py

# - name: Build PDF documentation without examples
# run: |
# make -C doc pdf-no-examples

# - name: Add assets to HTML docs
# run: |
# zip -r documentation-html.zip ./doc/_build/html
# mv documentation-html.zip ./doc/_build/html/_static/assets/download/
# cp doc/_build/latex/PyAEDT-Documentation-*.pdf ./doc/_build/html/_static/assets/download/pyaedt.pdf

# - name: Upload HTML documentation without examples artifact
# uses: actions/upload-artifact@v3
# with:
# name: documentation-no-examples-html
# path: doc/_build/html
# retention-days: 7

# - name: Upload PDF documentation without examples artifact
# uses: actions/upload-artifact@v3
# with:
# name: documentation-pdf
# path: doc/_build/latex/PyAEDT-Documentation-*.pdf
# retention-days: 7

upload-dev-doc:
name: Upload dev documentation
runs-on: ubuntu-latest
Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
args: ['--force-single-line-imports', '--profile', 'black']

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.0
hooks:
- id: flake8
args:
Expand All @@ -48,7 +48,7 @@ repos:

# validate GitHub workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.4
rev: 0.28.6
hooks:
- id: check-github-workflows

Expand All @@ -64,6 +64,14 @@ repos:
hooks:
- id: check-pre-commit-ci-config

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.3.1
hooks:
- id: add-license-headers
files: '(pyaedt|examples|_unittest|_unittest_ironpython|_unittest_solvers)/.*\.(py)'
args:
- --custom_template=mit_license.jinja2
- --start_year=2021

# - repo: https://github.com/numpy/numpydoc
# rev: v1.6.0
Expand Down
29 changes: 29 additions & 0 deletions .reuse/templates/mit_license.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-*- coding: utf-8 -*-

{% for copyright_line in copyright_lines %}
{{ copyright_line }}
{% endfor %}
{% for expression in spdx_expressions %}
SPDX-License-Identifier: {{ expression }}
{% endfor %}


{% if "MIT" in spdx_expressions %}
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
{% endif %}
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
MIT License

Copyright (c) 2021 ANSYS, Inc. All rights reserved.
Copyright (c) 2021 - 2024 ANSYS, Inc. and/or its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*** PyAEDT README
-->


# PyAEDT
[![PyAEDT logo](https://github.com/ansys/pyaedt/blob/main/doc/source/_static/logo.png)](https://aedt.docs.pyansys.com)

<p style="text-align: center;">
<br> English | <a href="README_CN.md">中文</a>
Expand Down
23 changes: 23 additions & 0 deletions _unittest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 - 2024 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
30 changes: 27 additions & 3 deletions _unittest/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 - 2024 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""
Unit Test Configuration Module
-------------------------------
Expand Down Expand Up @@ -175,10 +199,10 @@ def _method(
if not application:
application = Hfss
return application(
projectname=test_project,
designname=design_name,
project=test_project,
design=design_name,
solution_type=solution_type,
specified_version=desktop_version,
version=desktop_version,
non_graphical=NONGRAPHICAL,
)

Expand Down
Binary file added _unittest/example_models/T98/cylinder_mesh.msh
Binary file not shown.
26 changes: 25 additions & 1 deletion _unittest/test_01_3dlayout_edb.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 - 2024 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import os

from _unittest.conftest import config
from _unittest.conftest import local_path
import pytest

from pyaedt import Hfss3dLayout
from pyaedt import is_linux
from pyaedt.generic.settings import is_linux

test_subfolder = "T40"
original_project_name = "ANSYS-HSD_V1"
Expand Down
Loading

0 comments on commit b9b6f1b

Please sign in to comment.