Skip to content

REFACT: Clean design solution and circuit #4561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pyaedt/application/design_solutions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import copy

from pyaedt.aedt_logger import pyaedt_logger as logger
from pyaedt.generic.general_methods import pyaedt_function_handler

solutions_defaults = {
Expand Down Expand Up @@ -549,7 +550,8 @@ def __init__(self, odesign, design_type, aedt_version):
self._odesign = odesign
self._aedt_version = aedt_version
self.model_name = model_names[design_type]
assert design_type in solutions_types, "Wrong Design Type"
if not design_type in solutions_types:
raise ValueError("Design type is not valid.")
# deepcopy doesn't work on remote
self._solution_options = copy.deepcopy(solutions_types[design_type])
self._design_type = design_type
Expand Down Expand Up @@ -844,7 +846,7 @@ def solution_type(self, value):
opts = ""
self._odesign.SetSolutionType(self._solution_options[self._solution_type]["name"], opts)
except Exception:
pass
logger.error("Failed to set solution type.")


class IcepakDesignSolution(DesignSolution, object):
Expand Down Expand Up @@ -922,7 +924,7 @@ def solution_type(self, solution_type):
try:
self._odesign.SetSolutionType(options)
except Exception:
pass
logger.error("Failed to set solution type.")


class RmXprtDesignSolution(DesignSolution, object):
Expand All @@ -943,7 +945,7 @@ def solution_type(self, solution_type):
self._odesign.SetDesignFlow(self._design_type, solution_type)
self._solution_type = solution_type
except Exception:
pass
logger.error("Failed to set design flow.")

@property
def design_type(self):
Expand Down
2 changes: 1 addition & 1 deletion pyaedt/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def create_schematic_from_netlist(self, input_file):
self[ppar] = pval
xpos = 0.0254
except Exception:
pass
self.logger.error("Failed to parse line '{}'.".format(line))
elif ".model" in line[:7].lower() or ".lib" in line[:4].lower():
model.append(line)
if model:
Expand Down
Loading