Skip to content

Commit

Permalink
Merge branch 'main' into release/0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed Apr 16, 2024
2 parents b1e5955 + e4153f5 commit 7d6b14b
Show file tree
Hide file tree
Showing 176 changed files with 12,911 additions and 7,622 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
vale-version: "2.29.6"

docs_build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -74,26 +74,38 @@ jobs:

- name: Install doc build requirements
run: |
sudo apt install graphviz
sudo apt update
sudo apt install graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra -y
# run doc build, without creating the examples directory
# note that we have to add the examples file here since it won't
# be created as gallery is disabled on linux.
- name: Documentation Build
- name: Documentation Build (HTML)
run: |
make -C doc clean
mkdir doc/source/examples -p
echo $'Examples\n========' > doc/source/examples/index.rst
make -C doc html SPHINXOPTS="-j auto -w build_errors.txt -N"
make -C doc phtml-no-examples SPHINXOPTS="-j auto -w build_errors.txt -N"
# Verify that sphinx generates no warnings
- name: Check for warnings
run: |
python doc/print_errors.py
# - name: Upload Documentation
# uses: actions/upload-artifact@v4
# with:
# name: Documentation
# path: doc/_build/html
# retention-days: 7
- name: Upload Documentation
uses: actions/upload-artifact@v3
with:
name: Documentation
path: doc/_build/html
retention-days: 7

- name: Documentation Build (PDF)
run: |
make -C doc pdf-no-examples
- name: Upload documentation PDF artifact
uses: actions/upload-artifact@v3
with:
name: Documentation-pdf
path: doc/_build/latex/*.pdf
retention-days: 7
36 changes: 32 additions & 4 deletions .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,32 @@ jobs:
run: |
pip install .[doc]
- name: Full Documentation Build
- name: Install doc build requirements
run: |
sudo apt update
sudo apt install graphviz texlive-latex-extra latexmk texlive-xetex texlive-fonts-extra -y
- name: Documentation Build (HTML)
run: |
make -C doc clean
mkdir doc/source/examples -p
echo $'Examples\n========' > doc/source/examples/index.rst
make -C doc phtml-no-examples SPHINXOPTS="-j auto -w build_errors.txt -N"
# Verify that sphinx generates no warnings
- name: Check for warnings
run: |
python doc/print_errors.py
- name: Documentation Build (PDF)
run: |
make -C doc phtml
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 documentation HTML artifact
uses: actions/upload-artifact@v3
Expand All @@ -46,13 +69,18 @@ jobs:
path: doc/_build/html
retention-days: 7

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

docs_upload:
needs: docs_build
runs-on: ubuntu-latest
steps:

- name: Deploy development documentation
- name: Upload development documentation
uses: ansys/actions/doc-deploy-dev@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: 'Unit testing'
uses: nick-fields/retry@v3
with:
max_attempts: 3
max_attempts: 1
retry_on: error
timeout_minutes: 40
command: |
Expand Down Expand Up @@ -132,13 +132,13 @@ jobs:
- name: 'Unit testing'
uses: nick-fields/retry@v3
with:
max_attempts: 3
max_attempts: 2
retry_on: error
timeout_minutes: 50
command: |
testenv\Scripts\Activate.ps1
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
pytest -n 6 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
pytest -n 4 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
- uses: codecov/codecov-action@v4
env:
Expand Down
14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exclude: |
repos:
- repo: https://github.com/psf/black
rev: 24.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
rev: 24.4.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black
args:
Expand Down Expand Up @@ -41,22 +41,28 @@ repos:
- tomli

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: debug-statements
- id: trailing-whitespace

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

- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.3.0]
additional_dependencies: [black==24.4.0]

# This validates our pre-commit.ci configuration
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config


# - repo: https://github.com/numpy/numpydoc
Expand Down
2 changes: 1 addition & 1 deletion _unittest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
settings.enable_error_handler = False
settings.enable_desktop_logs = False
settings.desktop_launch_timeout = 180

settings.release_on_exception = False

from pyaedt import Edb
from pyaedt import Hfss
Expand Down
2 changes: 1 addition & 1 deletion _unittest/example_models/T03/iron_pyaedt.amat
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ GUID: 04b3107f-45c5-4e7c-bdd6-3bf3cffc2ef2'
Y('0.996931', '1.09554', '1.17332', '1.23238', '1.27806', '1.31149', '1.33712', '1.3594', '1.37946', '1.40174', '1.43406', '1.53657')
$end '$Thermal_expansion_coefficient_with_temperature_1'
$end 'RefDatasets'
$end 'iron_pyaedt'
$end 'iron_pyaedt'
2 changes: 1 addition & 1 deletion _unittest/example_models/T03/material_sample.amat
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ $begin '$index$'
$base_index$(pos=0, lin=1, lvl=0)
$index$(pos=2021, lin=72, lvl=0)
$end '$index$'
$end '$index$'
$end '$index$'
Binary file added _unittest/example_models/T12/EMI_RCV_241.aedtz
Binary file not shown.
2 changes: 1 addition & 1 deletion _unittest/example_models/T13/material_sample.amat
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ $begin '$index$'
$base_index$(pos=0, lin=1, lvl=0)
$index$(pos=2021, lin=72, lvl=0)
$end '$index$'
$end '$index$'
$end '$index$'
Loading

0 comments on commit 7d6b14b

Please sign in to comment.