2023-10-12 08:17:30 +02:00
|
|
|
from tiramisu import *
|
|
|
|
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
2024-06-19 17:36:18 +02:00
|
|
|
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
|
|
load_functions('tests/dictionaries/../eosfunc/test.py')
|
2023-10-12 08:17:30 +02:00
|
|
|
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
|
|
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
|
|
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
|
|
dict_env['default_1.rougail.general.multi1'] = "{% if rougail.general.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n"
|
|
|
|
dict_env['default_1.rougail.general.multi2'] = "{% if not rougail.general.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n"
|
|
|
|
dict_env['default_2.rougail.general.multi1'] = "{% if rougail.general.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n"
|
|
|
|
dict_env['default_2.rougail.general.multi2'] = "{% if not rougail.general.bool %}\nTrue\nFalse\n{% else %}\nFalse\n{% endif %}\n"
|
|
|
|
option_4 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
|
|
|
|
option_5 = BoolOption(name="multi1", doc="multi1", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.general.multi1"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), 'rougail.general.bool': ParamOption(option_4)})), properties=frozenset({"standard"}))
|
|
|
|
option_6 = BoolOption(name="multi2", doc="multi2", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_1.rougail.general.multi2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), 'rougail.general.bool': ParamOption(option_4)})), properties=frozenset({"standard"}))
|
|
|
|
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4, option_5, option_6], properties=frozenset({"standard"}))
|
|
|
|
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))
|
|
|
|
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
|
|
|
|
option_10 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
|
|
|
|
option_11 = BoolOption(name="multi1", doc="multi1", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.general.multi1"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), 'rougail.general.bool': ParamOption(option_10)})), properties=frozenset({"standard"}))
|
|
|
|
option_12 = BoolOption(name="multi2", doc="multi2", multi=True, default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_2.rougail.general.multi2"), '__internal_type': ParamValue("boolean"), '__internal_multi': ParamValue(True), 'rougail.general.bool': ParamOption(option_10)})), properties=frozenset({"standard"}))
|
|
|
|
optiondescription_9 = OptionDescription(name="general", doc="general", children=[option_10, option_11, option_12], properties=frozenset({"standard"}))
|
|
|
|
optiondescription_8 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_9], properties=frozenset({"standard"}))
|
|
|
|
optiondescription_7 = OptionDescription(name="2", doc="2", children=[optiondescription_8], properties=frozenset({"standard"}))
|
|
|
|
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_7])
|