rougail/tests/dictionaries/10valid_enum_variables/tiramisu/base.py

13 lines
1.1 KiB
Python
Raw Normal View History

2024-06-19 17:36:18 +02:00
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="source_variable_1", doc="source_variable_1", default="val1", properties=frozenset({"mandatory", "standard"}))
option_3 = StrOption(name="source_variable_2", doc="source_variable_2", default="val2", properties=frozenset({"mandatory", "standard"}))
option_4 = ChoiceOption(name="my_variable", doc="my_variable", values=(Calculation(func['calc_value'], Params((ParamOption(option_2)))), Calculation(func['calc_value'], Params((ParamOption(option_3))))), default="val1", properties=frozenset({"mandatory", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])