Skip to content

Commit

Permalink
Merge branch 'main' into docs/use-ansys-autoapi
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Jun 23, 2024
2 parents a6407b8 + e337a7f commit 362b6ee
Show file tree
Hide file tree
Showing 32 changed files with 6,140 additions and 108 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
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
76 changes: 5 additions & 71 deletions .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,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 @@ -104,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 ansys.aedt import __version__; print(__version__)')" >> $GITHUB_OUTPUT
# echo "PyAEDT version is: $(python -c "from ansys.aedt 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
15 changes: 15 additions & 0 deletions _unittest/test_28_Maxwell3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ def test_32a_matrix(self, add_app):
rectangle3 = m3d.modeler.create_rectangle(0, [16.5, 1.5, 0], [2.5, 5], name="Sheet3")
rectangle4 = m3d.modeler.create_rectangle(0, [32.5, 1.5, 0], [2.5, 5], name="Sheet4")

m3d.modeler.create_polyline(points=[[1, 2.75, 2.5], [8.5, 2.75, 2.5]], name="line_test")

m3d.assign_current(rectangle1.faces[0], amplitude=1, name="Cur1")
m3d.assign_current(rectangle2.faces[0], amplitude=1, name="Cur2")
m3d.assign_current(rectangle3.faces[0], amplitude=1, name="Cur3")
Expand Down Expand Up @@ -606,6 +608,19 @@ def test_32c_post_processing(self):
data = self.aedtapp.post.get_solution_data(expressions=expressions, context="Matrix1")
assert data

report = self.aedtapp.post.create_report(
expressions="Mag_H", context="line_test", primary_sweep_variable="Distance", report_category="Fields"
)
assert report.expressions == ["Mag_H"]
assert report.polyline == "line_test"
data = self.aedtapp.post.get_solution_data(
expressions=["Mag_H"],
context="line_test",
report_category="Fields",
primary_sweep_variable="Distance",
)
assert data

def test_33_mesh_settings(self):
assert self.aedtapp.mesh.initial_mesh_settings
assert self.aedtapp.mesh.initial_mesh_settings.props
Expand Down
Loading

0 comments on commit 362b6ee

Please sign in to comment.