Skip to content

Commit

Permalink
FIX: assign spice model docstring (#777)
Browse files Browse the repository at this point in the history
* FIX: assign spice model docstring

* MISC: Auto fixes from pre-commit.com hooks

For more information, see https://pre-commit.ci

---------

Co-authored-by: ring630 <@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
hui-zhou-a and pre-commit-ci[bot] authored Sep 5, 2024
1 parent 849380f commit 54c6cf8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/pyedb/dotnet/edb_core/cell/hierarchy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,10 @@ def assign_spice_model(
File path of the Spice model.
name : str, optional
Name of the Spice model.
sub_circuit_name : str, optional
Name of the sub circuit.
terminal_pairs : list, optional
list of terminal pairs.
Returns
-------
Expand Down Expand Up @@ -879,7 +883,8 @@ def assign_s_param_model(self, file_path, name=None, reference_net=None):
File path of the S-parameter model.
name : str, optional
Name of the S-parameter model.
reference_net : str, optional
Name of the reference net.
Returns
-------
Expand Down
16 changes: 13 additions & 3 deletions src/pyedb/dotnet/edb_core/definition/component_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,32 @@ def assign_s_param_model(self, file_path, model_name=None, reference_net=None):
comp.assign_s_param_model(file_path, model_name, reference_net)
return True

def assign_spice_model(self, file_path, model_name=None):
def assign_spice_model(
self,
file_path,
model_name=None,
sub_circuit_name=None,
terminal_pairs=None,
):
"""Assign Spice model to all components under this part name.
Parameters
----------
file_path : str
File path of the Spice model.
name : str, optional
model_name : str, optional
Name of the Spice model.
sub_circuit_name : str, optional
Name of the sub circuit.
terminal_pairs : list, optional
list of terminal pairs.
Returns
-------
"""
for comp in list(self.components.values()):
comp.assign_spice_model(file_path, model_name)
comp.assign_spice_model(file_path, model_name, sub_circuit_name, terminal_pairs)
return True

@property
Expand Down

0 comments on commit 54c6cf8

Please sign in to comment.