pyedb 0.26.1__py3-none-any.whl → 0.26.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyedb might be problematic. Click here for more details.

pyedb/__init__.py CHANGED
@@ -44,7 +44,7 @@ deprecation_warning()
44
44
  #
45
45
 
46
46
  pyedb_path = os.path.dirname(__file__)
47
- __version__ = "0.26.1"
47
+ __version__ = "0.26.2"
48
48
  version = __version__
49
49
 
50
50
  #
pyedb/dotnet/edb.py CHANGED
@@ -4411,12 +4411,19 @@ class Edb(Database):
4411
4411
  if not temp_directory:
4412
4412
  self.logger.error("Temp directory must be provided when creating model foe arbitrary wave port")
4413
4413
  return False
4414
+ if mounting_side not in ["top", "bottom"]:
4415
+ self.logger.error(
4416
+ "Mounting side must be provided and only `top` or `bottom` are supported. Setting to "
4417
+ "`top` will take the top layer from the current design as reference. Setting to `bottom` "
4418
+ "will take the bottom one."
4419
+ )
4414
4420
  if not output_edb:
4415
4421
  output_edb = os.path.join(temp_directory, "waveport_model.aedb")
4416
4422
  if os.path.isdir(temp_directory):
4417
4423
  shutil.rmtree(temp_directory)
4424
+ os.mkdir(temp_directory)
4418
4425
  reference_layer = list(self.stackup.signal_layers.keys())[0]
4419
- if mounting_side.lower == "bottom":
4426
+ if mounting_side.lower() == "bottom":
4420
4427
  reference_layer = list(self.stackup.signal_layers.keys())[-1]
4421
4428
  if not signal_nets:
4422
4429
  signal_nets = list(self.nets.signal.keys())
@@ -4462,25 +4469,31 @@ class Edb(Database):
4462
4469
  )
4463
4470
  return False
4464
4471
  cloned_edb = Edb(edbpath=output_edb, edbversion=self.edbversion)
4465
- cloned_edb.stackup.add_layer(layer_name="ref", layer_type="signal", thickness=0.0, material="pec")
4472
+
4466
4473
  cloned_edb.stackup.add_layer(
4467
4474
  layer_name="ports",
4468
4475
  layer_type="signal",
4469
4476
  thickness=self.stackup.signal_layers[reference_layer].thickness,
4470
4477
  material="pec",
4471
4478
  )
4472
- box_thick = "100um"
4473
4479
  if launching_box_thickness:
4474
- box_thick = self.edb_value(launching_box_thickness).ToString()
4475
- if mounting_side == "top":
4476
- cloned_edb.stackup.add_layer(
4477
- layer_name="port_pec", layer_type="signal", thickness=box_thick, method="add_on_bottom", material="pec"
4478
- )
4479
- else:
4480
- cloned_edb.stackup.add_layer(
4481
- layer_name="port_pec", layer_type="signal", thickness=box_thick, method="add_on_top", material="pec"
4482
- )
4483
-
4480
+ launching_box_thickness = self.edb_value(launching_box_thickness).ToString()
4481
+ cloned_edb.stackup.add_layer(
4482
+ layer_name="ref",
4483
+ layer_type="signal",
4484
+ thickness=0.0,
4485
+ material="pec",
4486
+ method=f"add_on_{mounting_side}",
4487
+ base_layer="ports",
4488
+ )
4489
+ cloned_edb.stackup.add_layer(
4490
+ layer_name="port_pec",
4491
+ layer_type="signal",
4492
+ thickness=launching_box_thickness,
4493
+ method=f"add_on_{mounting_side}",
4494
+ material="pec",
4495
+ base_layer="ports",
4496
+ )
4484
4497
  for void_info in void_padstacks:
4485
4498
  port_poly = cloned_edb.modeler.create_polygon(
4486
4499
  main_shape=void_info[0].polygon_data._edb_object, layer_name="ref", net_name="GND"
pyedb/siwave.py CHANGED
@@ -11,6 +11,7 @@ from __future__ import absolute_import # noreorder
11
11
  import os
12
12
  from pathlib import Path
13
13
  import pkgutil
14
+ import shutil
14
15
  import sys
15
16
  import tempfile
16
17
  import time
@@ -19,7 +20,7 @@ import warnings
19
20
  from pyedb import Edb
20
21
  from pyedb.dotnet.clr_module import _clr
21
22
  from pyedb.edb_logger import pyedb_logger
22
- from pyedb.generic.general_methods import _pythonver, is_windows
23
+ from pyedb.generic.general_methods import _pythonver, generate_unique_name, is_windows
23
24
  from pyedb.misc.misc import list_installed_ansysem
24
25
  from pyedb.siwave_core.icepak import Icepak
25
26
 
@@ -63,6 +64,11 @@ class Siwave(object): # pragma no cover
63
64
 
64
65
  """
65
66
 
67
+ @property
68
+ def version(self):
69
+ ver = self.oSiwave.GetVersion()
70
+ return ".".join(ver.split(".")[:-1])
71
+
66
72
  @property
67
73
  def version_keys(self):
68
74
  """Version keys for AEDT."""
@@ -330,6 +336,7 @@ class Siwave(object): # pragma no cover
330
336
 
331
337
  """
332
338
  self._main.oSiwave.Quit()
339
+ self._main.oSiwave = None
333
340
  return True
334
341
 
335
342
  def export_element_data(self, simulation_name, file_path, data_type="Vias"):
@@ -509,16 +516,17 @@ class Siwave(object): # pragma no cover
509
516
  # temp_folder = tempfile.TemporaryDirectory(suffix=".ansys")
510
517
  # temp_edb = os.path.join(temp_folder.name, "temp.aedb")
511
518
 
512
- temp_edb = os.path.join(self.file_dir, "temp.aedb")
519
+ temp_edb = os.path.join(tempfile.gettempdir(), generate_unique_name("temp") + ".aedb")
513
520
 
514
521
  self.export_edb(temp_edb)
515
522
  self.oproject.ScrCloseProject()
516
- edbapp = Edb(temp_edb, edbversion=self.current_version)
523
+ edbapp = Edb(temp_edb, edbversion=self.version)
517
524
  edbapp.configuration.load(file_path)
518
525
  edbapp.configuration.run()
519
526
  edbapp.save()
520
527
  edbapp.close()
521
528
  self.import_edb(temp_edb)
529
+ shutil.rmtree(Path(temp_edb), ignore_errors=True)
522
530
 
523
531
  def export_configuration(self, file_path: str):
524
532
  """Export layout information into a configuration file.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyedb
3
- Version: 0.26.1
3
+ Version: 0.26.2
4
4
  Summary: Higher-Level Pythonic Ansys Electronics Data Base
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: PyEDB developers <simon.vandenbrouck@ansys.com>
@@ -19,7 +19,7 @@ Requires-Dist: cffi>=1.16.0,<1.18; platform_system=='Linux'
19
19
  Requires-Dist: pywin32 >= 303;platform_system=='Windows'
20
20
  Requires-Dist: ansys-pythonnet >= 3.1.0rc3
21
21
  Requires-Dist: dotnetcore2 ==3.1.23;platform_system=='Linux'
22
- Requires-Dist: numpy>=1.20.0,<2
22
+ Requires-Dist: numpy>=1.20.0,<2.2
23
23
  Requires-Dist: pandas>=1.1.0,<2.3
24
24
  Requires-Dist: pydantic>=2.6.4,<2.9
25
25
  Requires-Dist: Rtree >= 1.2.0
@@ -27,7 +27,7 @@ Requires-Dist: toml == 0.10.2
27
27
  Requires-Dist: scikit-rf
28
28
  Requires-Dist: ansys-sphinx-theme>=0.10.0,<1.1 ; extra == "doc"
29
29
  Requires-Dist: imageio>=2.30.0,<2.36 ; extra == "doc"
30
- Requires-Dist: ipython>=8.13.0,<8.27 ; extra == "doc"
30
+ Requires-Dist: ipython>=8.13.0,<8.28 ; extra == "doc"
31
31
  Requires-Dist: jupyterlab>=4.0.0,<4.3 ; extra == "doc"
32
32
  Requires-Dist: jupytext>=1.16.0,<1.17 ; extra == "doc"
33
33
  Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "doc"
@@ -1,7 +1,7 @@
1
- pyedb/__init__.py,sha256=5P-p1phekC9hBwBXwS212poYLwxDgwCBxRGH9gisrYg,1521
1
+ pyedb/__init__.py,sha256=RglbscTRC8mmU618z55DRmbE_rhlS0DCjMa8U6X7ukM,1521
2
2
  pyedb/edb_logger.py,sha256=yNkXnoL2me7ubLT6O6r6ElVnkZ1g8fmfFYC_2XJZ1Sw,14950
3
3
  pyedb/exceptions.py,sha256=n94xluzUks6BA24vd_L6HkrvoP_H_l6__hQmqzdCyPo,111
4
- pyedb/siwave.py,sha256=mH3wJ2e-lvAgNjAFRIkLTZ7mUjz7Gp_jm4z-QN66M88,16442
4
+ pyedb/siwave.py,sha256=OT1O7RSC78nmkhzDrwBo8mlWnsIyPCTy8nD1ZZm8BTk,16720
5
5
  pyedb/workflow.py,sha256=Y0ya4FUHwlSmoLP45zjdYLsSpyKduHUSpT9GGK9MGd8,814
6
6
  pyedb/component_libraries/ansys_components.py,sha256=O3ypt832IHY9zG2AD_yrRrbH2KH9P1yFaoi1EO6Zllw,4830
7
7
  pyedb/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -23,7 +23,7 @@ pyedb/configuration/cfg_stackup.py,sha256=CX7uNN5QRoYW_MOObknP8003YchTS7PH9Oee7F
23
23
  pyedb/configuration/configuration.py,sha256=fWYRDI0G4O8cyR1pk0_2RNqBOjKVL0oYRevIVjlV8fo,12944
24
24
  pyedb/dotnet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  pyedb/dotnet/clr_module.py,sha256=Mo13Of3DVSA5HR-5xZEXOiHApIKy52CUxtJ2gPkEu1A,3406
26
- pyedb/dotnet/edb.py,sha256=uyYtlbirX3S62eKdy2fWBgG6fWLmib5PqH8UDxOvPIM,181316
26
+ pyedb/dotnet/edb.py,sha256=B7HYfgZkc-ezrdMIm3wInWAd5zw6ZMM5KdBG3H6y7L0,181695
27
27
  pyedb/dotnet/application/Variables.py,sha256=v_fxFJ6xjyyhk4uaMzWAbP-1FhXGuKsVNuyV1huaPME,77867
28
28
  pyedb/dotnet/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  pyedb/dotnet/edb_core/__init__.py,sha256=nIRLJ8VZLcMAp12zmGsnZ5x2BEEl7q_Kj_KAOXxVjpQ,52
@@ -185,7 +185,7 @@ pyedb/misc/siw_feature_config/xtalk_scan/scan_config.py,sha256=YmYI6WTQulL5Uf8Wx
185
185
  pyedb/misc/siw_feature_config/xtalk_scan/td_xtalk_config.py,sha256=KHa-UqcXuabiVfT2CV-UvWl5Q2qGYHF2Ye9azcAlnXc,3966
186
186
  pyedb/modeler/geometry_operators.py,sha256=g_Sy7a6R23sP6RtboJn1rl8uTuo8oeLmMF21rNkzwjk,74198
187
187
  pyedb/siwave_core/icepak.py,sha256=WnZ-t8mik7LDY06V8hZFV-TxRZJQWK7bu_8Ichx-oBs,5206
188
- pyedb-0.26.1.dist-info/LICENSE,sha256=qQWivZ12ETN5l3QxvTARY-QI5eoRRlyHdwLlAj0Bg5I,1089
189
- pyedb-0.26.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
190
- pyedb-0.26.1.dist-info/METADATA,sha256=drsOCWidauvPnHjR_X5dqv7kGpKq7UxPGZtlLR7ueKg,8386
191
- pyedb-0.26.1.dist-info/RECORD,,
188
+ pyedb-0.26.2.dist-info/LICENSE,sha256=qQWivZ12ETN5l3QxvTARY-QI5eoRRlyHdwLlAj0Bg5I,1089
189
+ pyedb-0.26.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
190
+ pyedb-0.26.2.dist-info/METADATA,sha256=8buRdKWtIIWq5lyQWkomJ_4QUeH5k_hZV8Tj0y97no8,8388
191
+ pyedb-0.26.2.dist-info/RECORD,,
File without changes