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 [ ' disabled_rougail.my_var2 ' ] = " { % i f my_var1 is not defined % } \n my_var1 is undefined! \n { % e lif my_var1 == \" no \" % } \n my_var1 is no \n { % e ndif % } \n "
dict_env [ ' disabled_rougail.my_var3 ' ] = " { % i f my_var2 is not defined % } \n my_var2 is undefined! \n { % e lif my_var2 == \" no \" % } \n my_var2 is no \n { % e ndif % } \n "
option_2 = StrOption ( name = " my_var1 " , doc = " my_var1 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " } ) )
option_3 = StrOption ( name = " my_var2 " , doc = " my_var2 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " , Calculation ( func [ ' jinja_to_property ' ] , Params ( ( ParamValue ( " disabled " ) ) , kwargs = { ' __internal_jinja ' : ParamValue ( " disabled_rougail.my_var2 " ) , ' __internal_type ' : ParamValue ( " string " ) , ' __internal_multi ' : ParamValue ( False ) , ' my_var1 ' : ParamOption ( option_2 , notraisepropertyerror = True ) } ) , help_function = func [ ' jinja_to_property_help ' ] ) } ) )
option_4 = StrOption ( name = " my_var3 " , doc = " my_var3 " , default = " no " , properties = frozenset ( { " mandatory " , " standard " , Calculation ( func [ ' jinja_to_property ' ] , Params ( ( ParamValue ( " disabled " ) ) , kwargs = { ' __internal_jinja ' : ParamValue ( " disabled_rougail.my_var3 " ) , ' __internal_type ' : ParamValue ( " string " ) , ' __internal_multi ' : ParamValue ( False ) , ' my_var2 ' : ParamOption ( option_3 , notraisepropertyerror = True ) } ) , help_function = func [ ' jinja_to_property_help ' ] ) } ) )
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 ] )