From fafda42298aa95761ef1951c3b5f21fb46db3927 Mon Sep 17 00:00:00 2001 From: ring630 <@gmail.com> Date: Thu, 5 Sep 2024 13:25:28 +0200 Subject: [PATCH 1/2] FIX: assign spice model docstring --- src/pyedb/dotnet/edb_core/cell/hierarchy/component.py | 7 ++++++- src/pyedb/dotnet/edb_core/definition/component_def.py | 11 ++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py b/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py index 6b91fbc04f..95517f6f9f 100644 --- a/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py +++ b/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py @@ -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 ------- @@ -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 ------- diff --git a/src/pyedb/dotnet/edb_core/definition/component_def.py b/src/pyedb/dotnet/edb_core/definition/component_def.py index e1d8301a34..9bf3926ddb 100644 --- a/src/pyedb/dotnet/edb_core/definition/component_def.py +++ b/src/pyedb/dotnet/edb_core/definition/component_def.py @@ -130,22 +130,27 @@ 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 From 68a918d480a2b65eb70f696e98cccc1924b8f193 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:37:17 +0000 Subject: [PATCH 2/2] MISC: Auto fixes from pre-commit.com hooks For more information, see https://pre-commit.ci --- src/pyedb/dotnet/edb_core/definition/component_def.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pyedb/dotnet/edb_core/definition/component_def.py b/src/pyedb/dotnet/edb_core/definition/component_def.py index 9bf3926ddb..237c9ab380 100644 --- a/src/pyedb/dotnet/edb_core/definition/component_def.py +++ b/src/pyedb/dotnet/edb_core/definition/component_def.py @@ -130,8 +130,13 @@ 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, sub_circuit_name=None, - terminal_pairs=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