Skip to content

Commit

Permalink
Merge branch 'main' into create_region_q2d
Browse files Browse the repository at this point in the history
  • Loading branch information
tizianrot authored Oct 23, 2023
2 parents b2c73dd + f8c7692 commit 7e8301c
Show file tree
Hide file tree
Showing 27 changed files with 473 additions and 315 deletions.
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ testing:
- _unittest/conftest.py
- _unittest_ironpython/run_unittests.py
- _unittest_ironpython/run_unittests_batchmode.cmd
# TODO : Remove once EDB is extracted from PyAEDT
edb:
- examples/00-EDB/**
- examples/01-HFSS3DLayout/EDB_in_3DLayout.py
- examples/05-Q3D/Q3D_from_EDB.py
- pyaedt/edb_core/**
- pyaedt/edb.py
4 changes: 4 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
- name: testing
description: Anything related to testing
color: 5802B8

- name: edb
description: Anything related to the EDB API
color: C4C25D
36 changes: 18 additions & 18 deletions .github/workflows/full_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:
testenv\Scripts\Activate.ps1
sphinx-build -j auto --color -b html -a doc/source doc/_build/html
- name: Create PDF Documentations
run: |
testenv\Scripts\Activate.ps1
.\doc\make.bat pdf
# - name: Create PDF Documentations
# run: |
# testenv\Scripts\Activate.ps1
# .\doc\make.bat pdf

- name: Upload HTML documentation artifact
uses: actions/upload-artifact@v3
Expand All @@ -92,20 +92,20 @@ jobs:
path: doc/_build/html/EDBAPI
retention-days: 7

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

- name: Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
generate_release_notes: true
files: |
doc/_build/pdf
# - name: Upload PDF documentation artifact
# uses: actions/upload-artifact@v3
# with:
# name: documentation-pdf
# path: doc/_build/pdf
# retention-days: 7

# - name: Release
# uses: softprops/action-gh-release@v1
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# with:
# generate_release_notes: true
# files: |
# doc/_build/pdf

doc-deploy-stable:
name: Deploy stable documentation
Expand Down
6 changes: 6 additions & 0 deletions _unittest/test_00_EDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,11 @@ def test_130_create_padstack_instance(self):
assert pad_instance3.dcir_equipotential_region
pad_instance3.dcir_equipotential_region = False
assert not pad_instance3.dcir_equipotential_region

trace = edb.modeler.create_trace([[0, 0], [0, 10e-3]], "1_Top", "0.1mm", "trace_with_via_fence")
edb.padstacks.create_padstack("via_0")
trace.create_via_fence("1mm", "1mm", "via_0")

edb.close()

def test_131_assign_hfss_extent_non_multiple_with_simconfig(self):
Expand Down Expand Up @@ -2903,6 +2908,7 @@ def test_147_find_dc_shorts(self):
assert dc_shorts
edbapp.nets.nets["DDR4_A0"].name = "DDR4$A0"
edbapp.layout_validation.illegal_net_names(True)
edbapp.layout_validation.illegal_rlc_values(True)

# assert len(dc_shorts) == 20
assert ["LVDS_CH09_N", "GND"] in dc_shorts
Expand Down
42 changes: 42 additions & 0 deletions _unittest/test_08_Primitives3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ def test_43_fillet_and_undo(self):
assert o.edges[0].fillet()
self.aedtapp._odesign.Undo()
assert o.edges[0].fillet()
r = self.create_rectangle(name="MyRect")
assert not r.edges[0].fillet()

def test_44_create_polyline_basic_segments(self):
prim3D = self.aedtapp.modeler
Expand Down Expand Up @@ -1789,3 +1791,43 @@ def test_85_insert_layoutcomponent(self):
assert comp2.layout_component.display_mode == 1
comp2.layout_component.layers["Trace"] = [True, True, 90]
assert comp2.layout_component.update_visibility()

def test_87_set_mesh_fusion_settings(self):
self.aedtapp.insert_design("MeshFusionSettings")
box1 = self.aedtapp.modeler.create_box([0, 0, 0], [10, 20, 30])
obj_3dcomp = self.aedtapp.modeler.replace_3dcomponent(
object_list=[box1.name],
)
box2 = self.aedtapp.modeler.create_box([0, 0, 0], [100, 20, 30])
obj2_3dcomp = self.aedtapp.modeler.replace_3dcomponent(
object_list=[box2.name],
)
assert self.aedtapp.set_mesh_fusion_settings(component=obj2_3dcomp.name, volume_padding=None, priority=None)

assert self.aedtapp.set_mesh_fusion_settings(
component=[obj_3dcomp.name, obj2_3dcomp.name, "Dummy"], volume_padding=None, priority=None
)

assert self.aedtapp.set_mesh_fusion_settings(
component=[obj_3dcomp.name, obj2_3dcomp.name],
volume_padding=[[0, 5, 0, 0, 0, 1], [0, 0, 0, 2, 0, 0]],
priority=None,
)
assert not self.aedtapp.set_mesh_fusion_settings(
component=[obj_3dcomp.name, obj2_3dcomp.name], volume_padding=[[0, 0, 0, 2, 0, 0]], priority=None
)

assert self.aedtapp.set_mesh_fusion_settings(
component=[obj_3dcomp.name, obj2_3dcomp.name], volume_padding=None, priority=[obj2_3dcomp.name, "Dummy"]
)

assert self.aedtapp.set_mesh_fusion_settings(
component=[obj_3dcomp.name, obj2_3dcomp.name],
volume_padding=[[0, 5, 0, 0, 0, 1], [10, 0, 0, 2, 0, 0]],
priority=[obj_3dcomp.name],
)
assert self.aedtapp.set_mesh_fusion_settings(
component=None,
volume_padding=None,
priority=None,
)
65 changes: 2 additions & 63 deletions doc/source/Getting_started/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Starting from 2023R2, a Ribbon button is available in Automation Tab as in the e
Build Toolkits with PyAEDT
~~~~~~~~~~~~~~~~~~~~~~~~~~
You can create and install external toolkits.
The template provides a framework to create your own toolkits using PyAEDT.
The template can be found at `Template <https://aedt.toolkit.template.docs.pyansys.com/>`_.
The Antenna Wizard toolkit provides an example for modeling antennas using Ansys Electronics Desktop (AEDT).
The Antenna Wizard can be found at `Antenna Wizard <https://github.com/ansys/pyaedt-toolkits-antenna/>`_.

.. image:: ../Resources/template_ribbon.png
:width: 800
Expand Down Expand Up @@ -97,67 +97,6 @@ For example, on Windows with Python 3.7, install PyAEDT and all its dependencies
pip install --no-cache-dir --no-index --find-links=file:///<path_to_wheelhouse>/PyAEDT-v<release_version>-wheelhouse-Windows-3.7 pyaedt
Install from a batch file
~~~~~~~~~~~~~~~~~~~~~~~~~
If you are running on Windows, you can download
:download:`PyAEDT Environment with IDE bat file <../Resources/pyaedt_with_IDE.bat>`
and run this batch file on your local machine. Using this approach
provides you with a complete integrated development environment (IDE)
for writing PyAEDT scripts in Windows with a simple batch file.

This batch file executes these steps:

1. Creates a Python virtual environment in your ``%APPDATA%`` folder. To accomplish
this, it uses CPython in the selected version of AEDT available on your machine.
2. Installs PyAEDT.
3. Optionally installs `Spyder <https://www.spyder-ide.org/>`_ with -s flag.
4. Installs `Jupyter Lab <https://jupyter.org/>`_.
5. Creates a symbolic link from your PyAEDT installation to AEDT ``PersonalLib`` so
that scripts can also be run within AEDT.
6. Updates PyAEDT.
7. Install PyAEDT toolkit in AEDT to enable PyAEDT Console and PyAEDT Run Script.
8. Runs the tool that you choose (Spyder, Jupyter Lab, or a simple console).

.. image:: ../Resources/toolkits.png
:width: 800
:alt: PyAEDT toolkit installed after batch run

Steps 1 through 5 are executed only the first time that you run the batch file or when ``-f`` is used:

.. code::
pyaedt_with_IDE.bat --force-install
pyaedt_with_IDE.bat -f
Step 6 is executed only when running the command with the ``-update`` option:

.. code::
pyaedt_with_IDE.bat --update
pyaedt_with_IDE.bat -u
Optionally, you can decide to pass a Python path. This path is then used to create a virtual environment:

.. code::
pyaedt_with_IDE.bat -f -p <path-to-python-root-folder>
In addition, it is possible to install the PyAEDT package and all its dependencies provided in the wheelhouse by
executing the batch file mentioned earlier. You must use the Wheelhouse 3.7 package if no Python path is provided.
Otherwise, you must download and use the correct wheelhouse:

.. code::
pyaedt_with_IDE.bat-w <path_to_wheelhouse>PyAEDT-v<release_version>-wheelhouse-Windows-3.7
pyaedt_with_IDE.bat -p <path-to-python3.8-root-folder> -w <path_to_wheelhouse>PyAEDT-v<release_version>-wheelhouse-Windows-3.8
pyaedt_with_IDE.bat -p <path-to-python3.7-root-folder> -w <path_to_wheelhouse>PyAEDT-v<release_version>-wheelhouse-Windows-3.7
pyaedt_with_IDE.bat -p <path-to-python3.9-root-folder> -w <path_to_wheelhouse>PyAEDT-v<release_version>-wheelhouse-Windows-3.9
Use IronPython in AEDT
~~~~~~~~~~~~~~~~~~~~~~
PyAEDT is designed to work in CPython 3.7+ and supports many advanced processing packages like
Expand Down
152 changes: 0 additions & 152 deletions doc/source/Resources/pyaedt_with_IDE.bat

This file was deleted.

4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def setup(app):

# Intersphinx mapping
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"python": ("https://docs.python.org/3.11", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"numpy": ("https://numpy.org/devdocs", None),
"matplotlib": ("https://matplotlib.org/stable", None),
Expand Down Expand Up @@ -379,4 +379,4 @@ def setup(app):
author,
"manual",
),
]
]
Loading

0 comments on commit 7e8301c

Please sign in to comment.