Skip to content

Commit

Permalink
Merge branch 'main' into ci/documentation_worklfow
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev authored Nov 30, 2023
2 parents a185d0c + 5eecead commit d948c3f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion doc/source/EDBAPI/CoreEdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It can be opened and edited using the ``Edb`` class.
.. autosummary::
:toctree: _autosummary

pyedb.legacy.edb
pyedb.legacy.edb.EdbLegacy
pyedb.legacy.edb_core.edb_data.variables.Variable
pyedb.legacy.edb_core.edb_data.edbvalue.EdbValue

Expand Down
53 changes: 33 additions & 20 deletions src/pyedb/legacy/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class EdbLegacy(Database):
Create an ``Edb`` object and a new EDB cell.
>>> from pyedb.legacy.edb import EdbLegacy
>>> app = Edb()
>>> app = EdbLegacy()
Add a new variable named "s1" to the ``Edb`` instance.
Expand All @@ -125,12 +125,12 @@ class EdbLegacy(Database):
Create an ``Edb`` object and open the specified project.
>>> app = Edb("myfile.aedb")
>>> app = EdbLegacy("myfile.aedb")
Create an ``Edb`` object from GDS and control files.
The XML control file resides in the same directory as the GDS file: (myfile.xml).
>>> app = Edb("/path/to/file/myfile.gds")
>>> app = EdbLegacy("/path/to/file/myfile.gds")
"""

Expand Down Expand Up @@ -228,7 +228,7 @@ def __getitem__(self, variable_name):
Returns
-------
:class:`legacy.edb_core.edb_data.variables.Variable`
:class:`pyedb.legacy.edb_core.edb_data.variables.Variable`
"""
if self.variable_exists(variable_name)[0]:
Expand Down Expand Up @@ -273,8 +273,6 @@ def _clean_variables(self):
self._variables = None
self._active_cell = None
self._layout = None
# time.sleep(2)
# gc.collect()

@pyedb_function_handler()
def _init_objects(self):
Expand Down Expand Up @@ -306,7 +304,7 @@ def design_variables(self):
Returns
-------
Dict[str, :class:`legacy.edb_core.edb_data.variables.Variable`]
Dict[str, :class:`pyedb.legacy.edb_core.edb_data.variables.Variable`]
"""
d_var = dict()
for i in self.active_cell.GetVariableServer().GetAllVariableNames():
Expand All @@ -329,7 +327,7 @@ def project_variables(self):

@property
def layout_validation(self):
""":class:`legacy.edb_core.edb_data.layout_validation.LayoutValidation`."""
""":class:`pyedb.egacy.edb_core.edb_data.layout_validation.LayoutValidation`."""
return LayoutValidation(self)

@property
Expand All @@ -338,7 +336,7 @@ def variables(self):
Returns
-------
Dict[str, :class:`legacy.edb_core.edb_data.variables.Variable`]
Dict[str, :class:`pyedb.legacy.edb_core.edb_data.variables.Variable`]
"""
all_vars = dict()
Expand Down Expand Up @@ -433,7 +431,7 @@ def open_edb(self):
Returns
-------
``True`` when succeed ``False`` if failed : bool
"""
# self.logger.info("EDB Path is %s", self.edbpath)
# self.logger.info("EDB Version is %s", self.edbversion)
Expand Down Expand Up @@ -472,10 +470,11 @@ def open_edb(self):

@pyedb_function_handler()
def open_edb_inside_aedt(self):
"""Open EDB inside of AEDT.
"""Open EDB inside AEDT.
Returns
-------
``True`` when succeed ``False`` if failed : bool
"""
self.logger.info("Opening EDB from HDL")
Expand Down Expand Up @@ -504,7 +503,12 @@ def open_edb_inside_aedt(self):

@pyedb_function_handler()
def create_edb(self):
"""Create EDB."""
"""Create EDB.
Returns
-------
``True`` when succeed ``False`` if failed : bool
"""
# if self.edbversion > "2023.1":
# self.standalone = False

Expand Down Expand Up @@ -548,8 +552,8 @@ def import_layout_pcb(self, input_file, working_dir, anstranslator_full_path="",
Returns
-------
str
Full path to the AEDB file.
Full path to the AEDB file : str
"""
self._components = None
self._core_primitives = None
Expand Down Expand Up @@ -599,7 +603,7 @@ def export_to_ipc2581(self, ipc_path=None, units="MILLIMETER"):
The method works only in CPython because of some limitations on Ironpython in XML parsing and
because it's time-consuming.
This method is still being tested and may need further debugging.
Any feedback is welcome. Backdrills and custom pads are not supported yet.
Any feedback is welcome. Back drills and custom pads are not supported yet.
Parameters
----------
Expand All @@ -614,8 +618,8 @@ def export_to_ipc2581(self, ipc_path=None, units="MILLIMETER"):
Returns
-------
bool
``True`` if successful, ``False`` if failed.
``True`` if successful, ``False`` if failed : bool
"""
if units.lower() not in ["millimeter", "inch", "micron"]: # pragma no cover
self.logger.warning("The wrong unit is entered. Setting to the default, millimeter.")
Expand Down Expand Up @@ -649,6 +653,7 @@ def edb_exception(self, ex_value, tb_data):
Returns
-------
None
"""
tb_trace = traceback.format_tb(tb_data)
Expand Down Expand Up @@ -693,7 +698,7 @@ def components(self):
Returns
-------
:class:`pyedb.legacy.edb_core.components.Components`
Instance of :class:`legacy.edb_core.components.Components`
Examples
--------
Expand Down Expand Up @@ -888,8 +893,16 @@ def hfss(self):
Examples
--------
>>> from pyedb.legacy.edb import EdbLegacy
>>> edbapp = EdbLegacyb("myproject.aedb")
>>> edbapp = EdbLegacy("myproject.aedb")
>>> sim_config = edbapp.new_simulation_configuration()
>>> sim_config.mesh_freq = "10Ghz"
>>> edbapp.hfss.configure_hfss_analysis_setup(sim_config)
See Also
--------
:class:`legacy.edb_core.edb_data.simulation_configuration.SimulationConfiguration`
for more information on configuration options.
"""
if not self._hfss and self.active_db:
self._hfss = EdbHfss(self)
Expand Down Expand Up @@ -922,7 +935,7 @@ def nets(self):
Returns
-------
:class:`pyedb.legacy.edb_core.nets.EdbNets`
:class:`legacy.edb_core.nets.EdbNets`
Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions src/pyedb/legacy/edb_core/nets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class EdbNets(object):
Examples
--------
>>> from legacy import Edb
>>> edbapp = Edb("myaedbfolder", edbversion="2021.2")
>>> from pyedb.legacy.edb import EdbLegacy
>>> edbapp = EdbLegacy("myaedbfolder", edbversion="2021.2")
>>> edb_nets = edbapp.nets
"""

Expand Down

0 comments on commit d948c3f

Please sign in to comment.