fix: better multi check

This commit is contained in:
egarette@silique.fr 2025-04-21 19:18:34 +02:00
parent fc56827706
commit 136a0e71b7
110 changed files with 1445 additions and 133 deletions

View file

@ -76,8 +76,8 @@ class Annotator(Walk): # pylint: disable=R0903
raise DictConsistencyError(msg, 68, variable.xmlfiles)
if variable.path in self.objectspace.followers and multi != "submulti":
msg = _(
'the follower "{0}" without multi attribute can only have one value'
).format(variable.name)
'the follower "{0}" is not multi, so cannot have a list has default value'
).format(variable.path)
raise DictConsistencyError(msg, 87, variable.xmlfiles)
if not variable.default:
variable.default = None

View file

@ -25,10 +25,11 @@ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from tiramisu.error import display_list
from rougail.i18n import _
from rougail.utils import calc_multi_for_type_variable
from rougail.error import DictConsistencyError
from rougail.object_model import Calculation, VariableCalculation
from tiramisu.error import display_list
class Walk:
@ -93,21 +94,23 @@ class Annotator(Walk): # pylint: disable=R0903
def convert_variable(self):
"""convert variable"""
for variable in self.get_variables():
if variable.version != "1.0":
if variable.type == "symlink":
continue
self._convert_variable_inference(variable)
for variable in self.get_variables():
if variable.type == "symlink":
continue
if variable.version != "1.0":
self._default_variable_copy_informations(variable)
if variable.multi is None:
variable.multi = False
if variable.type is None:
variable.type = "string"
self.objectspace.informations.add(variable.path, "type", variable.type)
self._convert_variable_inference(variable)
self._convert_variable_multi(variable)
for variable in self.get_variables():
if variable.type == "symlink":
continue
if variable.version != '1.0' and isinstance(variable.default, VariableCalculation):
calculated_variable_path, calculated_variable, identifier = variable.default.get_variable(
self.objectspace
)
else:
calculated_variable = None
if variable.version != "1.0" and calculated_variable is not None:
self._default_variable_copy_informations(variable, calculated_variable)
self._convert_variable(variable)
def _convert_variable_inference(
@ -115,42 +118,52 @@ class Annotator(Walk): # pylint: disable=R0903
variable,
) -> None:
# variable has no type
if variable.type is None:
# choice type inference from the `choices` attribute
if variable.choices is not None:
variable.type = "choice"
elif variable.regexp is not None:
variable.type = "regexp"
elif variable.default not in [None, []]:
if isinstance(variable.default, list):
tested_value = variable.default[0]
else:
tested_value = variable.default
variable.type = self.basic_types.get(type(tested_value), None)
# variable has no multi attribute
if variable.multi is None and not (
variable.type is None and isinstance(variable.default, VariableCalculation)
):
if variable.path in self.objectspace.leaders:
variable.multi = True
if variable.type is not None:
return
# choice type inference from the `choices` attribute
if variable.choices is not None:
variable.type = "choice"
elif variable.regexp is not None:
variable.type = "regexp"
elif variable.default not in [None, []]:
if isinstance(variable.default, list):
tested_value = variable.default[0]
else:
variable.multi = isinstance(variable.default, list)
tested_value = variable.default
variable.type = self.basic_types.get(type(tested_value), None)
def _convert_variable_multi(
self,
variable,
) -> None:
# variable has no multi attribute
if variable.multi is not None:
return
if variable.path in self.objectspace.leaders:
variable.multi = self.objectspace.multis[variable.path] = True
elif variable.version != "1.0" and isinstance(variable.default, VariableCalculation):
# FIXME
calculated_variable_path, calculated_variable, identifier = variable.default.get_variable(
self.objectspace
)
if calculated_variable is not None:
if calculated_variable.multi is None:
self._convert_variable_multi(calculated_variable)
variable.multi = calc_multi_for_type_variable(variable, calculated_variable_path, calculated_variable, self.objectspace)[1]
if calculated_variable.path in self.objectspace.followers and variable.mandatory is calculated_variable.mandatory is False and calculated_variable.path.rsplit(".", 1)[0] != variable.path.rsplit(".", 1)[0]:
variable.empty = False
else:
variable.multi = isinstance(variable.default, list)
def _default_variable_copy_informations(
self,
variable,
calculated_variable,
) -> None:
# if a variable has a variable as default value, that means the type/params or multi should has same value
if variable.type is not None or not isinstance(
variable.default, VariableCalculation
):
if not isinstance(variable.default, VariableCalculation) or variable.type is not None:
return
# copy type and params
calculated_variable, identifier = variable.default.get_variable(
self.objectspace
)
if calculated_variable is None:
return
variable.type = calculated_variable.type
if variable.params is None and calculated_variable.params is not None:
variable.params = calculated_variable.params
@ -158,17 +171,6 @@ class Annotator(Walk): # pylint: disable=R0903
variable.choices = calculated_variable.choices
if variable.type == 'regexp' and variable.regexp is None:
variable.regexp = calculated_variable.regexp
# copy multi attribut
if variable.multi is None:
calculated_path = calculated_variable.path
if (
calculated_path in self.objectspace.leaders
and variable.path in self.objectspace.followers
and calculated_path.rsplit(".")[0] == variable.path.rsplit(".")[0]
):
variable.multi = False
else:
variable.multi = calculated_variable.multi
def _convert_variable(
self,
@ -177,6 +179,9 @@ class Annotator(Walk): # pylint: disable=R0903
# variable without description: description is the name
if not variable.description:
variable.description = variable.name
if variable.type is None:
variable.type = "string"
self.objectspace.informations.add(variable.path, "type", variable.type)
if variable.path in self.objectspace.followers:
if not variable.multi:
self.objectspace.multis[variable.path] = True
@ -185,8 +190,6 @@ class Annotator(Walk): # pylint: disable=R0903
elif variable.multi:
self.objectspace.multis[variable.path] = True
if variable.path in self.objectspace.leaders:
if not self.objectspace.multis.get(variable.path, False):
variable.multi = self.objectspace.multis[variable.path] = True
family = self.objectspace.paths[variable.path.rsplit(".", 1)[0]]
if variable.hidden:
family.hidden = variable.hidden

1
src/rougail/cli Symbolic link
View file

@ -0,0 +1 @@
../../../rougail-cli/src/rougail/cli

View file

@ -28,7 +28,8 @@ from pydantic import (
)
from tiramisu import undefined
import tiramisu
from .utils import get_jinja_variable_to_param
from tiramisu.config import get_common_path
from .utils import get_jinja_variable_to_param, calc_multi_for_type_variable
from .i18n import _
from .error import DictConsistencyError, VariableCalculationDependencyError
@ -458,8 +459,17 @@ class _VariableCalculation(Calculation):
path = self.path
else:
path = self.ori_path
if self.version != "1.0" and objectspace.paths.regexp_relative.search(self.variable):
variable_full_path = objectspace.paths.get_full_path(
self.variable,
path,
)
elif self.version == "1.0" and "{{ suffix }}" in self.variable:
variable_full_path = self.variable.replace("{{ suffix }}", "{{ identifier }}")
else:
variable_full_path = self.variable
variable, identifier = objectspace.paths.get_with_dynamic(
self.variable,
variable_full_path,
path,
self.version,
self.namespace,
@ -467,90 +477,44 @@ class _VariableCalculation(Calculation):
)
if variable and not isinstance(variable, objectspace.variable):
if isinstance(variable, objectspace.family):
msg = _('a variable "{0}" is needs in attribute "{1}" for "{2}" but it\'s a family').format(variable.path, self.attribute_name, self.path)
msg = _('a variable "{0}" is needs in attribute "{1}" for "{2}" but it\'s a family').format(variable_full_path, self.attribute_name, self.path)
raise DictConsistencyError(msg, 47, self.xmlfiles)
else:
msg = _('unknown object "{0}" in attribute "{1}" for "{2}"').format(variable, self.attribute_name, self.path)
raise DictConsistencyError(msg, 48, self.xmlfiles)
return variable, identifier
return variable_full_path, variable, identifier
def get_params(
self,
objectspace,
variable: "Variable",
identifier: Optional[str],
*,
needs_multi: Optional[bool] = None,
variable_in_calculation_path: str,
variable_in_calculation: "Variable",
variable_in_calculation_identifier: Optional[str],
):
if not variable:
if not variable_in_calculation:
if not objectspace.force_optional:
if self.ori_path is None:
path = self.path
else:
path = self.ori_path
msg = _('Variable not found "{0}" for attribut "{1}" in variable "{2}"').format(self.variable, self.attribute_name, path)
msg = _('variable "{0}" has an attribute "{1}" calculated with the unknown variable "{2}"').format(path, self.attribute_name, self.variable)
raise DictConsistencyError(msg, 88, self.xmlfiles)
return {None: [["example"]]}
param = {
"type": "variable",
"variable": variable,
"variable": variable_in_calculation,
"propertyerror": self.propertyerror,
}
is_variable_calculation = isinstance(self, VariableCalculation)
if is_variable_calculation and self.optional:
if isinstance(self, VariableCalculation) and self.optional:
param["optional"] = self.optional
if identifier:
param["identifier"] = identifier
if variable_in_calculation_identifier:
param["identifier"] = variable_in_calculation_identifier
params = {None: [param]}
if self.default_values:
params["__default_value"] = self.default_values
if self.allow_none:
params["allow_none"] = True
if needs_multi is None:
if self.attribute_name == "default":
# variable is a multi or a submulti follower
attended = "submulti" if self.path in objectspace.followers else True
needs_multi = objectspace.multis.get(self.path) == attended
else:
needs_multi = True
calc_variable_is_multi = variable.path in objectspace.multis
if not calc_variable_is_multi:
# a variable in a dynamic family can be multiple
if variable.path in objectspace.paths._dynamics and (
identifier is None or identifier[-1] is None
):
self_dyn_path = objectspace.paths._dynamics.get(self.path)
if self_dyn_path is not None:
var_dyn_path = objectspace.paths._dynamics[variable.path]
if self_dyn_path != var_dyn_path and not self_dyn_path.startswith(
f"{var_dyn_path}."
):
calc_variable_is_multi = True
else:
calc_variable_is_multi = True
elif identifier and "{{ identifier }}" in identifier:
calc_variable_is_multi = True
if needs_multi:
if calc_variable_is_multi:
if self.inside_list:
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" is multi but is inside a list').format(self.path, self.attribute_name, variable.path)
raise DictConsistencyError(msg, 18, self.xmlfiles)
elif not self.inside_list:
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" is not multi but is not inside a list').format(self.path, self.attribute_name, variable.path)
raise DictConsistencyError(msg, 20, self.xmlfiles)
elif self.inside_list:
msg = _('the variable "{0}" has an invalid attribute "{1}", it\'s a list').format(self.path, self.attribute_name)
raise DictConsistencyError(msg, 23, self.xmlfiles)
elif calc_variable_is_multi and self.path in objectspace.followers:
if (
variable.path.rsplit(".", 1)[0] != self.path.rsplit(".", 1)[0]
):
if is_variable_calculation:
# it's not a follower or not in same leadership
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" is a multi').format(self.path, self.attribute_name, variable.path)
raise DictConsistencyError(msg, 21, self.xmlfiles)
else:
params[None][0]["index"] = {"index": {"type": "index"}}
self.check_multi(objectspace, variable_in_calculation_path, variable_in_calculation)
if self.path in objectspace.followers:
multi = objectspace.multis[self.path] == "submulti"
else:
@ -559,6 +523,53 @@ class _VariableCalculation(Calculation):
params["__internal_multi"] = True
return params
def check_multi(self, objectspace, variable_in_calculation_path, variable_in_calculation):
if self.ori_path is None:
path = self.path
else:
path = self.ori_path
local_variable = objectspace.paths[path]
local_variable_multi, variable_in_calculation_multi = calc_multi_for_type_variable(local_variable, variable_in_calculation_path, variable_in_calculation, objectspace)
if self.attribute_name == "default":
if variable_in_calculation_multi == 'submulti':
if objectspace.paths.is_dynamic(variable_in_calculation.path):
msg = _('the variable "{0}" has an invalid "{1}" the variable "{2}" is in a sub dynamic option').format(local_variable.path, self.attribute_name, variable_in_calculation.path)
raise DictConsistencyError(msg, 69, self.xmlfiles)
else:
msg = _('the leader "{0}" has an invalid "{1}" the follower "{2}" is a multi').format(local_variable.path, self.attribute_name, variable_in_calculation.path)
raise DictConsistencyError(msg, 74, self.xmlfiles)
if not self.inside_list:
if local_variable_multi != variable_in_calculation_multi:
if local_variable_multi:
self.check_variable_in_calculation_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
self.check_variable_in_calculation_not_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
else:
self.check_variable_in_calculation_in_list_not_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
elif self.attribute_name in ["choices", "dynamic"]:
# calculated variable must be a multi
if not self.inside_list:
self.check_variable_in_calculation_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
else:
self.check_variable_in_calculation_in_list_not_multi(local_variable.path, variable_in_calculation_path, variable_in_calculation_multi)
elif variable_in_calculation_multi is True:
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" must not be multi').format(local_variable.path, self.attribute_name, variable_in_calculation_path)
raise DictConsistencyError(msg, 23, self.xmlfiles)
def check_variable_in_calculation_multi(self, local_variable_path, variable_in_calculation_path, variable_in_calculation_multi):
if variable_in_calculation_multi is False:
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable must not be a multi or the variable "{2}" must be multi').format(local_variable_path, self.attribute_name, variable_in_calculation_path)
raise DictConsistencyError(msg, 20, self.xmlfiles)
def check_variable_in_calculation_not_multi(self, local_variable_path, variable_in_calculation_path, variable_in_calculation_multi):
if variable_in_calculation_multi is True:
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable must be a multi or the variable "{2}" must not be multi').format(local_variable_path, self.attribute_name, variable_in_calculation_path)
raise DictConsistencyError(msg, 21, self.xmlfiles)
def check_variable_in_calculation_in_list_not_multi(self, local_variable_path, variable_in_calculation_path, variable_in_calculation_multi):
if variable_in_calculation_multi is True:
msg = _('the variable "{0}" has an invalid attribute "{1}", the variable "{2}" is multi but is inside a list').format(local_variable_path, self.attribute_name, variable_in_calculation_path)
raise DictConsistencyError(msg, 18, self.xmlfiles)
class VariableCalculation(_VariableCalculation):
attribute_name: Literal["default", "choices", "dynamic"]
@ -571,22 +582,23 @@ class VariableCalculation(_VariableCalculation):
if self.attribute_name != "default" and self.optional:
msg = _('"{0}" attribut shall not have an "optional" attribute for variable "{1}"').format(self.attribute_name, self.variable)
raise DictConsistencyError(msg, 33, self.xmlfiles)
variable, identifier = self.get_variable(objectspace)
variable_in_calculation_path, variable_in_calculation, variable_in_calculation_identifier = self.get_variable(objectspace)
if (
not variable
not variable_in_calculation
and self.optional
or (objectspace.force_optional and self.attribute_name == "default")
):
raise VariableCalculationDependencyError()
if variable and self.attribute_name == "default":
if variable_in_calculation and self.attribute_name == "default":
local_variable = objectspace.paths[self.path]
if CONVERT_OPTION.get(local_variable.type, {}).get("func", str) != CONVERT_OPTION.get(variable.type, {}).get("func", str):
msg = _('variable "{0}" has a default value calculated with "{1}" which has incompatible type').format(self.path, variable.path)
if CONVERT_OPTION.get(local_variable.type, {}).get("func", str) != CONVERT_OPTION.get(variable_in_calculation.type, {}).get("func", str):
msg = _('variable "{0}" has a default value calculated with "{1}" which has incompatible type').format(self.path, self.variable)
raise DictConsistencyError(msg, 67, self.xmlfiles)
params = self.get_params(
objectspace,
variable,
identifier,
variable_in_calculation_path,
variable_in_calculation,
variable_in_calculation_identifier,
)
return {
"function": "calc_value",
@ -604,12 +616,12 @@ class VariablePropertyCalculation(_VariableCalculation):
self,
objectspace,
) -> dict:
variable, identifier = self.get_variable(objectspace)
variable_in_calculation_path, variable_in_calculation, variable_in_calculation_identifier = self.get_variable(objectspace)
params = self.get_params(
objectspace,
variable,
identifier,
needs_multi=False,
variable_in_calculation_path,
variable_in_calculation,
variable_in_calculation_identifier,
)
if objectspace.force_optional and (not params[None] or "variable" not in params[None][0]):
params = {None: [None, None, False]}
@ -641,10 +653,11 @@ class VariablePropertyCalculation(_VariableCalculation):
params["when"] = when
params["inverse"] = inverse
params[None].insert(0, self.attribute_name)
func = 'variable_to_property'
return {
"function": "variable_to_property",
"function": func,
"params": params,
"help": "variable_to_property",
"help": func,
}

1
src/rougail/output_ansible Symbolic link
View file

@ -0,0 +1 @@
../../../rougail-output-ansible/src/rougail/output_ansible

1
src/rougail/output_console Symbolic link
View file

@ -0,0 +1 @@
../../../rougail-output-console/src/rougail/output_console

1
src/rougail/output_doc Symbolic link
View file

@ -0,0 +1 @@
../../../rougail-output-doc/src/rougail/output_doc

View file

@ -0,0 +1 @@
../../../rougail-output-formatter/src/rougail/output_formatter

1
src/rougail/output_json Symbolic link
View file

@ -0,0 +1 @@
../../../rougail-output-json/src/rougail/output_json

View file

@ -63,6 +63,9 @@ class Paths:
path: str,
current_path: str,
):
if "{{ suffix }}" in path:
# version 1.0 and 1.1
path = path.replace("{{ suffix }}", "{{ identifier }}")
relative, subpath = path.split(".", 1)
relative_len = len(relative)
path_len = current_path.count(".")
@ -141,8 +144,6 @@ class Paths:
path = new_path
else:
identifiers = None
if "{{ suffix }}" in path:
path = path.replace("{{ suffix }}", "{{ identifier }}")
elif not path in self._data:
new_path = parent_path = current_path = None
identifiers = []

View file

@ -0,0 +1 @@
../../../rougail-structural-bitwarden/src/rougail/structural_bitwarden

View file

@ -0,0 +1 @@
../../../risotto/src/rougail/structural_risotto

View file

@ -111,7 +111,6 @@ def rougail_calc_value(*args, __default_value=None, __internal_multi=False, **kw
def kw_to_string(kw, root=None):
# {'_': {'interfaces': {'ip': ['192.168.44.19', '192.168.44.12'], 'domain_name': ['nginx-reverse-proxy.reverseproxy.test.net', 'nginx-reverse-proxy.localdns.test.net']}, 'dns_client_address': 'nginx-reverse-proxy.localdns.test.net'}}
for name, data in kw.items():
if root is None:
path = name

View file

@ -0,0 +1 @@
../../../rougail-user-data-ansible/src/rougail/user_data_ansible

View file

@ -0,0 +1 @@
../../../rougail-user-data-bitwarden/src/rougail/user_data_bitwarden

View file

@ -0,0 +1 @@
../../../rougail-user-data-environment/src/rougail/user_data_environment

View file

@ -0,0 +1 @@
../../../risotto/src/rougail/user_data_risotto

1
src/rougail/user_data_yaml Symbolic link
View file

@ -0,0 +1 @@
../../../rougail-user-data-yaml/src/rougail/user_data_yaml

View file

@ -161,3 +161,41 @@ def get_jinja_variable_to_param(
yield {}, None, root_path
for variable_path, data in founded_variables.items():
yield data[1], data[0], variable_path
def calc_multi_for_type_variable(local_variable: 'Variable', variable_in_calculation_path: str, variable_in_calculation: 'Variable', objectspace: 'RougailConvert') -> Union[bool, str]:
variable_in_calculation_multi = variable_in_calculation.multi
if local_variable.path in objectspace.families:
# it's a family
local_variable_multi = None
else:
local_variable_multi = local_variable.multi
# variable is a leader
if variable_in_calculation.path in objectspace.leaders:
local_variable_parent = local_variable.path.rsplit('.', 1)[0]
variable_in_calculation_parent = variable_in_calculation.path.rsplit('.', 1)[0]
if local_variable_parent == variable_in_calculation_parent:
variable_in_calculation_multi = False
# variable is a follower
elif variable_in_calculation.path in objectspace.followers:
local_variable_parent = local_variable.path.rsplit('.', 1)[0]
variable_in_calculation_parent = variable_in_calculation.path.rsplit('.', 1)[0]
if local_variable_parent != variable_in_calculation_parent:
if variable_in_calculation_multi:
variable_in_calculation_multi = 'submulti'
else:
variable_in_calculation_multi = True
# variable is in a dynamic family
if objectspace.paths.is_dynamic(variable_in_calculation.path):
common_path = get_common_path(local_variable.path, variable_in_calculation_path)
common_variable_path = variable_in_calculation_path
if common_path:
common_variable_path = common_variable_path[len(common_path) + 1:]
count_identifiers = common_variable_path.count('{{ identifier }}')
if count_identifiers == 1:
if variable_in_calculation_multi is False:
variable_in_calculation_multi = True
else:
variable_in_calculation_multi = 'submulti'
elif count_identifiers > 1:
variable_in_calculation_multi = 'submulti'
return local_variable_multi, variable_in_calculation_multi

View file

@ -0,0 +1,19 @@
{
"rougail.leadership.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership.follower": {
"owner": [
"default",
"default"
],
"value": [
"value1",
"value2"
]
}
}

View file

@ -0,0 +1,12 @@
{
"rougail.leadership.leader": [
{
"rougail.leadership.leader": "value1",
"rougail.leadership.follower": "value1"
},
{
"rougail.leadership.leader": "value2",
"rougail.leadership.follower": "value2"
}
]
}

View file

@ -0,0 +1,19 @@
{
"rougail.leadership.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership.follower": {
"owner": [
"default",
"default"
],
"value": [
"value1",
"value2"
]
}
}

View file

@ -0,0 +1,17 @@
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_3 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="follower", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_3)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_2 = Leadership(name="leadership", doc="a leadership", children=[option_3, option_4], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,12 @@
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')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_3 = StrOption(name="follower", doc="a follower", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_2)))), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_1 = Leadership(name="leadership", doc="a leadership", children=[option_2, option_3], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,23 @@
{
"rougail.leadership.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership.follower": {
"owner": [
"default",
"default"
],
"value": [
[
"value1"
],
[
"value2"
]
]
}
}

View file

@ -0,0 +1,16 @@
{
"rougail.leadership.leader": [
{
"rougail.leadership.leader": "value1",
"rougail.leadership.follower": [
"value1"
]
},
{
"rougail.leadership.leader": "value2",
"rougail.leadership.follower": [
"value2"
]
}
]
}

View file

@ -0,0 +1,23 @@
{
"rougail.leadership.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership.follower": {
"owner": [
"default",
"default"
],
"value": [
[
"value1"
],
[
"value2"
]
]
}
}

View file

@ -0,0 +1,17 @@
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_3 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="follower", doc="a follower", multi=submulti, default_multi=[Calculation(func['calc_value'], Params((ParamOption(option_3))))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_2 = Leadership(name="leadership", doc="a leadership", children=[option_3, option_4], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,12 @@
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')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_3 = StrOption(name="follower", doc="a follower", multi=submulti, default_multi=[Calculation(func['calc_value'], Params((ParamOption(option_2))))], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_1 = Leadership(name="leadership", doc="a leadership", children=[option_2, option_3], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,26 @@
{
"rougail.leader.leader": {
"owner": "default",
"value": [
"a",
"b"
]
},
"rougail.leader.follower": {
"owner": [
"default",
"default"
],
"value": [
null,
null
]
},
"rougail.variable": {
"owner": "default",
"value": [
null,
null
]
}
}

View file

@ -0,0 +1,16 @@
{
"rougail.leader.leader": [
{
"rougail.leader.leader": "a",
"rougail.leader.follower": null
},
{
"rougail.leader.leader": "b",
"rougail.leader.follower": null
}
],
"rougail.variable": [
null,
null
]
}

View file

@ -0,0 +1,26 @@
{
"rougail.leader.leader": {
"owner": "default",
"value": [
"a",
"b"
]
},
"rougail.leader.follower": {
"owner": [
"default",
"default"
],
"value": [
null,
null
]
},
"rougail.variable": {
"owner": "default",
"value": [
null,
null
]
}
}

View file

@ -0,0 +1,18 @@
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_3 = StrOption(name="leader", doc="leader", multi=True, default=["a", "b"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="follower", doc="follower", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'})
optiondescription_2 = Leadership(name="leader", doc="leader", children=[option_3, option_4], properties=frozenset({"standard"}))
option_5 = StrOption(name="variable", doc="variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_4)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"notempty", "standard"}), informations={'type': 'string'})
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2, option_5], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,13 @@
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')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="leader", doc="leader", multi=True, default=["a", "b"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_3 = StrOption(name="follower", doc="follower", multi=True, properties=frozenset({"standard"}), informations={'type': 'string'})
optiondescription_1 = Leadership(name="leader", doc="leader", children=[option_2, option_3], properties=frozenset({"standard"}))
option_4 = StrOption(name="variable", doc="variable", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"notempty", "standard"}), informations={'type': 'string'})
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, option_4])

View file

@ -0,0 +1,36 @@
{
"rougail.calculate": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leader.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leader.follower1": {
"owner": [
"default",
"default"
],
"value": [
"val11",
"val11"
]
},
"rougail.leader.follower2": {
"owner": [
"default",
"default"
],
"value": [
"val21",
"val21"
]
}
}

View file

@ -0,0 +1,18 @@
{
"rougail.calculate": [
"value1",
"value2"
],
"rougail.leader.leader": [
{
"rougail.leader.leader": "value1",
"rougail.leader.follower1": "val11",
"rougail.leader.follower2": "val21"
},
{
"rougail.leader.leader": "value2",
"rougail.leader.follower1": "val11",
"rougail.leader.follower2": "val21"
}
]
}

View file

@ -0,0 +1,36 @@
{
"rougail.calculate": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leader.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leader.follower1": {
"owner": [
"default",
"default"
],
"value": [
"val11",
"val11"
]
},
"rougail.leader.follower2": {
"owner": [
"default",
"default"
],
"value": [
"val21",
"val21"
]
}
}

View file

@ -0,0 +1,19 @@
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="calculate", doc="a calculated variable", multi=True, default=["value1", "value2"], default_multi="value1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="leader", doc="a leader", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_2)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_5 = StrOption(name="follower1", doc="a follower", multi=True, default_multi="val11", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_6 = StrOption(name="follower2", doc="an other follower", multi=True, default_multi="val21", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_3 = Leadership(name="leader", doc="a leadership", children=[option_4, option_5, option_6], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,14 @@
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')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_1 = StrOption(name="calculate", doc="a calculated variable", multi=True, default=["value1", "value2"], default_multi="value1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_3 = StrOption(name="leader", doc="a leader", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_1)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="follower1", doc="a follower", multi=True, default_multi="val11", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_5 = StrOption(name="follower2", doc="an other follower", multi=True, default_multi="val21", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_2 = Leadership(name="leader", doc="a leadership", children=[option_3, option_4, option_5], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])

View file

@ -0,0 +1,36 @@
{
"rougail.leadership_1.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership_1.follower": {
"owner": [
"default",
"default"
],
"value": [
null,
null
]
},
"rougail.leadership_2.leader": {
"owner": "default",
"value": [
null,
null
]
},
"rougail.leadership_2.follower": {
"owner": [
"default",
"default"
],
"value": [
"val",
"val"
]
}
}

View file

@ -0,0 +1,22 @@
{
"rougail.leadership_1.leader": [
{
"rougail.leadership_1.leader": "value1",
"rougail.leadership_1.follower": null
},
{
"rougail.leadership_1.leader": "value2",
"rougail.leadership_1.follower": null
}
],
"rougail.leadership_2.leader": [
{
"rougail.leadership_2.leader": null,
"rougail.leadership_2.follower": "val"
},
{
"rougail.leadership_2.leader": null,
"rougail.leadership_2.follower": "val"
}
]
}

View file

@ -0,0 +1,36 @@
{
"rougail.leadership_1.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership_1.follower": {
"owner": [
"default",
"default"
],
"value": [
null,
null
]
},
"rougail.leadership_2.leader": {
"owner": "default",
"value": [
null,
null
]
},
"rougail.leadership_2.follower": {
"owner": [
"default",
"default"
],
"value": [
"val",
"val"
]
}
}

View file

@ -0,0 +1 @@
["rougail.leadership_1.follower", "rougail.leadership_1.follower", "rougail.leadership_2.leader"]

View file

@ -0,0 +1,20 @@
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_3 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'})
optiondescription_2 = Leadership(name="leadership_1", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic"}))
option_6 = StrOption(name="leader", doc="a leader", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_4)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_7 = StrOption(name="follower", doc="a follower", multi=True, default_multi="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_5 = Leadership(name="leadership_2", doc="a second leadership", children=[option_6, option_7], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2, optiondescription_5], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,15 @@
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')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'})
optiondescription_1 = Leadership(name="leadership_1", doc="a leadership", children=[option_2, option_3], properties=frozenset({"basic"}))
option_5 = StrOption(name="leader", doc="a leader", multi=True, default=Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_6 = StrOption(name="follower", doc="a follower", multi=True, default_multi="val", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_4 = Leadership(name="leadership_2", doc="a second leadership", children=[option_5, option_6], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4])

View file

@ -0,0 +1,42 @@
{
"rougail.leadership_1.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership_1.follower": {
"owner": [
"default",
"default"
],
"value": [
null,
null
]
},
"rougail.leadership_2.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership_2.follower": {
"owner": [
"default",
"default"
],
"value": [
[
"value1",
"value2"
],
[
"value1",
"value2"
]
]
}
}

View file

@ -0,0 +1,28 @@
{
"rougail.leadership_1.leader": [
{
"rougail.leadership_1.leader": "value1",
"rougail.leadership_1.follower": null
},
{
"rougail.leadership_1.leader": "value2",
"rougail.leadership_1.follower": null
}
],
"rougail.leadership_2.leader": [
{
"rougail.leadership_2.leader": "value1",
"rougail.leadership_2.follower": [
"value1",
"value2"
]
},
{
"rougail.leadership_2.leader": "value2",
"rougail.leadership_2.follower": [
"value1",
"value2"
]
}
]
}

View file

@ -0,0 +1,42 @@
{
"rougail.leadership_1.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership_1.follower": {
"owner": [
"default",
"default"
],
"value": [
null,
null
]
},
"rougail.leadership_2.leader": {
"owner": "default",
"value": [
"value1",
"value2"
]
},
"rougail.leadership_2.follower": {
"owner": [
"default",
"default"
],
"value": [
[
"value1",
"value2"
],
[
"value1",
"value2"
]
]
}
}

View file

@ -0,0 +1 @@
["rougail.leadership_1.follower", "rougail.leadership_1.follower"]

View file

@ -0,0 +1,20 @@
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_3 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_4 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'})
optiondescription_2 = Leadership(name="leadership_1", doc="a leadership", children=[option_3, option_4], properties=frozenset({"basic"}))
option_6 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_7 = StrOption(name="follower", doc="a follower", multi=submulti, default=Calculation(func['calc_value'], Params((ParamOption(option_3)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_5 = Leadership(name="leadership_2", doc="a second leadership", children=[option_6, option_7], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[optiondescription_2, optiondescription_5], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,15 @@
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')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_3 = StrOption(name="follower", doc="a follower", multi=True, properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'})
optiondescription_1 = Leadership(name="leadership_1", doc="a leadership", children=[option_2, option_3], properties=frozenset({"basic"}))
option_5 = StrOption(name="leader", doc="a leader", multi=True, default=["value1", "value2"], properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_6 = StrOption(name="follower", doc="a follower", multi=submulti, default=Calculation(func['calc_value'], Params((ParamOption(option_2)), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_4 = Leadership(name="leadership_2", doc="a second leadership", children=[option_5, option_6], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4])

View file

@ -0,0 +1,17 @@
{
"rougail.var": {
"owner": "default",
"value": [
"Val1",
"VAL2"
]
},
"rougail.dynval1.var": {
"owner": "default",
"value": null
},
"rougail.dynval2.var": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1,8 @@
{
"rougail.var": [
"Val1",
"VAL2"
],
"rougail.dynval1.var": null,
"rougail.dynval2.var": null
}

View file

@ -0,0 +1,17 @@
{
"rougail.var": {
"owner": "default",
"value": [
"Val1",
"VAL2"
]
},
"rougail.dynval1.var": {
"owner": "default",
"value": null
},
"rougail.dynval2.var": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1 @@
["rougail.dynval1.var", "rougail.dynval2.var"]

View file

@ -0,0 +1,32 @@
{
"rougail.var1": {
"owner": "default",
"value": [
"val1",
"val2"
]
},
"rougail.dynval1.dynval1.var": {
"owner": "default",
"value": null
},
"rougail.dynval1.dynval2.var": {
"owner": "default",
"value": null
},
"rougail.dynval2.dynval1.var": {
"owner": "default",
"value": null
},
"rougail.dynval2.dynval2.var": {
"owner": "default",
"value": null
},
"rougail.var2": {
"owner": "default",
"value": [
null,
null
]
}
}

View file

@ -0,0 +1,14 @@
{
"rougail.var1": [
"val1",
"val2"
],
"rougail.dynval1.dynval1.var": null,
"rougail.dynval1.dynval2.var": null,
"rougail.dynval2.dynval1.var": null,
"rougail.dynval2.dynval2.var": null,
"rougail.var2": [
null,
null
]
}

View file

@ -0,0 +1,32 @@
{
"rougail.var1": {
"owner": "default",
"value": [
"val1",
"val2"
]
},
"rougail.dynval1.dynval1.var": {
"owner": "default",
"value": null
},
"rougail.dynval1.dynval2.var": {
"owner": "default",
"value": null
},
"rougail.dynval2.dynval1.var": {
"owner": "default",
"value": null
},
"rougail.dynval2.dynval2.var": {
"owner": "default",
"value": null
},
"rougail.var2": {
"owner": "default",
"value": [
null,
null
]
}
}

View file

@ -0,0 +1 @@
["rougail.dynval1.dynval1.var", "rougail.dynval1.dynval2.var", "rougail.dynval2.dynval1.var", "rougail.dynval2.dynval2.var", "rougail.var2"]

View file

@ -0,0 +1,19 @@
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="var1", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
option_5 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'type': 'string'})
optiondescription_4 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_5], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var1'})
optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="dyn{{ identifier }}", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[optiondescription_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var1'})
option_6 = StrOption(name="var2", doc="A variable calculated", multi=True, default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ["val1"])), kwargs={'__internal_multi': ParamValue(True)})), properties=frozenset({"mandatory", "standard"}), informations={'type': 'string'})
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3, option_6], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,10 @@
---
version: 1.1
var1: "no" # a variable
var2:
description: a varaible
multi: false
default:
- variable: _.var1

View file

@ -0,0 +1,9 @@
---
version: 1.1
var1: # a variable
- val1
var2:
default:
- variable: _.var1

View file

@ -0,0 +1,10 @@
---
version: 1.1
var1: "no" # a variable
var2:
description: a varaible
multi: true
default:
variable: _.var1

View file

@ -0,0 +1,11 @@
---
version: 1.1
var1: # a variable
- no
var2:
description: a varaible
multi: false
default:
variable: _.var1

View file

@ -0,0 +1,28 @@
---
version: 1.1
leadership_1:
description: a leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
leadership_2:
description: a second leadership
type: leadership
leader:
description: a leader
follower:
description: a follower
multi: false
default:
variable: __.leadership_1.follower

View file

@ -0,0 +1,19 @@
---
version: 1.1
variable:
default:
- val1
leader:
type: leadership
leader:
default:
- a
- b
follower:
multi: true
default:
- variable: __.variable

View file

@ -0,0 +1,18 @@
---
version: 1.1
variable:
default: val1
leader:
type: leadership
leader:
default:
- a
- b
follower:
multi: true
default:
variable: __.variable

View file

@ -0,0 +1,19 @@
---
version: 1.1
variable:
default:
- val1
leader:
type: leadership
leader:
default:
- a
- b
follower:
multi: false
default:
- variable: __.variable

View file

@ -0,0 +1,19 @@
---
version: 1.1
variable:
default:
- val1
leader:
type: leadership
leader:
default:
- a
- b
follower:
multi: false
default:
variable: __.variable

View file

@ -0,0 +1,28 @@
---
version: 1.1
leadership_1:
description: a leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
leadership_2:
description: a second leadership
type: leadership
leader:
description: a leader
default:
- variable: __.leadership_1.follower
follower:
description: a follower
default: val

View file

@ -0,0 +1,18 @@
---
version: 1.1
leadership:
description: a leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
multi: true
default:
variable: _.leader

View file

@ -0,0 +1,29 @@
---
version: 1.1
leadership_1:
description: a leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
multi: true
leadership_2:
description: a second leadership
type: leadership
leader:
description: a leader
default:
variable: __.leadership_1.follower
follower:
description: a follower
default: val

View file

@ -0,0 +1,31 @@
---
version: 1.1
leadership_1:
description: a leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
leadership_2:
description: a second leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
multi: false
default:
variable: __.leadership_1.leader

View file

@ -0,0 +1,30 @@
---
version: 1.1
leadership_1:
description: a leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
leadership_2:
description: a second leadership
type: leadership
leader:
description: a leader
default:
- value1
- value2
follower:
description: a follower
default:
- variable: __.leadership_1.leader

View file

@ -0,0 +1,19 @@
---
version: 1.1
calculate:
description: a calculated variable
default:
- value1
- value2
leadership:
description: a leadership
type: leadership
leader:
description: a leader
default:
- variable: __.calculate
follower: val11 # a follower

View file

@ -0,0 +1,17 @@
---
version: 1.1
calculate:
description: a calculated variable
default: value1
leadership:
description: a leadership
type: leadership
leader:
description: a leader
default:
variable: __.calculate
follower: val11 # a follower

View file

@ -0,0 +1,10 @@
---
version: '1.1'
condition:
description: a condition
multi: true
variable:
description: a variable
multi: true
disabled:
variable: _.condition

View file

@ -0,0 +1,13 @@
---
version: '1.1'
condition:
description: a condition
multi: true
default:
- val1
- val2
variable:
description: a variable
multi: true
disabled:
variable: _.condition

Some files were not shown because too many files have changed in this diff Show more