Skip to content

Commit

Permalink
Clean up of PY files through middle of geometry directory
Browse files Browse the repository at this point in the history
  • Loading branch information
PipKat committed Dec 20, 2023
1 parent 45d7ac4 commit a280b7a
Show file tree
Hide file tree
Showing 17 changed files with 177 additions and 195 deletions.
31 changes: 14 additions & 17 deletions src/ansys/edb/core/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, msg):

@classmethod
def create(cls, db_path):
"""Create a database in the specified location.
"""Create a database in a given location.
Parameters
----------
Expand All @@ -83,7 +83,7 @@ def create(cls, db_path):

@classmethod
def open(cls, db_path, read_only):
"""Open a database in the specified location.
"""Open a database in a given location.
Parameters
----------
Expand All @@ -108,7 +108,7 @@ def open(cls, db_path, read_only):

@classmethod
def delete(cls, db_path):
"""Delete a database in the specified location.
"""Delete a database in a given specified location.
Parameters
----------
Expand All @@ -118,7 +118,7 @@ def delete(cls, db_path):
cls.__stub.Delete(proto_wrappers.StringValue(value=db_path))

def save(self):
"""Save any changes to the file."""
"""Save any changes to the database."""
self.__stub.Save(self.msg)

def close(self):
Expand Down Expand Up @@ -232,7 +232,7 @@ def get_product_property(self, prod_id, attr_it):
).value

def set_product_property(self, prod_id, attr_it, prop_value):
"""Set the product property associated with the given product and attribute IDs.
"""Set the product property associated with the given product ID and attribute ID.
Parameters
----------
Expand Down Expand Up @@ -289,10 +289,7 @@ def import_material_from_control_file(self, control_file, schema_dir=None, appen

@property
def version(self):
""":obj:`tuple` of (:obj:`int`, :obj:`int`): Version of the database.
The tuple contains the version numbers [major, minor].
"""
""":obj:`tuple` of (:obj:`int`, :obj:`int`): Version [major, minor] of the database."""
version_msg = self.__stub.GetVersion(self.msg)
return version_msg.major.id, version_msg.minor.id

Expand Down Expand Up @@ -364,52 +361,52 @@ def _get_bondwire_definition_objs(self, def_class, bw_def_type_enum):

@property
def apd_bondwire_defs(self):
""":obj:`list[:class:`ApdBondwireDef <ansys.edb.core.definition.ApdBondwireDef>`]`: All APD \
""":obj:`list of :class:`ApdBondwireDef <ansys.edb.core.definition.ApdBondwireDef>`: All APD \
bondwire definitions in the database."""
return self._get_bondwire_definition_objs(ApdBondwireDef, BondwireDefType.APD_BONDWIRE_DEF)

@property
def jedec4_bondwire_defs(self):
""":obj:`list of :class:`Jedec4BondwireDef <ansys.edb.core.definition.Jedec4BondwireDef>`: All JEDEC4 \
""":obj:`list` of :class:`Jedec4BondwireDef <ansys.edb.core.definition.Jedec4BondwireDef>`: All JEDEC4 \
bondwire definitions in the database."""
return self._get_bondwire_definition_objs(
Jedec4BondwireDef, BondwireDefType.JEDEC4_BONDWIRE_DEF
)

@property
def jedec5_bondwire_defs(self):
""":obj:`list of:class:`Jedec5BondwireDef <ansys.edb.core.definition.Jedec5BondwireDef>`: All JEDEC5 \
""":obj:`list` of:class:`Jedec5BondwireDef <ansys.edb.core.definition.Jedec5BondwireDef>`: All JEDEC5 \
bondwire definitions in the database."""
return self._get_bondwire_definition_objs(
Jedec5BondwireDef, BondwireDefType.JEDEC5_BONDWIRE_DEF
)

@property
def padstack_defs(self):
""":obj:`list of :class:`PadstackDef <ansys.edb.core.definition.PadstackDef>`: All padstack definitions \
""":obj:`list` of :class:`PadstackDef <ansys.edb.core.definition.PadstackDef>`: All padstack definitions \
in the database."""
return self._get_definition_objs(PadstackDef, DefinitionObjType.PADSTACK_DEF)

@property
def package_defs(self):
""":obj:`list of :class:`PackageDef <ansys.edb.core.definition.PackageDef>`: All package definitions \
""":obj:`list` of :class:`PackageDef <ansys.edb.core.definition.PackageDef>`: All package definitions \
in the database."""
return self._get_definition_objs(PackageDef, DefinitionObjType.PACKAGE_DEF)

@property
def component_defs(self):
""":obj:`list of :class:`ComponentDef <ansys.edb.core.definition.ComponentDef>`: All component \
""":obj:`list` of :class:`ComponentDef <ansys.edb.core.definition.ComponentDef>`: All component \
definitions in the database."""
return self._get_definition_objs(ComponentDef, DefinitionObjType.COMPONENT_DEF)

@property
def material_defs(self):
""":obj:`list of :class:`MaterialDef <ansys.edb.core.definition.MaterialDef>`: All material \
""":obj:`list` of :class:`MaterialDef <ansys.edb.core.definition.MaterialDef>`: All material \
definitions in the database."""
return self._get_definition_objs(MaterialDef, DefinitionObjType.MATERIAL_DEF)

@property
def dataset_defs(self):
""":obj:`list of :class:`DatasetDef <ansys.edb.core.definition.DatasetDef>`: All dataset \
""":obj:`list` of :class:`DatasetDef <ansys.edb.core.definition.DatasetDef>`: All dataset \
definitions in the database."""
return self._get_definition_objs(DatasetDef, DefinitionObjType.DATASET_DEF)
41 changes: 17 additions & 24 deletions src/ansys/edb/core/definition/bondwire_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def name(self):
return self.__stub.GetName(self.msg)

def delete(self):
"""Delete a bondwire definition."""
"""Delete the bondwire definition."""
self.__stub.Delete(self.msg)


Expand All @@ -92,11 +92,11 @@ class ApdBondwireDef(BondwireDef):

@classmethod
def create(cls, database, name):
"""Create an APD bondwire definition.
"""Create an APD bondwire definition in a given database.
Parameters
----------
database : :class:`Database <ansys.edb.core.database.Database>`.
database : :class:`Database <ansys.edb.core.database.Database>`
Database to create the APD bondwire definition in.
name : str
Name of the APD bondwire definition.
Expand All @@ -116,7 +116,7 @@ def load_definitions_from_file(cls, database, name):
Parameters
----------
database : :class:`Database <ansys.edb.core.database.Database>`
Database to load the APD bondwire to.
Database to load the APD bondwire into.
name : str
Name of the APD bondwire definition.
"""
Expand All @@ -143,12 +143,12 @@ def find_by_name(cls, database, name):
)

def get_parameters(self):
"""Get parameters of the APD bondwire definition.
"""Get the parameters of the APD bondwire definition.
Returns
-------
str
String block of bondwire parameters.
String block of the bondwire parameters.
"""
return self.__stub.GetParameters(self.msg)

Expand All @@ -158,7 +158,7 @@ def set_parameters(self, name):
Parameters
----------
name : str
String block of bondwire parameters.
String block of the bondwire parameters.
"""
self.__stub.SetParameters(_QueryBuilder.bondwire_def_str_message(self, name))

Expand Down Expand Up @@ -228,7 +228,7 @@ def find_by_name(cls, database, name):
)

def get_parameters(self):
"""Get parameters of a JEDEC4 bondwire definition.
"""Get parameters of the JEDEC4 bondwire definition.
Returns
-------
Expand Down Expand Up @@ -305,7 +305,7 @@ def create(cls, database, name):
Returns
-------
Jedec5BondwireDef
Jedec5 Bondwire definition created.
JEDEC5 bondwire definition created.
"""
return Jedec5BondwireDef(
cls.__stub.Create(_QueryBuilder.bondwire_def_str_message(database, name))
Expand All @@ -332,25 +332,18 @@ def find_by_name(cls, database, name):
)

def get_parameters(self):
"""Get parameters of a JEDEC5 bondwire definition.
"""Get parameters of the JEDEC5 bondwire definition.
Returns
-------
tuple[
:class:`Value <ansys.edb.core.utility.Value>`,
:class:`Value <ansys.edb.core.utility.Value>`,
:class:`Value <ansys.edb.core.utility.Value>`
]
Returns a tuple in this format:
**(top_to_die_distance,die_pad_angle,lead_pad_angle)**
**top_to_die_distance** : Bondwire top to die distance.
tuple[:class:`Value <ansys.edb.core.utility.Value>`, :class:`Value <ansys.edb.core.utility.Value>`, \
:class:`Value <ansys.edb.core.utility.Value>`]
**die_pad_angle** : Bondwire die pad angle.
The tuple is in this format: ``(top_to_die_distance,die_pad_angle,lead_pad_angle)``
**lead_pad_angle** : Bondwire lead pad angle.
- ``top_to_die_distance``: Bondwire top-to-die distance.
- ``die_pad_angle``: Bondwire die pad angle.
- `` lead_pad_angle``: Bondwire lead pad angle.
"""
get_parameters_msg = self.__stub.GetParameters(self.msg)
return (
Expand All @@ -360,7 +353,7 @@ def get_parameters(self):
)

def set_parameters(self, top_to_die_distance, die_pad_angle, lead_pad_angle):
"""Set parameters of a JEDEC5 bondwire definition.
"""Set parameters of the JEDEC5 bondwire definition.
Parameters
----------
Expand Down
6 changes: 3 additions & 3 deletions src/ansys/edb/core/definition/component_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def find(cls, db, comp_def_name):
Returns
-------
ComponentDef
Component definition that was found or ``None`` otherwise.
Component definition found, ``None`` otherwise.
"""
return ComponentDef(
cls.__stub.FindByName(messages.object_name_in_layout_message(db, comp_def_name))
Expand Down Expand Up @@ -82,7 +82,7 @@ def footprint(self, value):
@property
def component_models(self):
""":obj:`list` of :class:`ComponentModel <ansys.edb.core.definition.component_model.ComponentModel>`: \
List of component models associated with the component definition.
All component models associated with the component definition.
This property is read-only.
"""
Expand All @@ -92,7 +92,7 @@ def component_models(self):
@property
def component_pins(self):
""":obj:`list` of :class:`ComponentPin <ansys.edb.core.definition.ComponentPin>`: \
List of component pins of the component definition.
All component pins of the component definition.
This property is read-only.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/edb/core/definition/component_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def create(cls, name):
Notes
-----
The component model does not belong to a specific database until it is added to a
:class:`ComponentDef <ansys.edb.core.definition.ComponentDef>` class.
:class:`ComponentDef <ansys.edb.core.definition.ComponentDef>` instance.
"""
return NPortComponentModel(cls.__stub.Create(proto_wrappers.StringValue(value=name)))

Expand Down
6 changes: 3 additions & 3 deletions src/ansys/edb/core/definition/component_pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def create(cls, comp_def, name):
Parameters
----------
comp_def : :class:`ComponentDef <ansys.edb.core.definition.ComponentDef>`
Component definition that the component pin is to belong to.
Component definition to create the component pin in.
name : str
Name of the component pin to create.
Name of the component pin.
Returns
-------
Expand All @@ -43,7 +43,7 @@ def find(cls, comp_def, name):
Returns
-------
ComponentPin
Component pin that was found, ``None`` otherwise.
Component pin found, ``None`` otherwise.
"""
return ComponentPin(cls.__stub.FindByName(messages.edb_obj_name_message(comp_def, name)))

Expand Down
4 changes: 2 additions & 2 deletions src/ansys/edb/core/definition/component_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ def clone(self):
Returns
-------
ComponentProperty
Clone of the component property.
Component property cloned.
"""
return ComponentProperty(self.__stub.Clone(messages.edb_obj_message(self)))

@property
def package_mounting_offset(self):
""":class:`Value <ansys.edb.core.utility.Value>`: Offset of the package definition object.
""":class:`Value <ansys.edb.core.utility.Value>`: Mounting offset of the package definition object.
This property can be set with :term:`ValueLike`.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/edb/core/definition/dielectric_material_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DielectricMaterialModelType(Enum):


class DielectricMaterialModel(ObjBase):
"""Represents a dielectric material model object."""
"""Represents a dielectric material model."""

__stub: dielectric_material_model_pb2_grpc.DielectricMaterialModelServiceStub = (
session.StubAccessor(session.StubType.dielectric_material_model)
Expand Down
Loading

0 comments on commit a280b7a

Please sign in to comment.