Skip to content

Commit

Permalink
accelergy_plug_ins global key
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner-andrulis committed Apr 17, 2024
1 parent a1752cb commit 1ff2717
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions timeloopfe/v4/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def declare_attrs(cls, *args, **kwargs):
super().add_attr("version", default="0.4", callfunc=assert_version)
super().add_attr("environment_variables", EnvironmentVariables, [])
super().add_attr("expression_custom_functions", ExpressionCustomFunctions, [])
super().add_attr("accelergy_plug_ins", AccelergyPlugIns, [])

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand All @@ -26,6 +27,7 @@ def __init__(self, *args, **kwargs):
self.expression_custom_functions: ExpressionCustomFunctions = self[
"expression_custom_functions"
]
self.accelergy_plug_ins: AccelergyPlugIns = self["accelergy_plug_ins"]


class EnvironmentVariables(DictNode):
Expand Down Expand Up @@ -56,6 +58,20 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)


class AccelergyPlugIns(CombinableListNode):
"""
A list of paths to Python files containing Accelergy plug-ins.
"""

@classmethod
def declare_attrs(cls, *args, **kwargs):
super().declare_attrs(*args, **kwargs)
super().add_attr("", str)

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)


Globals.declare_attrs()
EnvironmentVariables.declare_attrs()
ExpressionCustomFunctions.declare_attrs()

0 comments on commit 1ff2717

Please sign in to comment.