from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from re import compile as re_compile
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('../rougail-tests/funcs/test.py')
try:
    groups.namespace
except:
    groups.addgroup('namespace')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="var", doc="a dynamic variable for {{ identifier }}", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['../rougail-tests/structures/60_5family_dynamic_calc_description/rougail/00-base.yml'], 'type': 'string'})
optiondescription_1 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="a dynamic famify for {{ identifier }}", identifiers=["val1", "val2"], children=[option_2], properties=frozenset({"basic"}), informations={'ymlfiles': ['../rougail-tests/structures/60_5family_dynamic_calc_description/rougail/00-base.yml']})
option_3 = StrOption(name="var1", doc="a new variable", properties=frozenset({"basic", "mandatory", Calculation(func['variable_to_property'], Params((), kwargs={'value': ParamDynOption(option_2, ["val1"]), 'prop': ParamValue("disabled"), 'when': ParamValue("val"), 'inverse': ParamValue(False)}), help_function=func['variable_to_property'])}), informations={'ymlfiles': ['../rougail-tests/structures/60_5family_dynamic_calc_description/rougail/00-base.yml'], 'type': 'string'})
option_4 = StrOption(name="var2", doc="a new variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_2)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "notunique", "standard"}), informations={'ymlfiles': ['../rougail-tests/structures/60_5family_dynamic_calc_description/rougail/00-base.yml'], 'type': 'string'})
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, option_3, option_4])
