Skip to content

Commit ec70424

Browse files
Merge remote-tracking branch 'origin/main' into fix/issue_3422
2 parents 03dea0e + 90f0caa commit ec70424

File tree

91 files changed

+7923
-1885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+7923
-1885
lines changed

Diff for: .github/workflows/unit_tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
- name: 'Unit testing'
7070
uses: nick-fields/retry@v3
7171
with:
72-
max_attempts: 3
72+
max_attempts: 1
7373
retry_on: error
7474
timeout_minutes: 40
7575
command: |
@@ -132,13 +132,13 @@ jobs:
132132
- name: 'Unit testing'
133133
uses: nick-fields/retry@v3
134134
with:
135-
max_attempts: 3
135+
max_attempts: 2
136136
retry_on: error
137137
timeout_minutes: 50
138138
command: |
139139
testenv\Scripts\Activate.ps1
140140
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
141-
pytest -n 6 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
141+
pytest -n 4 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
142142
143143
- uses: codecov/codecov-action@v4
144144
env:

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848

4949
# validate GitHub workflow files
5050
- repo: https://github.com/python-jsonschema/check-jsonschema
51-
rev: 0.28.0
51+
rev: 0.28.1
5252
hooks:
5353
- id: check-github-workflows
5454

Diff for: _unittest/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
settings.enable_error_handler = False
3939
settings.enable_desktop_logs = False
4040
settings.desktop_launch_timeout = 180
41-
41+
settings.release_on_exception = False
4242

4343
from pyaedt import Edb
4444
from pyaedt import Hfss

Diff for: _unittest/example_models/T21/SSN_custom.s6p

+5,084
Large diffs are not rendered by default.

Diff for: _unittest/example_models/T21/pcieg5_32gt.ami

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
|******************************************************************************
2+
| Spec. AMI model generated by SPISim's BPro, Generated on 20170831143940
3+
|
4+
| IP of this model belongs to SPISim or its licensed BPro user.
5+
|*****************************************************************************
6+
(ANSYS_PCIeG5_32GT_RX
7+
(Description "Example PCIeG5 Rx 32GT model")
8+
(Reserved_Parameters
9+
(AMI_Version (Usage Info) (Type String) (Value "6.1") (Description "Supported AMI version"))
10+
(Ignore_Bits (Usage Info) (Type Integer) (Default 500) (Description "Ignore four bits to fill up tapped delay line."))
11+
(Max_Init_Aggressors (Usage Info) (Type Integer) (Default 25) (Description "Number of aggressors is actually unlimited."))
12+
(Init_Returns_Impulse (Usage Info) (Type Boolean) (Default True) (Description "Both impulse and parameters_out returned."))
13+
(Supporting_Files (Usage Info) (Type String) (Table ("PCIeG5_32GT.ens")) (Description "CTLE Performance table"))
14+
(GetWave_Exists (Usage Info) (Type Boolean) (Default True) (Description "GetWave is well and truly provided in the module."))
15+
) | End Reserved_Parameters
16+
17+
|****************************************************************************
18+
| Remove or tamper LICENSE_INFO values will cause simulation being aborted!
19+
|****************************************************************************
20+
(Model_Specific
21+
(LICENSE_INFO (Usage In) (Type String) (Default "LICENSED_ANSYS_AEDT_E168EFCC0268A84087F7B23B510CB41F") (Description "Licensing info."))
22+
| ------------------ MAIN Settings ------------------
23+
(MDL_SUB_MODS (Usage In) (Type String) (Default "CTLE,DFE") (Description "Cascaded stages"))
24+
| ------------------ CTLE Settings ------------------
25+
(MDL_IDX_FILE (Usage In) (Type String) (Default "PCIeG5_32GT.ens") (Description "Params index table"))
26+
(MDL_IDX_VALU (Usage In) (Type String) (Default "-1") (Description "Params table rowID"))
27+
(ADC (Usage In) (Type Integer) (Range -5 -15 -5) (Default -5) (Description "DC Gain in dB"))
28+
|(CTLE_OUPT_FILE (Usage In) (Type String) (Default "C:/Temp/WorkSpace/SPISim/CST/PCIe/32GT/PCIeG5_32GT.csv") (Description "Output generated FD array for checking purpose"))
29+
) | End Model_Specific
30+
) | End SPISim_SPEC_AMI

Diff for: _unittest/example_models/T21/pcieg5_32gt.ibs

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
|***************************************************************************
2+
|
3+
[IBIS Ver] 5.1
4+
[File name] pcieg5_32gt.ibs
5+
[File rev] 1.00
6+
[Date] Jan 1, 2017
7+
[Source] BPro (http://www.spisim.com)
8+
[Copyright] Copyright 2017 ~, SPISim LLC. All right reserved.
9+
|
10+
|***************************************************************************
11+
|
12+
[Component] Spec_Model
13+
[Manufacturer] SPISim LLC
14+
[Package]
15+
| typ min max
16+
R_pkg 0.0 0.0 0.0
17+
L_pkg 0.0 0.0 0.0
18+
C_pkg 0.0 0.0 0.0
19+
|
20+
|***************************************************************************
21+
|
22+
[PIN] signal_name model_name R_pin L_pin C_pin
23+
1p TxP Tx NA NA NA
24+
1n TxN Tx NA NA NA
25+
2p RxP Rx NA NA NA
26+
2n RxN Rx NA NA NA
27+
|
28+
|***************************************************************************
29+
|
30+
[Diff Pin] inv_pin vdiff tdelay_typ tdelay_min tdelay_max
31+
1p 1n 0.1V NA NA NA
32+
2p 2n 0.1V NA NA NA
33+
|
34+
|****************************************************************
35+
|
36+
[Model] Rx
37+
Model_type Input
38+
|
39+
C_comp 0.00p 0.00p 0.00p
40+
Vinh = 0.55
41+
Vinl = 0.45
42+
|
43+
[Temperature_Range] 25 100 0
44+
[Voltage Range] 1.2 1.14 1.26
45+
|
46+
| The IV table below is equivalent to 50 ohms single-ended load
47+
[GND Clamp]
48+
-6.6 -0.132 -0.132 -0.132
49+
0.0 0.0 0.0 0.0
50+
6.6 0.132 0.132 0.132
51+
52+
[Power Clamp]
53+
-6.6 0.132e-9 0.132e-9 0.132e-9
54+
0.0 0.0 0.0 0.0
55+
6.6 -0.132e-9 -0.132e-9 -0.132e-9
56+
57+
[Algorithmic Model]
58+
Executable Windows_VisualStudio_32 pcieg5_32gt_WIN32.dll pcieg5_32gt.ami
59+
Executable Windows_VisualStudio_64 pcieg5_32gt_WIN64.dll pcieg5_32gt.ami
60+
Executable Linux_gcc_64 pcieg5_32gt_LX64.so pcieg5_32gt.ami
61+
[End Algorithmic Model]
62+
63+
|
64+
|***************************************************************************
65+
|
66+
[Model] Tx
67+
Model_type Output
68+
Polarity Non-Inverting
69+
Enable Active-High
70+
|
71+
Vmeas = 0.55
72+
| typ min max
73+
C_comp 0 0 0
74+
[Voltage Range] 1.1 1.0 1.2
75+
[Temperature Range] 60 100 0
76+
|
77+
|***************************************************************************
78+
|
79+
[Pulldown]
80+
-2.500 -5.00000E-02 -5.00000E-02 -5.00000E-02
81+
0.000 +0.00000E+00 +0.00000E+00 +0.00000E+00
82+
2.500 +5.00000E-02 +5.00000E-02 +5.00000E-02
83+
[Pullup]
84+
-2.500 +5.00000E-02 +5.00000E-02 +5.00000E-02
85+
0.000 +0.00000E+00 +0.00000E+00 +0.00000E+00
86+
2.500 -5.00000E-02 -5.00000E-02 -5.00000E-02
87+
|
88+
[Ramp]
89+
dV/dt_r 0.2796/15p 0.2610/23.5p 0.2976/13p
90+
dV/dt_f 0.2796/15p 0.2610/23.5p 0.2976/13p
91+
|
92+
|
93+
[Algorithmic Model]
94+
Executable Windows_VisualStudio_32 pcieg5_32gt_WIN32.dll pcieg5_32gt.ami
95+
Executable Windows_VisualStudio_64 pcieg5_32gt_WIN64.dll pcieg5_32gt.ami
96+
Executable Linux_gcc_64 pcieg5_32gt_LX64.so pcieg5_32gt.ami
97+
[End Algorithmic Model]
98+
99+
|***************************************************************************
100+
[End]

Diff for: _unittest/test_01_3dlayout_edb.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def test_15_3dplacement(self):
307307

308308
def test_16_differential_ports(self):
309309
self.aedtapp.set_active_design(self.design_name)
310-
pins = self.aedtapp.modeler.components["R3"].pins
310+
pins = list(self.aedtapp.modeler.components["R3"].pins.keys())
311311
assert self.aedtapp.create_differential_port(pins[0], pins[1], "test_differential", deembed=True)
312312
assert "test_differential" in self.aedtapp.port_list
313313

@@ -376,3 +376,15 @@ def test_22_change_design_settings(self):
376376
assert (
377377
self.aedtapp.get_oo_property_value(self.aedtapp.odesign, "Design Settings", "DCExtrapolation") == "Advanced"
378378
)
379+
380+
def test_23_dissolve_element(self):
381+
comp = self.aedtapp.modeler.components["D1"]
382+
pins = {name: pin for name, pin in comp.pins.items() if name in ["D1-1", "D1-2", "D1-7"]}
383+
self.aedtapp.dissolve_component("D1")
384+
comp = self.aedtapp.modeler.create_components_on_pins(list(pins.keys()))
385+
nets = [
386+
list(pins.values())[0].net_name,
387+
list(pins.values())[1].net_name,
388+
]
389+
assert self.aedtapp.create_ports_on_component_by_nets(comp.name, nets)
390+
assert self.aedtapp.create_pec_on_component_by_nets(comp.name, "GND")

Diff for: _unittest/test_03_Materials.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,18 @@ def test_02_create_material(self):
9292
assert mat1.get_curve_coreloss_type() == "Power Ferrite"
9393
assert isinstance(mat1.material_appearance, list)
9494

95-
mat1.material_appearance = [11, 22, 0]
96-
assert mat1.material_appearance == [11, 22, 0]
97-
mat1.material_appearance = ["11", "22", "10"]
98-
assert mat1.material_appearance == [11, 22, 10]
95+
mat1.material_appearance = [11, 22, 0, 0.5]
96+
assert mat1.material_appearance == [11, 22, 0, 0.5]
97+
mat1.material_appearance = ["11", "22", "10", "0.5"]
98+
assert mat1.material_appearance == [11, 22, 10, 0.5]
9999
with pytest.raises(ValueError):
100-
mat1.material_appearance = [11, 22, 300]
100+
mat1.material_appearance = [11, 22, 300, 0.5]
101101
with pytest.raises(ValueError):
102-
mat1.material_appearance = [11, -22, 0]
102+
mat1.material_appearance = [11, 22, 100, 1.5]
103+
with pytest.raises(ValueError):
104+
mat1.material_appearance = [11, -22, 0, 0.5]
105+
with pytest.raises(ValueError):
106+
mat1.material_appearance = [11, 22, 0, -1]
103107
with pytest.raises(ValueError):
104108
mat1.material_appearance = [11, 22]
105109

Diff for: _unittest/test_04_SBR.py

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def init(self, aedtapp, local_scratch):
5858
def test_01_open_source(self, source):
5959
assert self.aedtapp.create_sbr_linked_antenna(source, target_cs="feederPosition", fieldtype="farfield")
6060
assert len(self.aedtapp.native_components) == 1
61+
assert self.aedtapp.create_sbr_linked_antenna(
62+
source, target_cs="feederPosition", fieldtype="farfield", source_name="LinkedAntenna"
63+
)
64+
assert len(self.aedtapp.native_components) == 2
6165

6266
def test_02_add_antennas(self):
6367
self.aedtapp.insert_design("add_antennas")

Diff for: _unittest/test_07_Object3D.py

+2
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ def test_07_object_clone_and_get_properties(self):
226226
assert len(new_object.faces) == 6
227227
assert len(new_object.edges) == 12
228228
assert new_object.display_wireframe == initial_object.display_wireframe
229+
new_object.name = "Properties_Box"
230+
assert not new_object.name == "Properties_Box"
229231

230232
def test_08_set_model(self):
231233
o = self.create_copper_box()

0 commit comments

Comments
 (0)