Skip to content

Commit

Permalink
loading stackup config file
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed May 29, 2024
1 parent 9eeb874 commit cd33b1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/pyedb/configuration/cfg_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def __init__(self, pedb, **kwargs):
self.setups = [CfgSetup(self)]
if kwargs.get("setups", None):
self.setups = [CfgSetup(self, setup) for setup in kwargs.get("setups", [])]
self.stackup = CfgLayerStackup(self, kwargs.get("materials", {}), kwargs.get("layers", {}))
self.stackup = CfgLayerStackup(
self, kwargs.get("stackup", {}).get("materials", {}), kwargs.get("stackup", {}).get("layers", {})
)
self.s_parameters = [
CfgSParameterModel(self, self.general.s_parameter_library, sparam_model)
for sparam_model in kwargs.get("s_parameters", [])
Expand Down
4 changes: 2 additions & 2 deletions src/pyedb/configuration/cfg_stackup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def __init__(self, pdata, materials=None, layers=None):
self.materials = []
self.layers = []
if self._materials_dict:
self.materials = [Material(self._pedb, material_dict) for material_dict in self._materials_dict.items()]
self.materials = [Material(self._pedb, material_dict) for material_dict in self._materials_dict]
if self._layers_dict:
self.layers = [Layer(self._pedb, layer_dict) for layer_dict in self._layers_dict.items()]
self.layers = [Layer(self._pedb, layer_dict) for layer_dict in self._layers_dict]

def apply(self):
for material in self.materials:
Expand Down

0 comments on commit cd33b1e

Please sign in to comment.