Reactive error tests

This commit is contained in:
egarette@silique.fr 2024-06-19 17:36:18 +02:00
parent 13aedef773
commit e0e6597955
970 changed files with 3272 additions and 25076 deletions

View file

@ -26,6 +26,7 @@ dependencies = [
"pyyaml ~= 6.0.1", "pyyaml ~= 6.0.1",
"pydantic ~= 2.5.2", "pydantic ~= 2.5.2",
"jinja2 ~= 3.1.2", "jinja2 ~= 3.1.2",
"tiramisu ~= 4.1.0",
] ]
[project.optional-dependancies] [project.optional-dependancies]
dev = [ dev = [

View file

@ -30,7 +30,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from typing import Optional from typing import Optional
from rougail.i18n import _ from rougail.i18n import _
from rougail.error import DictConsistencyError from rougail.error import DictConsistencyError
from rougail.utils import get_realpath
from rougail.annotator.variable import Walk from rougail.annotator.variable import Walk
from rougail.object_model import VariableCalculation
class Mode: # pylint: disable=R0903 class Mode: # pylint: disable=R0903
@ -67,11 +69,23 @@ class Annotator(Walk):
name: Mode(idx) name: Mode(idx)
for idx, name in enumerate(self.objectspace.rougailconfig["modes_level"]) for idx, name in enumerate(self.objectspace.rougailconfig["modes_level"])
} }
self.check_leadership()
self.remove_empty_families() self.remove_empty_families()
self.family_names() self.family_names()
self.change_modes() self.change_modes()
self.convert_help() self.convert_help()
def check_leadership(self) -> None:
"""No subfamily in a leadership"""
for family in self.get_families():
if family.type != "leadership":
continue
for variable_path in self.objectspace.parents[family.path]:
variable = self.objectspace.paths[variable_path]
if variable.type in self.objectspace.family_types:
msg = f'the leadership "{family.path}" cannot have the { variable.type } "{ variable.path}"'
raise DictConsistencyError(msg, 24, variable.xmlfiles)
def remove_empty_families(self) -> None: def remove_empty_families(self) -> None:
"""Remove all families without any variable""" """Remove all families without any variable"""
removed_families = [] removed_families = []
@ -103,9 +117,6 @@ class Annotator(Walk):
if not family.description: if not family.description:
family.description = family.name family.description = family.name
# family.doc = family.description
# del family.description
def change_modes(self): def change_modes(self):
"""change the mode of variables""" """change the mode of variables"""
modes_level = self.objectspace.rougailconfig["modes_level"] modes_level = self.objectspace.rougailconfig["modes_level"]
@ -161,6 +172,7 @@ class Annotator(Walk):
continue continue
if leader is None and family.type == "leadership": if leader is None and family.type == "leadership":
leader = variable leader = variable
leader_mode = leader.mode
if variable_path in self.objectspace.families: if variable_path in self.objectspace.families:
# set default mode a subfamily # set default mode a subfamily
if family_mode and not self._has_mode(variable): if family_mode and not self._has_mode(variable):
@ -171,9 +183,9 @@ class Annotator(Walk):
if leader: if leader:
self._set_default_mode_leader(leader, variable) self._set_default_mode_leader(leader, variable)
self._set_default_mode_variable(variable, family_mode) self._set_default_mode_variable(variable, family_mode)
if leader: if leader and leader_mode is not None:
# here because follower can change leader mode # here because follower can change leader mode
self._set_auto_mode(family, leader.mode) self._set_auto_mode(family, leader_mode)
def _has_mode(self, obj) -> bool: def _has_mode(self, obj) -> bool:
return obj.mode and not obj.path in self.mode_auto return obj.mode and not obj.path in self.mode_auto
@ -259,7 +271,7 @@ class Annotator(Walk):
# change variable mode, but not if variables are not in a family # change variable mode, but not if variables are not in a family
is_leadership = family.type == "leadership" is_leadership = family.type == "leadership"
if family.path in self.objectspace.parents: if family.path in self.objectspace.parents:
for idx, variable_path in enumerate(self.objectspace.parents[family.path]): for variable_path in self.objectspace.parents[family.path]:
variable = self.objectspace.paths[variable_path] variable = self.objectspace.paths[variable_path]
if variable.type == "symlink": if variable.type == "symlink":
continue continue
@ -275,6 +287,10 @@ class Annotator(Walk):
if not family.mode: if not family.mode:
# set the lower variable mode to family # set the lower variable mode to family
self._set_auto_mode(family, min_variable_mode) self._set_auto_mode(family, min_variable_mode)
if self.modes[family.mode] < self.modes[min_variable_mode]:
msg = _(f'the family "{family.name}" is in "{family.mode}" mode but variables and '
f'families inside have the higher modes "{min_variable_mode}"')
raise DictConsistencyError(msg, 62, family.xmlfiles)
def _change_variable_mode( def _change_variable_mode(
self, self,
@ -298,6 +314,21 @@ class Annotator(Walk):
if not variable.mode: if not variable.mode:
variable.mode = variable_mode variable.mode = variable_mode
def dynamic_families(self):
"""link dynamic families to object"""
for family in self.get_families():
if family.type != "dynamic":
continue
for variable in self.objectspace.parents[family.path]:
if (
isinstance(variable, self.objectspace.family)
and not variable.leadership
):
msg = _(
f'dynamic family "{family.name}" cannot contains another family'
)
raise DictConsistencyError(msg, 22, family.xmlfiles)
def convert_help(self): def convert_help(self):
"""Convert variable help""" """Convert variable help"""
for family in self.get_families(): for family in self.get_families():

View file

@ -48,7 +48,7 @@ class Annotator(Walk): # pylint: disable=R0903
return return
self.objectspace = objectspace self.objectspace = objectspace
self.convert_value() self.convert_value()
self.add_choice_nil() self.valid_choices()
def convert_value(self) -> None: def convert_value(self) -> None:
"""convert value""" """convert value"""
@ -95,17 +95,22 @@ class Annotator(Walk): # pylint: disable=R0903
self.objectspace.default_multi[variable.path] = variable.default self.objectspace.default_multi[variable.path] = variable.default
variable.default = None variable.default = None
def add_choice_nil(self) -> None: def valid_choices(self) -> None:
"""A variable with type "Choice" that is not mandatory must has "nil" value""" """A variable with type "Choice" that is not mandatory must has "nil" value"""
for variable in self.get_variables(): for variable in self.get_variables():
if variable.type != "choice": if variable.type != "choice":
continue continue
is_none = False
if isinstance(variable.choices, Calculation): if isinstance(variable.choices, Calculation):
continue continue
for choice in variable.choices: if variable.choices is None:
if choice is None: msg = f'the variable "{variable.path}" is a "choice" variable but don\'t have any choice'
is_none = True raise DictConsistencyError(msg, 19, variable.xmlfiles)
break if not variable.mandatory:
if not variable.mandatory and not is_none: self.add_choice_nil(variable)
variable.choices.append(None)
def add_choice_nil(self, variable) -> None:
"""A variable with type "Choice" that is not mandatory must has "nil" value"""
for choice in variable.choices:
if choice is None:
return
variable.choices.append(None)

View file

@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from rougail.i18n import _ from rougail.i18n import _
from rougail.error import DictConsistencyError from rougail.error import DictConsistencyError
from rougail.object_model import Calculation from rougail.object_model import Calculation
from tiramisu.error import display_list
class Walk: class Walk:
@ -75,6 +76,7 @@ class Annotator(Walk): # pylint: disable=R0903
self.convert_variable() self.convert_variable()
self.convert_test() self.convert_test()
self.convert_help() self.convert_help()
self.verify_choices()
def convert_variable(self): def convert_variable(self):
"""convert variable""" """convert variable"""
@ -93,7 +95,6 @@ class Annotator(Walk): # pylint: disable=R0903
self, self,
variable, variable,
) -> None: ) -> None:
# variable has no type # variable has no type
if variable.type is None: if variable.type is None:
# choice type inference from the `choices` attribute # choice type inference from the `choices` attribute
@ -157,3 +158,28 @@ class Annotator(Walk): # pylint: disable=R0903
continue continue
self.objectspace.informations.add(variable.path, "help", variable.help) self.objectspace.informations.add(variable.path, "help", variable.help)
del variable.help del variable.help
def verify_choices(self):
for variable in self.get_variables():
if variable.default is None or variable.type != 'choice':
continue
if not isinstance(variable.choices, list):
continue
choices = variable.choices
has_calculation = False
for choice in choices:
if isinstance(choice, Calculation):
has_calculation = True
break
if has_calculation:
continue
default = variable.default
if not isinstance(default, list):
default = [default]
for value in default:
if isinstance(value, Calculation):
continue
if value not in choices:
msg = _(f'the variable "{variable.path}" has an unvalid default value "{value}" should be in {display_list(choices, separator="or", add_quote=True)}')
raise DictConsistencyError(msg, 26, variable.xmlfiles)

View file

@ -47,6 +47,8 @@ from re import findall, compile
from yaml import safe_load from yaml import safe_load
from pydantic import ValidationError from pydantic import ValidationError
from tiramisu.error import display_list
from .i18n import _ from .i18n import _
from .annotator import SpaceAnnotator from .annotator import SpaceAnnotator
from .tiramisureflector import TiramisuReflector from .tiramisureflector import TiramisuReflector
@ -99,9 +101,12 @@ class Property:
class Paths: class Paths:
_regexp_relative = compile(r"^_*\.(.*)$") _regexp_relative = compile(r"^_*\.(.*)$")
def __init__(self) -> None: def __init__(self,
default_namespace: str,
) -> None:
self._data: Dict[str, Union[Variable, Family]] = {} self._data: Dict[str, Union[Variable, Family]] = {}
self._dynamics: List[str] = [] self._dynamics: Dict[str: str] = {}
self.default_namespace = default_namespace
self.path_prefix = None self.path_prefix = None
def has_value(self) -> bool: def has_value(self) -> bool:
@ -112,21 +117,25 @@ class Paths:
path: str, path: str,
data: Any, data: Any,
is_dynamic: bool, is_dynamic: bool,
dynamic: str,
*, *,
force: bool = False, force: bool = False,
) -> None: ) -> None:
self._data[path] = data self._data[path] = data
if not force and is_dynamic: if not force and is_dynamic:
self._dynamics.append(path) self._dynamics[path] = dynamic
def get_with_dynamic( def get_with_dynamic(
self, self,
path: str, path: str,
suffix_path: str, suffix_path: str,
current_path: str, current_path: str,
version: str,
namespace: str,
xmlfiles: List[str],
) -> Any: ) -> Any:
suffix = None suffix = None
if self._regexp_relative.search(path): if version != '1.0' and self._regexp_relative.search(path):
relative, subpath = path.split(".", 1) relative, subpath = path.split(".", 1)
relative_len = len(relative) relative_len = len(relative)
path_len = current_path.count(".") path_len = current_path.count(".")
@ -134,48 +143,80 @@ class Paths:
path = parent_path + "." + subpath path = parent_path + "." + subpath
else: else:
path = get_realpath(path, suffix_path) path = get_realpath(path, suffix_path)
dynamic_path = None
dynamic_variable_path = None
if not path in self._data:
for dynamic in self._dynamics:
if "{{ suffix }}" in dynamic:
regexp = "^" + dynamic.replace("{{ suffix }}", "(.*)") + "."
finded = findall(regexp, path)
if len(finded) != 1:
continue
splitted_dynamic = dynamic.split(".")
splitted_path = path.split(".")
for idx, s in enumerate(splitted_dynamic):
if "{{ suffix }}" in s:
break
suffix_path = ".".join(splitted_path[idx + 1 :])
if suffix_path:
suffix_path = "." + suffix_path
suffix = splitted_path[idx] + suffix_path
dynamic_path = dynamic
dynamic_variable_path = dynamic + suffix_path
break
elif path.startswith(dynamic):
subpaths = path[len(dynamic) :].split(".", 1)
if (
subpaths[0]
and len(subpaths) > 1
and dynamic + "." + subpaths[1] in self._dynamics
):
suffix = (
dynamic.rsplit(".", 1)[-1] + subpaths[0] + "." + subpaths[1]
)
dynamic_path = dynamic
dynamic_variable_path = dynamic + "." + subpaths[1]
break
if suffix is None and not path in self._data:
return None, None, None
dynamic = None dynamic = None
if suffix and dynamic_variable_path: if not path in self._data and '{{ suffix }}' not in path:
path = dynamic_variable_path new_path = None
dynamic = self._data[dynamic_path] current_path = None
return self._data[path], suffix, dynamic for name in path.split('.'):
parent_path = current_path
if current_path:
current_path += '.' + name
else:
current_path = name
if current_path in self._data:
if new_path:
new_path += '.' + name
else:
new_path = name
continue
for dynamic_path in self._dynamics:
parent_dynamic, name_dynamic = dynamic_path.rsplit('.', 1)
if version == '1.0' and parent_dynamic == parent_path and name_dynamic.endswith('{{ suffix }}') and name == name_dynamic.replace('{{ suffix }}', ''):
new_path += '.' + name_dynamic
break
else:
if new_path:
new_path += '.' + name
else:
new_path = name
path = new_path
if not path in self._data:
current_path = None
new_path = current_path
suffixes = []
for name in path.split('.'):
parent_path = current_path
if current_path:
current_path += '.' + name
else:
current_path = name
#parent_path, name_path = path.rsplit('.', 1)
if current_path in self._data:
if new_path:
new_path += '.' + name
else:
new_path = name
continue
for dynamic_path in self._dynamics:
parent_dynamic, name_dynamic = dynamic_path.rsplit('.', 1)
if "{{ suffix }}" not in name_dynamic or parent_path != parent_dynamic:
continue
regexp = "^" + name_dynamic.replace("{{ suffix }}", "(.*)")
finded = findall(regexp, name)
if len(finded) != 1 or not finded[0]:
continue
suffixes.append(finded[0])
new_path += '.' + name_dynamic
break
else:
if new_path:
new_path += '.' + name
else:
new_path = name
if "{{ suffix }}" in name:
suffixes.append(None)
path = new_path
else:
suffixes = None
if path not in self._data:
return None, None
option = self._data[path]
option_namespace = option.namespace
if self.default_namespace not in [namespace, option_namespace] and namespace != option_namespace:
msg = _(f'A variable or a family located in the "{option_namespace}" namespace '
f'shall not be used in the "{namespace}" namespace')
raise DictConsistencyError(msg, 38, xmlfiles)
return option, suffixes
def __getitem__( def __getitem__(
self, self,
@ -233,7 +274,7 @@ class Informations:
class ParserVariable: class ParserVariable:
def __init__(self, rougailconfig): def __init__(self, rougailconfig):
self.paths = Paths() self.paths = Paths(rougailconfig["variable_namespace"])
self.families = [] self.families = []
self.variables = [] self.variables = []
self.parents = {".": []} self.parents = {".": []}
@ -266,6 +307,8 @@ class ParserVariable:
return return
self.variable = Variable self.variable = Variable
hint = get_type_hints(self.dynamic) hint = get_type_hints(self.dynamic)
# FIXME: only for format 1.0
hint['variable'] = str
self.family_types = hint["type"].__args__ # pylint: disable=W0201 self.family_types = hint["type"].__args__ # pylint: disable=W0201
self.family_attrs = frozenset( # pylint: disable=W0201 self.family_attrs = frozenset( # pylint: disable=W0201
set(hint) - {"name", "path", "xmlfiles"} | {"redefine"} set(hint) - {"name", "path", "xmlfiles"} | {"redefine"}
@ -295,6 +338,7 @@ class ParserVariable:
path: str, path: str,
obj: dict, obj: dict,
family_is_leadership: bool, family_is_leadership: bool,
filename: str,
) -> Literal["variable", "family"]: ) -> Literal["variable", "family"]:
"""Check object to determine if it's a variable or a family""" """Check object to determine if it's a variable or a family"""
# it's already has a variable or a family # it's already has a variable or a family
@ -312,7 +356,8 @@ class ParserVariable:
return "family" return "family"
if obj_type in self.variable_types: if obj_type in self.variable_types:
return "variable" return "variable"
raise Exception(f"unknown type {obj_type} for {path}") msg = f"unknown type {obj_type} for {path}"
raise DictConsistencyError(msg, 43, [filename])
# in a leadership there is only variable # in a leadership there is only variable
if family_is_leadership: if family_is_leadership:
return "variable" return "variable"
@ -358,14 +403,17 @@ class ParserVariable:
first_variable: bool = False, first_variable: bool = False,
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
parent_dynamic: Optional[str] = None,
) -> None: ) -> None:
if name.startswith("_"): if name.startswith("_"):
raise Exception("forbidden!") msg = f'the variable or family name "{name}" is incorrect, it must not starts with "_" character'
raise DictConsistencyError(msg, 16, [filename])
path = f"{subpath}.{name}" path = f"{subpath}.{name}"
typ = self.is_family_or_variable( typ = self.is_family_or_variable(
path, path,
obj, obj,
family_is_leadership, family_is_leadership,
filename,
) )
logging.info("family_or_variable: %s is a %s", path, typ) logging.info("family_or_variable: %s is a %s", path, typ)
if typ == "family": if typ == "family":
@ -381,6 +429,7 @@ class ParserVariable:
first_variable=first_variable, first_variable=first_variable,
family_is_leadership=family_is_leadership, family_is_leadership=family_is_leadership,
family_is_dynamic=family_is_dynamic, family_is_dynamic=family_is_dynamic,
parent_dynamic=parent_dynamic,
) )
def parse_family( def parse_family(
@ -394,6 +443,7 @@ class ParserVariable:
first_variable: bool = False, first_variable: bool = False,
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
parent_dynamic: Optional[str] = None
) -> None: ) -> None:
"""Parse a family""" """Parse a family"""
if obj is None: if obj is None:
@ -419,12 +469,14 @@ class ParserVariable:
path, path,
self.paths[path].model_copy(update=obj), self.paths[path].model_copy(update=obj),
family_is_dynamic, family_is_dynamic,
parent_dynamic,
force=True, force=True,
) )
self.paths[path].xmlfiles.append(filename) self.paths[path].xmlfiles.append(filename)
force_not_first = True force_not_first = True
if self.paths[path].type == "dynamic": if self.paths[path].type == "dynamic":
family_is_dynamic = True family_is_dynamic = True
parent_dynamic = path
else: else:
if "redefine" in obj and obj["redefine"]: if "redefine" in obj and obj["redefine"]:
raise Exception( raise Exception(
@ -435,12 +487,20 @@ class ParserVariable:
raise Exception(f"extra attrs ... {extra_attrs}") raise Exception(f"extra attrs ... {extra_attrs}")
if self.get_family_or_variable_type(family_obj) == "dynamic": if self.get_family_or_variable_type(family_obj) == "dynamic":
family_is_dynamic = True family_is_dynamic = True
parent_dynamic = path
if version == '1.0' and '{{ suffix }}' not in name:
name += '{{ suffix }}'
path += '{{ suffix }}'
if '{{ suffix }}' not in name:
msg = f'dynamic family name must have "{{{{ suffix }}}}" in his name for "{path}"'
raise DictConsistencyError(msg, 13, [filename])
self.add_family( self.add_family(
path, path,
name, name,
family_obj, family_obj,
filename, filename,
family_is_dynamic, family_is_dynamic,
parent_dynamic,
version, version,
) )
force_not_first = False force_not_first = False
@ -449,9 +509,8 @@ class ParserVariable:
for idx, key in enumerate(subfamily_obj): for idx, key in enumerate(subfamily_obj):
value = subfamily_obj[key] value = subfamily_obj[key]
if not isinstance(value, dict) and value is not None: if not isinstance(value, dict) and value is not None:
raise Exception( msg = f'the variable "{path}.{key}" has a wrong type "{type(value)}"'
f'the variable "{path}.{key}" has a wrong type "{type(value)}"' raise DictConsistencyError(msg, 17, [filename])
)
first_variable = not force_not_first and idx == 0 first_variable = not force_not_first and idx == 0
if value is None: if value is None:
value = {} value = {}
@ -464,6 +523,7 @@ class ParserVariable:
first_variable=first_variable, first_variable=first_variable,
family_is_leadership=family_is_leadership, family_is_leadership=family_is_leadership,
family_is_dynamic=family_is_dynamic, family_is_dynamic=family_is_dynamic,
parent_dynamic=parent_dynamic,
) )
def list_attributes( def list_attributes(
@ -502,57 +562,52 @@ class ParserVariable:
path: str, path: str,
name: str, name: str,
family: dict, family: dict,
filenames: Union[str, List[str]], filename: str,
family_is_dynamic: bool, family_is_dynamic: bool,
parent_dynamic: str,
version: str, version: str,
) -> None: ) -> None:
"""Add a new family""" """Add a new family"""
family["path"] = path family["path"] = path
if not isinstance(filenames, list): family["namespace"] = self.namespace
filenames = [filenames] family["xmlfiles"] = [filename]
family["xmlfiles"] = filenames
obj_type = self.get_family_or_variable_type(family) obj_type = self.get_family_or_variable_type(family)
if obj_type == "dynamic": if obj_type == "dynamic":
family_obj = self.dynamic family_obj = self.dynamic
if version == "1.0": if version == "1.0":
if family["variable"] is None: if "variable" not in family:
raise Exception(f'dynamic family must have "variable" attribute for "{family["path"]}" in {family["xmlfiles"]}') raise DictConsistencyError(f'dynamic family must have "variable" attribute for "{path}"', 101, family["xmlfiles"])
family["dynamic"] = {'type': 'variable', if 'dynamic' in family:
'variable': family.pop("variable"), raise DictConsistencyError('variable and dynamic cannot be set together in the dynamic family "{path}"', 100, family['xmlfiles'])
family['dynamic'] = {'type': 'variable',
'variable': family['variable'],
'propertyerror': False, 'propertyerror': False,
'allow_none': True,
} }
del family['variable']
#FIXME only for 1.0
if "variable" in family: if "variable" in family:
raise Exception(f'dynamic family must not have "variable" attribute for "{family["path"]}" in {family["xmlfiles"]}') raise Exception(f'dynamic family must not have "variable" attribute for "{family["path"]}" in {family["xmlfiles"]}')
else: else:
family_obj = self.family family_obj = self.family
# convert to Calculation objects # convert to Calculation objects
for key, value in family.items(): self.parse_parameters(path,
if not self.is_calculation( family,
key, filename,
value, family_is_dynamic,
self.family_calculations, False,
False, version,
): typ='family',
continue )
try:
self.set_calculation(
family,
key,
value,
path,
)
except ValidationError as err:
raise Exception(
f'the family "{path}" in "{filenames}" has an invalid "{key}": {err}'
) from err
try: try:
self.paths.add( self.paths.add(
path, path,
family_obj(name=name, **family), family_obj(name=name, **family),
family_is_dynamic, family_is_dynamic,
parent_dynamic,
) )
except ValidationError as err: except ValidationError as err:
raise Exception(f'invalid family "{path}" in "{filenames}": {err}') from err raise Exception(f'invalid family "{path}" in "{filename}": {err}') from err
self.set_name( self.set_name(
self.paths[path], self.paths[path],
"optiondescription_", "optiondescription_",
@ -576,6 +631,7 @@ class ParserVariable:
first_variable: bool = False, first_variable: bool = False,
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
parent_dynamic: Optional[str] = None,
) -> None: ) -> None:
"""Parse variable""" """Parse variable"""
if obj is None: if obj is None:
@ -586,15 +642,22 @@ class ParserVariable:
f'"{path}" is not a valid variable, there are additional ' f'"{path}" is not a valid variable, there are additional '
f'attributes: "{", ".join(extra_attrs)}"' f'attributes: "{", ".join(extra_attrs)}"'
) )
self.parse_parameters(path, obj, filename) self.parse_parameters(path,
obj,
filename,
family_is_dynamic,
family_is_leadership is True and first_variable is False,
version,
)
self.parse_params(path, obj) self.parse_params(path, obj)
if path in self.paths: if path in self.paths:
if "exists" in obj and not obj.pop("exists"): if "exists" in obj and not obj.pop("exists"):
return return
if not obj.pop("redefine", False): if not obj.pop("redefine", False):
raise Exception(f'Variable "{path}" already exists') msg = f'Variable "{path}" already exists'
raise DictConsistencyError(msg, 45, [filename])
self.paths.add( self.paths.add(
path, self.paths[path].model_copy(update=obj), False, force=True path, self.paths[path].model_copy(update=obj),family_is_dynamic, parent_dynamic, force=True
) )
self.paths[path].xmlfiles.append(filename) self.paths[path].xmlfiles.append(filename)
else: else:
@ -604,15 +667,15 @@ class ParserVariable:
# so do nothing # so do nothing
return return
if "redefine" in obj and obj["redefine"]: if "redefine" in obj and obj["redefine"]:
raise Exception( msg = f'cannot redefine the inexisting variable "{path}" in {filename}'
f'cannot redefine the inexisting variable "{path}" in {filename}' raise DictConsistencyError(msg, 46, [filename])
)
obj["path"] = path obj["path"] = path
self.add_variable( self.add_variable(
name, name,
obj, obj,
filename, filename,
family_is_dynamic, family_is_dynamic,
parent_dynamic,
version version
) )
if family_is_leadership: if family_is_leadership:
@ -621,13 +684,26 @@ class ParserVariable:
else: else:
self.followers.append(path) self.followers.append(path)
def parse_parameters(self, path, obj, filename): def parse_parameters(self,
"""Parse variable parameters""" path: str,
obj: dict,
filename: str,
family_is_dynamic: bool,
is_follower: bool,
version: str,
*,
typ: str='variable',
):
"""Parse variable or family parameters"""
if typ == 'variable':
calculations = self.choice_calculations
else:
calculations = self.family_calculations
for key, value in obj.items(): for key, value in obj.items():
if self.is_calculation( if self.is_calculation(
key, key,
value, value,
self.choice_calculations, calculations,
False, False,
): ):
try: try:
@ -636,19 +712,23 @@ class ParserVariable:
key, key,
value, value,
path, path,
family_is_dynamic,
is_follower,
version,
[filename],
) )
except ValidationError as err: except ValidationError as err:
raise Exception( raise Exception(
f'the variable "{path}" in "{filename}" has an invalid "{key}": {err}' f'the {typ} "{path}" in "{filename}" has an invalid "{key}": {err}'
) from err ) from err
continue continue
if not isinstance(value, list) or key not in self.choice_calculations[0]: if not isinstance(value, list):
continue continue
for idx, val in enumerate(value): for idx, val in enumerate(value):
if not self.is_calculation( if not self.is_calculation(
key, key,
val, val,
self.choice_calculations, calculations,
True, True,
): ):
continue continue
@ -658,12 +738,16 @@ class ParserVariable:
key, key,
val, val,
path, path,
family_is_dynamic,
is_follower,
version,
[filename],
inside_list=True, inside_list=True,
index=idx, index=idx,
) )
except ValidationError as err: except ValidationError as err:
raise Exception( raise Exception(
f'the variable "{path}" in "{filename}" has an invalid "{key}" ' f'the {typ} "{path}" in "{filename}" has an invalid "{key}" '
f"at index {idx}: {err}" f"at index {idx}: {err}"
) from err ) from err
@ -676,7 +760,7 @@ class ParserVariable:
params = [] params = []
for key, val in obj["params"].items(): for key, val in obj["params"].items():
try: try:
params.append(AnyParam(key=key, value=val, type="any")) params.append(AnyParam(key=key, value=val, type="any", path=None, is_follower=None, attribute=None, family_is_dynamic=None, xmlfiles=None))
except ValidationError as err: except ValidationError as err:
raise Exception( raise Exception(
f'"{key}" has an invalid "params" for {path}: {err}' f'"{key}" has an invalid "params" for {path}: {err}'
@ -689,13 +773,16 @@ class ParserVariable:
variable: dict, variable: dict,
filename: str, filename: str,
family_is_dynamic: bool, family_is_dynamic: bool,
parent_dynamic: Optional[str],
version: str version: str
) -> None: ) -> None:
"""Add a new variable""" """Add a new variable"""
if not isinstance(filename, list): if not isinstance(filename, list):
filename = [filename] filename = [filename]
variable["xmlfiles"] = filename
variable["namespace"] = self.namespace
variable["version"] = version variable["version"] = version
variable["xmlfiles"] = filename
variable_type = self.get_family_or_variable_type(variable) variable_type = self.get_family_or_variable_type(variable)
obj = { obj = {
"symlink": SymLink, "symlink": SymLink,
@ -705,12 +792,13 @@ class ParserVariable:
variable_obj = obj(name=name, **variable) variable_obj = obj(name=name, **variable)
except ValidationError as err: except ValidationError as err:
raise Exception( raise Exception(
f'invalid variable "{variable.path}" in "{filename}": {err}' f'invalid variable "{variable["path"]}" in "{filename}": {err}'
) from err ) from err
self.paths.add( self.paths.add(
variable["path"], variable["path"],
variable_obj, variable_obj,
family_is_dynamic, family_is_dynamic,
parent_dynamic,
) )
self.variables.append(variable["path"]) self.variables.append(variable["path"])
self.parents[variable["path"].rsplit(".", 1)[0]].append(variable["path"]) self.parents[variable["path"].rsplit(".", 1)[0]].append(variable["path"])
@ -771,6 +859,10 @@ class ParserVariable:
attribute: str, attribute: str,
value: dict, value: dict,
path: str, path: str,
family_is_dynamic: bool,
is_follower: bool,
version: str,
xmlfiles: List[str],
*, *,
inside_list: bool = False, inside_list: bool = False,
index: int = None, index: int = None,
@ -783,6 +875,9 @@ class ParserVariable:
calculation_object["path_prefix"] = self.path_prefix calculation_object["path_prefix"] = self.path_prefix
calculation_object["path"] = path calculation_object["path"] = path
calculation_object["inside_list"] = inside_list calculation_object["inside_list"] = inside_list
calculation_object["version"] = version
calculation_object["namespace"] = self.namespace
calculation_object["xmlfiles"] = xmlfiles
# #
if "params" in calculation_object: if "params" in calculation_object:
if not isinstance(calculation_object["params"], dict): if not isinstance(calculation_object["params"], dict):
@ -798,6 +893,11 @@ class ParserVariable:
else: else:
param_typ = val["type"] param_typ = val["type"]
val["key"] = key val["key"] = key
val['path'] = path
val['family_is_dynamic'] = family_is_dynamic
val['is_follower'] = is_follower
val['attribute'] = attribute
val['xmlfiles'] = xmlfiles
try: try:
params.append(PARAM_TYPES[param_typ](**val)) params.append(PARAM_TYPES[param_typ](**val))
except ValidationError as err: except ValidationError as err:
@ -813,10 +913,14 @@ class ParserVariable:
f'unknown "return_type" in {attribute} of variable "{path}"' f'unknown "return_type" in {attribute} of variable "{path}"'
) )
# #
if typ == "suffix" and not family_is_dynamic:
msg = f'suffix calculation for "{attribute}" in "{path}" cannot be set none dynamic family'
raise DictConsistencyError(msg, 53, xmlfiles)
calc = CALCULATION_TYPES[typ](**calculation_object)
if index is None: if index is None:
obj[attribute] = CALCULATION_TYPES[typ](**calculation_object) obj[attribute] = calc
if index is not None: else:
obj[attribute][index] = CALCULATION_TYPES[typ](**calculation_object) obj[attribute][index] = calc
class RougailConvert(ParserVariable): class RougailConvert(ParserVariable):
@ -866,6 +970,7 @@ class RougailConvert(ParserVariable):
raise Exception("pfffff") raise Exception("pfffff")
root_parent = path_prefix root_parent = path_prefix
self.path_prefix = path_prefix self.path_prefix = path_prefix
self.namespace = None
self.add_family( self.add_family(
path_prefix, path_prefix,
path_prefix, path_prefix,
@ -873,6 +978,7 @@ class RougailConvert(ParserVariable):
"", "",
False, False,
None, None,
None,
) )
else: else:
root_parent = "." root_parent = "."
@ -886,16 +992,16 @@ class RougailConvert(ParserVariable):
self.rougailconfig["extra_dictionaries"].items(), self.rougailconfig["extra_dictionaries"].items(),
) )
for namespace, extra_dirs in directory_dict: for namespace, extra_dirs in directory_dict:
self.namespace = namespace
if root_parent == ".": if root_parent == ".":
namespace_path = namespace namespace_path = self.namespace
else: else:
namespace_path = f"{root_parent}.{namespace}" namespace_path = f"{root_parent}.{self.namespace}"
if namespace_path in self.parents: if namespace_path in self.parents:
raise Exception("pfff") raise Exception("pfff")
for filename in self.get_sorted_filename(extra_dirs): for filename in self.get_sorted_filename(extra_dirs):
self.parse_variable_file( self.parse_variable_file(
filename, filename,
namespace,
namespace_path, namespace_path,
) )
if path_prefix: if path_prefix:
@ -904,7 +1010,6 @@ class RougailConvert(ParserVariable):
def parse_variable_file( def parse_variable_file(
self, self,
filename: str, filename: str,
namespace: str,
path: str, path: str,
) -> None: ) -> None:
"""Parse file""" """Parse file"""
@ -916,7 +1021,7 @@ class RougailConvert(ParserVariable):
) )
self.parse_family( self.parse_family(
filename, filename,
namespace, self.namespace,
path, path,
{}, {},
version, version,
@ -961,13 +1066,17 @@ class RougailConvert(ParserVariable):
filename: str, filename: str,
) -> None: ) -> None:
"""version is mandatory in YAML file""" """version is mandatory in YAML file"""
if "version" not in obj: for name in ["_version", "version"]:
raise Exception(f'"version" attribut is mandatory in yaml file {filename}') if name not in obj:
version = str(obj.pop("version")) continue
version = str(obj.pop(name))
break
else:
msg = '"version" attribut is mandatory in YAML file'
raise DictConsistencyError(msg, 27, [filename])
if version not in self.supported_version: if version not in self.supported_version:
raise Exception( msg = f'version "{version}" is not supported, list of supported versions: {display_list(self.supported_version, separator="or", add_quote=True)}'
f"pffff version ... {version} not in {self.supported_version}" raise DictConsistencyError(msg, 28, [filename])
)
return version return version
def annotate( def annotate(

View file

@ -79,9 +79,3 @@ class UpgradeError(Exception):
class NotFoundError(Exception): class NotFoundError(Exception):
"not found error" "not found error"
pass pass
class VariableNotFoundError(NotFoundError):
"Variable was not found"
def __init__(self, errmsg, varname):
self.varname = varname

View file

@ -30,9 +30,10 @@ from pydantic import (
ConfigDict, ConfigDict,
) )
from .utils import get_jinja_variable_to_param, get_realpath from .utils import get_jinja_variable_to_param, get_realpath
from .error import VariableNotFoundError from .error import DictConsistencyError
BASETYPE = Union[StrictBool, StrictInt, StrictFloat, StrictStr, None] BASETYPE = Union[StrictBool, StrictInt, StrictFloat, StrictStr, None]
PROPERTY_ATTRIBUTE = ["frozen", "hidden", "disabled", "mandatory"]
def convert_boolean(value: str) -> bool: def convert_boolean(value: str) -> bool:
@ -44,7 +45,9 @@ def convert_boolean(value: str) -> bool:
return True return True
elif value == "false": elif value == "false":
return False return False
raise Exception(f"unknown boolean value {value}") elif value in ['', None]:
return None
raise Exception(f'unknown boolean value "{value}"')
CONVERT_OPTION = { CONVERT_OPTION = {
@ -89,9 +92,18 @@ CONVERT_OPTION = {
class Param(BaseModel): class Param(BaseModel):
key: str key: str
model_config = ConfigDict(extra="forbid") model_config = ConfigDict(extra="forbid")
def __init__(self,
path,
attribute,
family_is_dynamic,
is_follower,
xmlfiles,
**kwargs,
) -> None:
super().__init__(**kwargs)
class AnyParam(Param): class AnyParam(Param):
type: str type: str
@ -107,6 +119,15 @@ class VariableParam(Param):
class SuffixParam(Param): class SuffixParam(Param):
type: str type: str
suffix: Optional[int] = None
def __init__(self,
**kwargs,
) -> None:
if not kwargs['family_is_dynamic']:
msg = f'suffix parameter for "{kwargs["attribute"]}" in "{kwargs["path"]}" cannot be set none dynamic family'
raise DictConsistencyError(msg, 10, kwargs['xmlfiles'])
super().__init__(**kwargs)
class InformationParam(Param): class InformationParam(Param):
@ -118,6 +139,16 @@ class InformationParam(Param):
class IndexParam(Param): class IndexParam(Param):
type: str type: str
def __init__(self,
**kwargs,
) -> None:
if not kwargs["is_follower"]:
msg = f'the variable "{kwargs["path"]}" is not a follower, so cannot have index type for param in "{kwargs["attribute"]}"'
raise DictConsistencyError(msg, 25, kwargs['xmlfiles'])
super().__init__(**kwargs)
PARAM_TYPES = { PARAM_TYPES = {
"any": AnyParam, "any": AnyParam,
@ -132,6 +163,9 @@ class Calculation(BaseModel):
path_prefix: Optional[str] path_prefix: Optional[str]
path: str path: str
inside_list: bool inside_list: bool
version: str
namespace: str
xmlfiles: List[str]
model_config = ConfigDict(extra="forbid") model_config = ConfigDict(extra="forbid")
@ -148,8 +182,8 @@ class Calculation(BaseModel):
for param_obj in self.params: for param_obj in self.params:
param = param_obj.model_dump() param = param_obj.model_dump()
if param.get("type") == "variable": if param.get("type") == "variable":
variable, suffix, dynamic = objectspace.paths.get_with_dynamic( variable, suffix = objectspace.paths.get_with_dynamic(
param["variable"], self.path_prefix, self.path param["variable"], self.path_prefix, self.path, self.version, self.namespace, self.xmlfiles
) )
if not variable: if not variable:
if not param.get("optional"): if not param.get("optional"):
@ -160,18 +194,18 @@ class Calculation(BaseModel):
param["variable"] = variable param["variable"] = variable
if suffix: if suffix:
param["suffix"] = suffix param["suffix"] = suffix
param["dynamic"] = dynamic
if param.get("type") == "information": if param.get("type") == "information":
if param["variable"]: if param["variable"]:
variable, suffix, dynamic = objectspace.paths.get_with_dynamic( variable, suffix = objectspace.paths.get_with_dynamic(
param["variable"], self.path_prefix, self.path param["variable"], self.path_prefix, self.path, self.version, self.namespace, self.xmlfiles
) )
# variable_path = self.get_realpath(param["variable"])
if not variable: if not variable:
raise Exception("pffff") msg = f'cannot find variable "{param["variable"]}" defined in "{self.attribute_name}" for "{self.path}"'
raise DictConsistencyError(msg, 14, self.xmlfiles)
param["variable"] = variable param["variable"] = variable
if suffix: if suffix:
raise Exception("pff not dynamic with information") msg = f'variable "{param["variable"]}" defined in "{self.attribute_name}" for "{self.path}" is a dynamic variable'
raise DictConsistencyError(msg, 15, self.xmlfiles)
else: else:
del param["variable"] del param["variable"]
params[param.pop("key")] = param params[param.pop("key")] = param
@ -217,13 +251,15 @@ class JinjaCalculation(Calculation):
default["params"] |= self.get_params(objectspace) default["params"] |= self.get_params(objectspace)
if params: if params:
default["params"] |= params default["params"] |= params
for sub_variable, suffix, true_path, dynamic in get_jinja_variable_to_param( for sub_variable, suffix, true_path in get_jinja_variable_to_param(
self.path, self.path,
self.jinja, self.jinja,
objectspace, objectspace,
variable.xmlfiles, variable.xmlfiles,
objectspace.functions, objectspace.functions,
self.path_prefix, self.path_prefix,
self.version,
self.namespace,
): ):
if sub_variable.path in objectspace.variables: if sub_variable.path in objectspace.variables:
default["params"][true_path] = { default["params"][true_path] = {
@ -232,7 +268,6 @@ class JinjaCalculation(Calculation):
} }
if suffix: if suffix:
default["params"][true_path]["suffix"] = suffix default["params"][true_path]["suffix"] = suffix
default["params"][true_path]["dynamic"] = dynamic
return default return default
def to_function( def to_function(
@ -265,7 +300,7 @@ class JinjaCalculation(Calculation):
False, False,
objectspace, objectspace,
) )
elif self.attribute_name in ["frozen", "hidden", "disabled", "mandatory"]: elif self.attribute_name in PROPERTY_ATTRIBUTE:
if self.return_type: if self.return_type:
raise Exception("return_type not allowed!") raise Exception("return_type not allowed!")
return self._jinja_to_function( return self._jinja_to_function(
@ -302,16 +337,18 @@ class VariableCalculation(Calculation):
] ]
variable: StrictStr variable: StrictStr
propertyerror: bool = True propertyerror: bool = True
allow_none: bool = False
def to_function( def to_function(
self, self,
objectspace, objectspace,
) -> dict: ) -> dict:
variable, suffix, dynamic = objectspace.paths.get_with_dynamic( variable, suffix = objectspace.paths.get_with_dynamic(
self.variable, self.path_prefix, self.path self.variable, self.path_prefix, self.path, self.version, self.namespace, self.xmlfiles
) )
if not variable: if not variable:
raise VariableNotFoundError(f"Variable not found {variable_path}", variable_path) msg = f'Variable not found "{self.variable}" for attribut "{self.attribute_name}" for variable "{self.path}"'
raise DictConsistencyError(msg, 88, self.xmlfiles)
if not isinstance(variable, objectspace.variable): if not isinstance(variable, objectspace.variable):
# FIXME remove the pfff # FIXME remove the pfff
raise Exception("pfff it's a family") raise Exception("pfff it's a family")
@ -322,21 +359,39 @@ class VariableCalculation(Calculation):
} }
if suffix: if suffix:
param["suffix"] = suffix param["suffix"] = suffix
param["dynamic"] = dynamic
params = {None: [param]} params = {None: [param]}
function = "calc_value" function = "calc_value"
help_function = None help_function = None
if self.attribute_name in ["frozen", "hidden", "disabled", "mandatory"]: if self.attribute_name in PROPERTY_ATTRIBUTE:
function = "variable_to_property" function = "variable_to_property"
help_function = "variable_to_property" help_function = "variable_to_property"
if variable.type != "boolean": if variable.type != "boolean":
raise Exception("only boolean!") raise Exception("only boolean!")
params[None].insert(0, self.attribute_name) params[None].insert(0, self.attribute_name)
if not self.inside_list and self.path in objectspace.multis: if self.allow_none:
variable_path = self.get_realpath(self.variable)
params["allow_none"] = True params["allow_none"] = True
if self.inside_list and variable.path in objectspace.multis: # current variable is a multi
raise Exception("pfff") if self.attribute_name in PROPERTY_ATTRIBUTE:
needs_multi = False
elif self.attribute_name != "default":
needs_multi = True
else:
needs_multi = self.path in objectspace.multis
calc_variable_is_multi = variable.path in objectspace.multis or (variable.path in objectspace.paths._dynamics and (suffix is None or suffix[-1] is None) and objectspace.paths._dynamics[variable.path] != objectspace.paths._dynamics.get(self.path))
if needs_multi:
if calc_variable_is_multi:
if self.inside_list:
msg = f'the variable "{self.path}" has an invalid attribute "{self.attribute_name}", the variable "{variable.path}" is multi but is inside a list'
raise DictConsistencyError(msg, 18, self.xmlfiles)
elif not self.inside_list:
msg = f'the variable "{self.path}" has an invalid attribute "{self.attribute_name}", the variable "{variable.path}" is not multi but is not inside a list'
raise DictConsistencyError(msg, 20, self.xmlfiles)
elif self.inside_list:
msg = f'the variable "{self.path}" has an invalid attribute "{self.attribute_name}", it\'s a list'
raise DictConsistencyError(msg, 23, self.xmlfiles)
elif calc_variable_is_multi:
msg = f'the variable "{self.path}" has an invalid attribute "{self.attribute_name}", the variable "{variable.path}" is a multi'
raise DictConsistencyError(msg, 21, self.xmlfiles)
ret = { ret = {
"function": function, "function": function,
"params": params, "params": params,
@ -347,7 +402,7 @@ class VariableCalculation(Calculation):
class InformationCalculation(Calculation): class InformationCalculation(Calculation):
attribute_name: Literal["default"] attribute_name: Literal["default", "choice", "dynamic"]
information: StrictStr information: StrictStr
variable: Optional[StrictStr] variable: Optional[StrictStr]
@ -360,9 +415,10 @@ class InformationCalculation(Calculation):
"information": self.information, "information": self.information,
} }
if self.variable: if self.variable:
variable_path = self.get_realpath(self.variable) variable, suffix = objectspace.paths.get_with_dynamic(
variable = objectspace.paths[variable_path] self.variable, self.path_prefix, self.path, self.version, self.namespace, self.xmlfiles
if variable is None: )
if variable is None or suffix is not None:
raise Exception("pfff") raise Exception("pfff")
param["variable"] = variable param["variable"] = variable
return { return {
@ -372,25 +428,32 @@ class InformationCalculation(Calculation):
class SuffixCalculation(Calculation): class SuffixCalculation(Calculation):
attribute_name: Literal["default"] attribute_name: Literal["default", "choice", "dynamic"]
suffix: Optional[int] = None
def to_function( def to_function(
self, self,
objectspace, objectspace,
) -> dict: ) -> dict:
suffix = {"type": "suffix"}
if self.suffix is not None:
suffix['suffix'] = self.suffix
return { return {
"function": "calc_value", "function": "calc_value",
"params": {None: [{"type": "suffix"}]}, "params": {None: [suffix]},
} }
class IndexCalculation(Calculation): class IndexCalculation(Calculation):
attribute_name: Literal["default"] attribute_name: Literal["default", "choice", "dynamic"]
def to_function( def to_function(
self, self,
objectspace, objectspace,
) -> dict: ) -> dict:
if self.path not in objectspace.followers:
msg = f'the variable "{self.path}" is not a follower, so cannot have index type for "{self.attribute_name}"'
raise DictConsistencyError(msg, 60, self.xmlfiles)
return { return {
"function": "calc_value", "function": "calc_value",
"params": {None: [{"type": "index"}]}, "params": {None: [{"type": "index"}]},
@ -404,32 +467,37 @@ CALCULATION_TYPES = {
"suffix": SuffixCalculation, "suffix": SuffixCalculation,
"index": IndexCalculation, "index": IndexCalculation,
} }
BASETYPE_CALC = Union[StrictBool, StrictInt, StrictFloat, StrictStr, None, Calculation] BASETYPE_CALC = Union[StrictBool, StrictInt, StrictFloat, StrictStr, Calculation, None]
class Family(BaseModel): class Family(BaseModel):
name: str name: str
description: Optional[str] = None description: Optional[str] = None
type: Literal["family", "leadership", "dynamic"] = "family" type: Literal["family", "leadership", "dynamic"] = "family"
path: str
help: Optional[str] = None help: Optional[str] = None
mode: Optional[str] = None mode: Optional[str] = None
hidden: Union[bool, Calculation] = False hidden: Union[bool, Calculation] = False
disabled: Union[bool, Calculation] = False disabled: Union[bool, Calculation] = False
namespace: Optional[str]
xmlfiles: List[str] = [] xmlfiles: List[str] = []
path: str
model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True) model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True)
class Dynamic(Family): class Dynamic(Family):
variable: str=None variable: str=None
dynamic: Optional[BASETYPE_CALC] # None only for format 1.0
dynamic: Union[List[Union[StrictStr, Calculation]], Calculation]
class Variable(BaseModel): class Variable(BaseModel):
# type will be set dynamically in `annotator/value.py`, default is None
type: str = None
name: str name: str
description: Optional[str] = None description: Optional[str] = None
default: Union[List[BASETYPE_CALC], BASETYPE_CALC] = None default: Union[List[BASETYPE_CALC], BASETYPE_CALC] = None
choices: Optional[Union[List[BASETYPE_CALC], Calculation]] = None
params: Optional[List[Param]] = None params: Optional[List[Param]] = None
validators: Optional[List[Calculation]] = None validators: Optional[List[Calculation]] = None
multi: Optional[bool] = None multi: Optional[bool] = None
@ -441,12 +509,10 @@ class Variable(BaseModel):
auto_save: bool = False auto_save: bool = False
mode: Optional[str] = None mode: Optional[str] = None
test: Optional[list] = None test: Optional[list] = None
xmlfiles: List[str] = []
path: str path: str
namespace: str
version: str version: str
# type will be set dynamically in `annotator/value.py`, default is None xmlfiles: List[str] = []
type: str = None
choices: Union[None, List[BASETYPE_CALC], Calculation] = None
model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True) model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True)

View file

@ -1,220 +0,0 @@
"""load XML and YAML file from directory
Created by:
EOLE (http://eole.orion.education.fr)
Copyright (C) 2005-2018
Forked by:
Cadoles (http://www.cadoles.com)
Copyright (C) 2019-2021
Silique (https://www.silique.fr)
Copyright (C) 2022-2024
distribued with GPL-2 or later license
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
from typing import List
from os.path import join, isfile
from os import listdir
from lxml.etree import DTD, parse, XMLSyntaxError # pylint: disable=E0611
from pykwalify.compat import yml
from pykwalify.core import Core
from pykwalify.errors import SchemaError
from .i18n import _
from .error import DictConsistencyError
FORCE_SUBYAML = ["override"]
SCHEMA_DATA = {}
class Reflector:
"""Helper class for loading the Creole XML file,
parsing it, validating against the Creole DTD
"""
def __init__(
self,
rougailconfig: "RougailConfig",
) -> None:
"""Loads the Creole DTD
:raises IOError: if the DTD is not found
:param dtdfilename: the full filename of the Creole DTD
"""
dtdfilename = rougailconfig["dtdfilename"]
yamlschema_filename = rougailconfig["yamlschema_filename"]
if not isfile(dtdfilename):
raise IOError(_(f"no such DTD file: {dtdfilename}"))
with open(dtdfilename, "r") as dtdfd:
self.dtd = DTD(dtdfd)
if not isfile(yamlschema_filename):
raise IOError(_(f"no such YAML Schema file: {yamlschema_filename}"))
self.yamlschema_filename = yamlschema_filename
self.schema_data = None
def load_dictionaries_from_folders(
self,
folders: List[str],
just_doc: bool,
):
"""Loads all the dictionary files located in the folders' list
:param folders: list of full folder's name
"""
filenames = {}
for folder in folders:
for filename in listdir(folder):
if filename.endswith(".xml"):
ext = "xml"
full_filename = join(folder, filename)
elif filename.endswith(".yml"):
ext = "yml"
full_filename = join(folder, filename)
else:
continue
if filename in filenames:
raise DictConsistencyError(
_(f"duplicate dictionary file name {filename}"),
78,
[filenames[filename][1], full_filename],
)
filenames[filename] = (ext, full_filename)
if not filenames and not just_doc:
raise DictConsistencyError(_("there is no dictionary file"), 77, folders)
file_names = list(filenames.keys())
file_names.sort()
for filename in file_names:
ext, filename = filenames[filename]
if ext == "xml":
yield self.load_xml_file(filename)
else:
yield self.load_yml_file(filename)
def load_xml_file(
self,
filename: str,
):
try:
document = parse(filename)
except XMLSyntaxError as err:
raise DictConsistencyError(
_(f"not a XML file: {err}"), 52, [filename]
) from err
if not self.dtd.validate(document):
dtd_error = self.dtd.error_log.filter_from_errors()[0]
msg = _(f"not a valid XML file: {dtd_error}")
raise DictConsistencyError(msg, 43, [filename])
return filename, document.getroot()
def load_yml_file(
self,
filename: str,
):
global SCHEMA_DATA
if self.yamlschema_filename not in SCHEMA_DATA:
with open(self.yamlschema_filename, "r") as fh:
SCHEMA_DATA[self.yamlschema_filename] = yml.load(fh)
try:
document = Core(
source_file=filename,
schema_data=SCHEMA_DATA[self.yamlschema_filename],
)
except XMLSyntaxError as err:
raise DictConsistencyError(
_(f"not a XML file: {err}"), 52, [filename]
) from err
try:
return filename, YParser(document.validate(raise_exception=True))
except SchemaError as yaml_error:
msg = _(f"not a valid YAML file: {yaml_error}")
raise DictConsistencyError(msg, 43, [filename])
class SubYAML:
def __init__(self, key, value):
if value is None:
value = {}
self.tag = key
self.dico = value
if "text" in value:
self.text = value["text"]
else:
self.text = None
if isinstance(value, list):
self.attrib = {}
else:
self.attrib = {
k: v
for k, v in value.items()
if not isinstance(v, list) and k not in FORCE_SUBYAML
}
def __str__(self):
return f"<SubYAML {self.tag} at {id(self)}>"
def __iter__(self):
if isinstance(self.dico, list):
lists = []
for dico in self.dico:
for key, value in dico.items():
if not isinstance(value, list):
value = [value]
lists.append((key, value))
else:
lists = []
for key, values in self.dico.items():
if key == "variables":
for v in values:
if "variable" in v:
lists.append(("variable", v["variable"]))
if "family" in v:
lists.append(("family", v["family"]))
else:
lists.append((key, values))
for key, values in lists:
if key not in FORCE_SUBYAML and not isinstance(values, list):
continue
if values is None:
values = [None]
for value in values:
yield SubYAML(key, value)
def __len__(self):
length = 0
for _ in self.__iter__():
length += 1
return length
class YParser:
def __init__(self, dico):
self.dico = dico
def __iter__(self):
for key, values in self.dico.items():
if not isinstance(values, list):
continue
if key == "variables":
yield SubYAML(key, values)
else:
for val in values:
yield SubYAML(key, val)

View file

@ -28,12 +28,89 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
try: try:
from tiramisu4 import DynOptionDescription from tiramisu5 import DynOptionDescription, calc_value
except ModuleNotFoundError: except ModuleNotFoundError:
from tiramisu import DynOptionDescription from tiramisu import DynOptionDescription, calc_value
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment
from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning
from .utils import normalize_family from .utils import normalize_family
global func
func = {'calc_value': calc_value}
dict_env = {}
ENV = SandboxedEnvironment(loader=DictLoader(dict_env), undefined=StrictUndefined)
ENV.filters = func
ENV.compile_templates('jinja_caches', zip=None)
def load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION
kw = {}
for key, value in kwargs.items():
if '.' in key:
c_kw = kw
path, var = key.rsplit('.', 1)
for subkey in path.split('.'):
c_kw = c_kw.setdefault(subkey, {})
c_kw[var] = value
else:
kw[key] = value
values = ENV.get_template(__internal_jinja).render(kw, **func).strip()
convert = CONVERT_OPTION[__internal_type].get('func', str)
if __internal_multi:
return [convert(val) for val in values.split()]
values = convert(values)
return values if values != '' and values != 'None' else None
def variable_to_property(prop, value):
return prop if value else None
def jinja_to_property(prop, **kwargs):
value = func['jinja_to_function'](**kwargs)
return func['variable_to_property'](prop, value is not None)
def jinja_to_property_help(prop, **kwargs):
value = func['jinja_to_function'](**kwargs)
return (prop, f'\"{prop}\" ({value})')
def valid_with_jinja(warnings_only=False, **kwargs):
global ValueWarning
value = func['jinja_to_function'](**kwargs)
if value:
if warnings_only:
raise ValueWarning(value)
else:
raise ValueError(value)
func['jinja_to_function'] = jinja_to_function
func['jinja_to_property'] = jinja_to_property
func['jinja_to_property_help'] = jinja_to_property_help
func['variable_to_property'] = variable_to_property
func['valid_with_jinja'] = valid_with_jinja
class ConvertDynOptionDescription(DynOptionDescription): class ConvertDynOptionDescription(DynOptionDescription):
"""Suffix could be an integer, we should convert it in str """Suffix could be an integer, we should convert it in str
Suffix could also contain invalid character, so we should "normalize" it Suffix could also contain invalid character, so we should "normalize" it

View file

@ -28,12 +28,12 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from typing import Optional from typing import Optional, Union
from json import dumps from json import dumps
from os.path import isfile, basename from os.path import isfile, basename
from .i18n import _ from .i18n import _
from .error import DictConsistencyError, VariableNotFoundError from .error import DictConsistencyError
from .utils import normalize_family from .utils import normalize_family
from .object_model import Calculation, CONVERT_OPTION from .object_model import Calculation, CONVERT_OPTION
@ -59,8 +59,8 @@ class TiramisuReflector:
objectspace, objectspace,
funcs_paths, funcs_paths,
): ):
self.informations_idx = -1
self.rougailconfig = objectspace.rougailconfig self.rougailconfig = objectspace.rougailconfig
self.jinja_added = False
self.reflector_objects = {} self.reflector_objects = {}
self.text = { self.text = {
"header": [], "header": [],
@ -76,103 +76,28 @@ class TiramisuReflector:
"from tiramisu.setting import ALLOWED_LEADER_PROPERTIES", "from tiramisu.setting import ALLOWED_LEADER_PROPERTIES",
] ]
) )
for mode in self.rougailconfig["modes_level"]:
self.text["header"].append(f'ALLOWED_LEADER_PROPERTIES.add("{mode}")')
if funcs_paths: if funcs_paths:
if self.rougailconfig["export_with_import"]: if self.rougailconfig["export_with_import"]:
self.text["header"].extend( self.text["header"].extend(
[ ["from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription"]
"from importlib.machinery import SourceFileLoader as _SourceFileLoader",
"from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec",
"global func",
"func = {'calc_value': calc_value}",
"",
"def _load_functions(path):",
" global _SourceFileLoader, _spec_from_loader, _module_from_spec, func",
" loader = _SourceFileLoader('func', path)",
" spec = _spec_from_loader(loader.name, loader)",
" func_ = _module_from_spec(spec)",
" loader.exec_module(func_)",
" for function in dir(func_):",
" if function.startswith('_'):",
" continue",
" func[function] = getattr(func_, function)",
]
) )
for funcs_path in sorted(funcs_paths, key=sorted_func_name): for funcs_path in sorted(funcs_paths, key=sorted_func_name):
if not isfile(funcs_path): if not isfile(funcs_path):
continue continue
self.text["header"].append(f"_load_functions('{funcs_path}')") self.text["header"].append(f"load_functions('{funcs_path}')")
if self.rougailconfig["export_with_import"]:
for mode in self.rougailconfig["modes_level"]:
self.text["header"].append(f'ALLOWED_LEADER_PROPERTIES.add("{mode}")')
self.objectspace = objectspace self.objectspace = objectspace
self.make_tiramisu_objects() self.make_tiramisu_objects()
if self.rougailconfig["export_with_import"] and (
self.rougailconfig["force_convert_dyn_option_description"]
or self.objectspace.has_dyn_option is True
):
self.text["header"].append(
"from rougail.tiramisu import ConvertDynOptionDescription"
)
for key, value in self.objectspace.jinja.items(): for key, value in self.objectspace.jinja.items():
self.add_jinja_to_function(key, value) self.add_jinja_to_function(key, value)
def add_jinja_support(self):
if not self.jinja_added:
self.text["header"].extend(
[
"from jinja2 import StrictUndefined, DictLoader",
"from jinja2.sandbox import SandboxedEnvironment",
"from rougail import CONVERT_OPTION",
"from tiramisu.error import ValueWarning",
"def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):",
" global ENV, CONVERT_OPTION",
" kw = {}",
" for key, value in kwargs.items():",
" if '.' in key:",
" c_kw = kw",
" path, var = key.rsplit('.', 1)",
" for subkey in path.split('.'):",
" c_kw = c_kw.setdefault(subkey, {})",
" c_kw[var] = value",
" else:",
" kw[key] = value",
" values = ENV.get_template(__internal_jinja).render(kw, **func).strip()",
" convert = CONVERT_OPTION[__internal_type].get('func', str)",
" if __internal_multi:",
" return [convert(val) for val in values.split()]",
" values = convert(values)",
" return values if values != '' and values != 'None' else None",
"def variable_to_property(prop, value):",
" return prop if value else None",
"def jinja_to_property(prop, **kwargs):",
" value = func['jinja_to_function'](**kwargs)",
" return func['variable_to_property'](prop, value is not None)",
"def jinja_to_property_help(prop, **kwargs):",
" value = func['jinja_to_function'](**kwargs)",
" return (prop, f'\"{prop}\" ({value})')",
"def valid_with_jinja(warnings_only=False, **kwargs):",
" global ValueWarning",
" value = func['jinja_to_function'](**kwargs)",
" if value:",
" if warnings_only:",
" raise ValueWarning(value)",
" else:",
" raise ValueError(value)",
"func['jinja_to_function'] = jinja_to_function",
"func['jinja_to_property'] = jinja_to_property",
"func['jinja_to_property_help'] = jinja_to_property_help",
"func['variable_to_property'] = variable_to_property",
"func['valid_with_jinja'] = valid_with_jinja",
"dict_env = {}",
]
)
self.jinja_added = True
def add_jinja_to_function( def add_jinja_to_function(
self, self,
variable_name: str, variable_name: str,
jinja: str, jinja: str,
) -> None: ) -> None:
self.add_jinja_support()
jinja_text = dumps(jinja, ensure_ascii=False) jinja_text = dumps(jinja, ensure_ascii=False)
self.text["header"].append(f"dict_env['{variable_name}'] = {jinja_text}") self.text["header"].append(f"dict_env['{variable_name}'] = {jinja_text}")
@ -242,16 +167,12 @@ class TiramisuReflector:
self.objectspace.set_name(elt, "optiondescription_") self.objectspace.set_name(elt, "optiondescription_")
return self.objectspace.reflector_names[elt.path] return self.objectspace.reflector_names[elt.path]
def get_information_name(self):
self.informations_idx += 1
return f"information_{self.informations_idx}"
def get_text(self): def get_text(self):
"""Get text""" """Get text"""
if self.jinja_added:
self.text["header"].extend(
[
"ENV = SandboxedEnvironment(loader=DictLoader(dict_env), undefined=StrictUndefined)",
"ENV.filters = func",
"ENV.compile_templates('jinja_caches', zip=None)",
]
)
return "\n".join(self.text["header"] + self.text["option"]) return "\n".join(self.text["header"] + self.text["option"])
@ -269,19 +190,22 @@ class Common:
self.tiramisu = tiramisu self.tiramisu = tiramisu
tiramisu.reflector_objects[elt.path] = self tiramisu.reflector_objects[elt.path] = self
self.object_type = None self.object_type = None
self.informations = []
def get(self, calls, parent_name): def get(self, calls, parent_name):
"""Get tiramisu's object""" """Get tiramisu's object"""
self_calls = calls.copy() if self.elt.path in calls:
if self.elt.path in self_calls:
msg = f'"{self.elt.path}" will make an infinite loop' msg = f'"{self.elt.path}" will make an infinite loop'
raise DictConsistencyError(msg, 80, self.elt.xmlfiles) raise DictConsistencyError(msg, 80, self.elt.xmlfiles)
self_calls = calls.copy()
self_calls.append(self.elt.path) self_calls.append(self.elt.path)
self.calls = self_calls self.calls = self_calls
if self.option_name is None: if self.option_name is None:
self.option_name = self.objectspace.reflector_names[self.elt.path] self.option_name = self.objectspace.reflector_names[self.elt.path]
self.populate_attrib() self.populate_attrib()
self.populate_informations() if self.informations:
for information in self.informations:
self.tiramisu.text['option'].append(f'{information}.set_option({self.option_name})')
return self.option_name return self.option_name
def populate_attrib(self): def populate_attrib(self):
@ -294,6 +218,7 @@ class Common:
keys["properties"] = self.properties_to_string( keys["properties"] = self.properties_to_string(
self.objectspace.properties[self.elt.path] self.objectspace.properties[self.elt.path]
) )
self.populate_informations(keys)
attrib = ", ".join([f"{key}={value}" for key, value in keys.items()]) attrib = ", ".join([f"{key}={value}" for key, value in keys.items()])
self.tiramisu.text["option"].append( self.tiramisu.text["option"].append(
f"{self.option_name} = {self.object_type}({attrib})" f"{self.option_name} = {self.object_type}({attrib})"
@ -322,12 +247,11 @@ class Common:
for property_, value in values.items(): for property_, value in values.items():
if value is True: if value is True:
properties.append(self.convert_str(property_)) properties.append(self.convert_str(property_))
elif isinstance(value, list):
for val in value:
calc_properties.append(self.calculation_value(val))
else: else:
if isinstance(value, list): calc_properties.append(self.calculation_value(value))
for val in value:
calc_properties.append(self.calculation_value(val))
else:
calc_properties.append(self.calculation_value(value))
return "frozenset({" + ", ".join(sorted(properties) + calc_properties) + "})" return "frozenset({" + ", ".join(sorted(properties) + calc_properties) + "})"
def calc_properties( def calc_properties(
@ -350,17 +274,12 @@ class Common:
f"kwargs={{{kwargs}}}), func['calc_value_property_help'])" f"kwargs={{{kwargs}}}), func['calc_value_property_help'])"
) )
def populate_informations(self): def populate_informations(self, keys):
"""Populate Tiramisu's informations""" """Populate Tiramisu's informations"""
informations = self.objectspace.informations.get(self.elt.path) informations = self.objectspace.informations.get(self.elt.path)
if not informations: if not informations:
return return
for key, value in informations.items(): keys['informations'] = informations
if isinstance(value, str):
value = self.convert_str(value)
self.tiramisu.text["option"].append(
f"{self.option_name}.impl_set_information('{key}', {value})"
)
def populate_param( def populate_param(
self, self,
@ -381,9 +300,21 @@ class Common:
if "variable" in param: if "variable" in param:
if param["variable"].path == self.elt.path: if param["variable"].path == self.elt.path:
return f'ParamSelfInformation("{param["information"]}", {default})' return f'ParamSelfInformation("{param["information"]}", {default})'
return f'ParamInformation("{param["information"]}", {default}, option={self.tiramisu.reflector_objects[param["variable"].path].get(self.calls, self.elt.path)})' information_variable_path = param["variable"].path
information_variable = self.tiramisu.reflector_objects[information_variable_path]
if information_variable_path not in self.calls:
option_name = information_variable.get(self.calls, self.elt.path)
return f'ParamInformation("{param["information"]}", {default}, option={option_name})'
else:
information = f'ParamInformation("{param["information"]}", {default})'
information_name = self.tiramisu.get_information_name()
self.tiramisu.text["option"].append(f'{information_name} = {information}')
information_variable.informations.append(information_name)
return information_name
return f'ParamInformation("{param["information"]}", {default})' return f'ParamInformation("{param["information"]}", {default})'
if param["type"] == "suffix": if param["type"] == "suffix":
if "suffix" in param and param["suffix"] != None:
return f"ParamSuffix(suffix_index={param['suffix']})"
return "ParamSuffix()" return "ParamSuffix()"
if param["type"] == "index": if param["type"] == "index":
return "ParamIndex()" return "ParamIndex()"
@ -418,10 +349,7 @@ class Common:
params = [f"{option_name}"] params = [f"{option_name}"]
if suffix is not None: if suffix is not None:
param_type = "ParamDynOption" param_type = "ParamDynOption"
family = self.tiramisu.reflector_objects[dynamic.path].get( params.append(str(suffix))
self.calls, self.elt.path
)
params.extend([f"'{suffix}'", f"{family}"])
else: else:
param_type = "ParamOption" param_type = "ParamOption"
if not propertyerror: if not propertyerror:
@ -433,7 +361,6 @@ class Common:
function, function,
) -> str: ) -> str:
"""Generate calculated value""" """Generate calculated value"""
self.tiramisu.add_jinja_support()
child = function.to_function(self.objectspace) child = function.to_function(self.objectspace)
new_args = [] new_args = []
kwargs = [] kwargs = []
@ -460,6 +387,37 @@ class Common:
ret = ret + ")" ret = ret + ")"
return ret return ret
def populate_calculation(self,
datas: Union[Calculation, str, list],
return_a_tuple: bool=False,
) -> str:
if isinstance(datas, str):
return self.convert_str(datas)
if isinstance(datas, Calculation):
return self.calculation_value(datas)
if not isinstance(datas, list):
return datas
params = []
for idx, data in enumerate(datas):
if isinstance(data, Calculation):
params.append(self.calculation_value(data))
elif isinstance(data, str):
params.append(self.convert_str(data))
else:
params.append(str(data))
if return_a_tuple:
ret = '('
else:
ret = '['
ret += ", ".join(params)
if return_a_tuple:
if len(params) <= 1:
ret += ","
ret += ")"
else:
ret += "]"
return ret
class Variable(Common): class Variable(Common):
"""Manage variable""" """Manage variable"""
@ -484,59 +442,20 @@ class Variable(Common):
self.calls, self.elt.path self.calls, self.elt.path
) )
if self.elt.type == "choice": if self.elt.type == "choice":
choices = self.elt.choices keys["values"] = self.populate_calculation(self.elt.choices, return_a_tuple=True)
if isinstance(choices, Calculation):
keys["values"] = self.calculation_value(choices)
else:
new_values = []
for value in choices:
if isinstance(value, Calculation):
new_values.append(self.calculation_value(value))
elif isinstance(value, str):
new_values.append(self.convert_str(value))
else:
new_values.append(str(value))
keys["values"] = "(" + ", ".join(new_values)
if len(new_values) <= 1:
keys["values"] += ","
keys["values"] += ")"
if self.elt.path in self.objectspace.multis: if self.elt.path in self.objectspace.multis:
keys["multi"] = self.objectspace.multis[self.elt.path] keys["multi"] = self.objectspace.multis[self.elt.path]
if not hasattr(self.elt, "default"):
print('FIXME CA EXISTE!!!')
if hasattr(self.elt, "default") and self.elt.default is not None: if hasattr(self.elt, "default") and self.elt.default is not None:
value = self.elt.default keys["default"] = self.populate_calculation(self.elt.default)
if isinstance(value, str):
value = self.convert_str(value)
elif isinstance(value, Calculation):
value = self.calculation_value(value)
elif isinstance(value, list):
value = value.copy()
for idx, val in enumerate(value):
if isinstance(val, Calculation):
value[idx] = self.calculation_value(val)
elif isinstance(val, str):
value[idx] = self.convert_str(val)
else:
value[idx] = str(val)
value = "[" + ", ".join(value) + "]"
keys["default"] = value
if self.elt.path in self.objectspace.default_multi: if self.elt.path in self.objectspace.default_multi:
value = self.objectspace.default_multi[self.elt.path] keys["default_multi"] = self.populate_calculation(self.objectspace.default_multi[self.elt.path])
if isinstance(value, str):
value = self.convert_str(value)
elif isinstance(value, Calculation):
value = self.calculation_value(value)
keys["default_multi"] = value
if self.elt.validators: if self.elt.validators:
validators = [] keys["validators"] = self.populate_calculation(self.elt.validators)
for val in self.elt.validators:
if isinstance(val, Calculation):
validators.append(self.calculation_value(val))
else:
validators.append(val)
keys["validators"] = "[" + ", ".join(validators) + "]"
for key, value in CONVERT_OPTION.get(self.elt.type, {}).get("initkwargs", {}).items(): for key, value in CONVERT_OPTION.get(self.elt.type, {}).get("initkwargs", {}).items():
if isinstance(value, str): if isinstance(value, str):
value = f"'{value}'" value = self.convert_str(value)
keys[key] = value keys[key] = value
if self.elt.params: if self.elt.params:
for param in self.elt.params: for param in self.elt.params:
@ -573,23 +492,19 @@ class Family(Common):
keys: list, keys: list,
) -> None: ) -> None:
if self.elt.type == "dynamic": if self.elt.type == "dynamic":
keys["suffixes"] = self.calculation_value(self.elt.dynamic) keys["suffixes"] = self.populate_calculation(self.elt.dynamic)
children = [] children = []
for path in self.objectspace.parents[self.elt.path]: for path in self.objectspace.parents[self.elt.path]:
children.append(self.objectspace.paths[path]) children.append(self.objectspace.paths[path])
try: keys["children"] = (
keys["children"] = ( "["
"[" + ", ".join(
+ ", ".join( [
[ self.tiramisu.reflector_objects[child.path].get(
self.tiramisu.reflector_objects[child.path].get( self.calls, self.elt.path
self.calls, self.elt.path )
) for child in children
for child in children ]
]
)
+ "]"
) )
except VariableNotFoundError as exc: + "]"
msg = f"The variable '{exc.varname}' is mandatory for the dynamic family" )
raise DictConsistencyError(msg, 88, self.elt.xmlfiles)

View file

@ -93,6 +93,8 @@ def get_jinja_variable_to_param(
xmlfiles, xmlfiles,
functions, functions,
path_prefix, path_prefix,
version,
namespace,
): ):
try: try:
env = SandboxedEnvironment(loader=DictLoader({"tmpl": jinja_text})) env = SandboxedEnvironment(loader=DictLoader({"tmpl": jinja_text}))
@ -113,10 +115,13 @@ def get_jinja_variable_to_param(
variables = list(variables) variables = list(variables)
variables.sort() variables.sort()
for variable_path in variables: for variable_path in variables:
variable, suffix, dynamic = objectspace.paths.get_with_dynamic( variable, suffix = objectspace.paths.get_with_dynamic(
variable_path, variable_path,
path_prefix, path_prefix,
current_path, current_path,
version,
namespace,
xmlfiles,
) )
if variable and variable.path in objectspace.variables: if variable and variable.path in objectspace.variables:
yield variable, suffix, variable_path, dynamic yield variable, suffix, variable_path

View file

@ -1,22 +1,8 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
optiondescription_1 = OptionDescription(name="1", doc="1", children=[], properties=frozenset({"advanced"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[], properties=frozenset({"advanced"}))
optiondescription_2 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"})) optiondescription_2 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_2]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_2])

View file

@ -1,3 +1,4 @@
---
version: '1.0' version: '1.0'
my_family: my_family:
type: family

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,9 @@
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")
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[], properties=frozenset({"advanced"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,10 @@
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")
optiondescription_1 = OptionDescription(name="1", doc="1", children=[], properties=frozenset({"advanced"}))
optiondescription_4 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4])

View file

@ -1,3 +1,5 @@
---
version: '1.0' version: '1.0'
my_family: my_family:
my_sub_family: my_sub_family:
type: family

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,9 @@
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")
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[], properties=frozenset({"advanced"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,10 @@
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")
optiondescription_1 = OptionDescription(name="1", doc="1", children=[], properties=frozenset({"advanced"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[], properties=frozenset({"advanced"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_5])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"})) option_2 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"})) option_3 = StrOption(name="empty", doc="empty", properties=frozenset({"basic", "mandatory"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"basic"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"basic"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
option_4 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "standard"})) option_4 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
option_5 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "standard"})) option_5 = StrOption(name="without_type", doc="without_type", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4, option_5], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4, option_5], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="général", children=[option_3, option_4], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
option_5 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_5 = StrOption(name="mode_conteneur_actif1", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4, option_5], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="général", children=[option_4, option_5], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = BoolOption(name="auto", doc="auto", default=True, properties=frozenset({"mandatory", "standard"})) option_2 = BoolOption(name="auto", doc="auto", default=True, properties=frozenset({"mandatory", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = BoolOption(name="auto", doc="auto", default=True, properties=frozenset({"mandatory", "standard"})) option_3 = BoolOption(name="auto", doc="auto", default=True, properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = BoolOption(name="auto", doc="auto", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "notempty", "standard"})) option_2 = BoolOption(name="auto", doc="auto", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = BoolOption(name="auto", doc="auto", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "notempty", "standard"})) option_3 = BoolOption(name="auto", doc="auto", multi=True, default=[True], default_multi=True, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = FloatOption(name="auto", doc="auto", default=1.0, properties=frozenset({"mandatory", "standard"})) option_2 = FloatOption(name="auto", doc="auto", default=1.0, properties=frozenset({"mandatory", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = FloatOption(name="auto", doc="auto", default=1.0, properties=frozenset({"mandatory", "standard"})) option_3 = FloatOption(name="auto", doc="auto", default=1.0, properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = FloatOption(name="auto", doc="auto", multi=True, default=[1.0], default_multi=1.0, properties=frozenset({"mandatory", "notempty", "standard"})) option_2 = FloatOption(name="auto", doc="auto", multi=True, default=[1.0], default_multi=1.0, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = FloatOption(name="auto", doc="auto", multi=True, default=[1.0], default_multi=1.0, properties=frozenset({"mandatory", "notempty", "standard"})) option_3 = FloatOption(name="auto", doc="auto", multi=True, default=[1.0], default_multi=1.0, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = IntOption(name="auto", doc="auto", default=1, properties=frozenset({"mandatory", "standard"})) option_2 = IntOption(name="auto", doc="auto", default=1, properties=frozenset({"mandatory", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = IntOption(name="auto", doc="auto", default=1, properties=frozenset({"mandatory", "standard"})) option_3 = IntOption(name="auto", doc="auto", default=1, properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = IntOption(name="auto", doc="auto", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"})) option_2 = IntOption(name="auto", doc="auto", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = IntOption(name="auto", doc="auto", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"})) option_3 = IntOption(name="auto", doc="auto", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"})) option_2 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"})) option_3 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"basic"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"basic"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"}))

View file

@ -1,25 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type="domainname", allow_ip=False, properties=frozenset({"mandatory", "standard"}))
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,29 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type="domainname", allow_ip=False, properties=frozenset({"mandatory", "standard"}))
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type='domainname', allow_ip=False, properties=frozenset({"mandatory", "standard"})) option_8 = DomainnameOption(name="domain", doc="Description", default="my.domain.name", type="domainname", allow_ip=False, properties=frozenset({"mandatory", "standard"}))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,25 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = DomainnameOption(name="domain", doc="Description", default="192.168.1.1", type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}))
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = DomainnameOption(name="domain", doc="Description", default="192.168.1.1", type='domainname', allow_ip=True, properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,29 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = DomainnameOption(name="domain", doc="Description", default="192.168.1.1", type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}))
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = DomainnameOption(name="domain", doc="Description", default="192.168.1.1", type='domainname', allow_ip=True, properties=frozenset({"mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = DomainnameOption(name="domain", doc="Description", default="192.168.1.1", type='domainname', allow_ip=True, properties=frozenset({"mandatory", "standard"})) option_8 = DomainnameOption(name="domain", doc="Description", default="192.168.1.1", type="domainname", allow_ip=True, properties=frozenset({"mandatory", "standard"}))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "standard"})) option_3 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_4 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"})) option_4 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "standard"})) option_4 = FloatOption(name="float", doc="Description", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_5 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"})) option_5 = FloatOption(name="float_multi", doc="Description", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4, option_5], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4, option_5], properties=frozenset({"standard"}))

View file

@ -1,28 +1,12 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"standard"}), informations={'help': "message with '"})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec option_4 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"standard"}), informations={'help': 'message with "'})
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"standard"}))
option_3.impl_set_information('help', "message with '")
option_4 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"standard"}))
option_4.impl_set_information('help', "message with \"")
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3, option_4], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,35 +1,17 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"standard"}), informations={'help': "message with '"})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec option_5 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"standard"}), informations={'help': 'message with "'})
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"standard"}))
option_4.impl_set_information('help', "message with '")
option_5 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"standard"}))
option_5.impl_set_information('help', "message with \"")
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4, option_5], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4, option_5], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_9 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"standard"})) option_9 = StrOption(name="mode_conteneur_actif", doc="Redefine description", properties=frozenset({"standard"}), informations={'help': "message with '"})
option_9.impl_set_information('help', "message with '") option_10 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"standard"}), informations={'help': 'message with "'})
option_10 = StrOption(name="mode_conteneur_actif1", doc="Redefine description", properties=frozenset({"standard"}))
option_10.impl_set_information('help', "message with \"")
optiondescription_8 = OptionDescription(name="general", doc="general", children=[option_9, option_10], properties=frozenset({"standard"})) optiondescription_8 = OptionDescription(name="general", doc="general", children=[option_9, option_10], properties=frozenset({"standard"}))
optiondescription_7 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="2", doc="2", children=[optiondescription_7], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notempty", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notempty", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", multi=True, default=["non"], default_multi="non", properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "notunique", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "notunique", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "notunique", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "notunique", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard", "unique"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard", "unique"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard", "unique"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["non"], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard", "unique"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote\\\"\\'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote\""], default_multi="quote\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'\""], default_multi="quote'\"", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=["quote'"], default_multi="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "notempty", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="Redefine description", default="quote'", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="general", doc="description", default="non", properties=frozenset({"mandatory", "standard"})) option_3 = StrOption(name="general", doc="description", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="general", doc="description", default="non", properties=frozenset({"mandatory", "standard"})) option_4 = StrOption(name="general", doc="description", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = BoolOption(name="my_variable", doc="my_variable", default=True, properties=frozenset({"standard"})) option_2 = BoolOption(name="my_variable", doc="my_variable", default=True, properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = BoolOption(name="my_variable", doc="my_variable", default=True, properties=frozenset({"standard"})) option_3 = BoolOption(name="my_variable", doc="my_variable", default=True, properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="Other description", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="Other description", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="Other description", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="Other description", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,26 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test',)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_3.impl_set_information('test', ('test',))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,31 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test',)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_4.impl_set_information('test', ('test',))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test',)})
option_8.impl_set_information('test', ('test',))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,26 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = BoolOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default=True, properties=frozenset({"mandatory", "standard"}), informations={'test': (False,)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = BoolOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default=True, properties=frozenset({"mandatory", "standard"}))
option_3.impl_set_information('test', (False,))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,31 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = BoolOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default=True, properties=frozenset({"mandatory", "standard"}), informations={'test': (False,)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = BoolOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default=True, properties=frozenset({"mandatory", "standard"}))
option_4.impl_set_information('test', (False,))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = BoolOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default=True, properties=frozenset({"mandatory", "standard"})) option_8 = BoolOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default=True, properties=frozenset({"mandatory", "standard"}), informations={'test': (False,)})
option_8.impl_set_information('test', (False,))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,26 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test1', 'test2')})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_3.impl_set_information('test', ('test1', 'test2'))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,31 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test1', 'test2')})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_4.impl_set_information('test', ('test1', 'test2'))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test1', 'test2')})
option_8.impl_set_information('test', ('test1', 'test2'))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,26 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': (None, 'test1', 'test2')})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_3.impl_set_information('test', (None, 'test1', 'test2'))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,31 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': (None, 'test1', 'test2')})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_4.impl_set_information('test', (None, 'test1', 'test2'))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': (None, 'test1', 'test2')})
option_8.impl_set_information('test', (None, 'test1', 'test2'))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,26 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test1',)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_3.impl_set_information('test', ('test1',))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,31 +1,15 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test1',)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
option_4.impl_set_information('test', ('test1',))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], 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"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_8 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}), informations={'test': ('test1',)})
option_8.impl_set_information('test', ('test1',))
optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"})) optiondescription_7 = OptionDescription(name="general", doc="general", children=[option_8], properties=frozenset({"standard"}))
optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"})) optiondescription_6 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_7], properties=frozenset({"standard"}))
optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="2", doc="2", children=[optiondescription_6], properties=frozenset({"standard"}))

View file

@ -1,25 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_2 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"standard"}), informations={'test': ('test1',)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"standard"}))
option_2.impl_set_information('test', ('test1',))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -1,30 +1,14 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader option_3 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"standard"}), informations={'test': ('test1',)})
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"standard"}))
option_3.impl_set_information('test', ('test1',))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_6 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"standard"})) option_6 = StrOption(name="my_variable", doc="my_variable", properties=frozenset({"standard"}), informations={'test': ('test1',)})
option_6.impl_set_information('test', ('test1',))
optiondescription_5 = OptionDescription(name="rougail", doc="rougail", children=[option_6], properties=frozenset({"standard"})) optiondescription_5 = OptionDescription(name="rougail", doc="rougail", children=[option_6], properties=frozenset({"standard"}))
optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"})) optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4])

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_3 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_2], properties=frozenset({"standard"}))

View file

@ -1,24 +1,10 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="mode_conteneur_actif", default="non", properties=frozenset({"mandatory", "standard"}))
optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"})) optiondescription_3 = OptionDescription(name="general", doc="general", children=[option_4], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[optiondescription_3], properties=frozenset({"standard"}))

View file

@ -1,72 +1,11 @@
from tiramisu import * from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES 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("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment
from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION
kw = {}
for key, value in kwargs.items():
if '.' in key:
c_kw = kw
path, var = key.rsplit('.', 1)
for subkey in path.split('.'):
c_kw = c_kw.setdefault(subkey, {})
c_kw[var] = value
else:
kw[key] = value
values = ENV.get_template(__internal_jinja).render(kw, **func).strip()
convert = CONVERT_OPTION[__internal_type].get('func', str)
if __internal_multi:
return [convert(val) for val in values.split()]
values = convert(values)
return values if values != '' and values != 'None' else None
def variable_to_property(prop, value):
return prop if value else None
def jinja_to_property(prop, **kwargs):
value = func['jinja_to_function'](**kwargs)
return func['variable_to_property'](prop, value is not None)
def jinja_to_property_help(prop, **kwargs):
value = func['jinja_to_function'](**kwargs)
return (prop, f'"{prop}" ({value})')
def valid_with_jinja(warnings_only=False, **kwargs):
global ValueWarning
value = func['jinja_to_function'](**kwargs)
if value:
if warnings_only:
raise ValueWarning(value)
else:
raise ValueError(value)
func['jinja_to_function'] = jinja_to_function
func['jinja_to_property'] = jinja_to_property
func['jinja_to_property_help'] = jinja_to_property_help
func['variable_to_property'] = variable_to_property
func['valid_with_jinja'] = valid_with_jinja
dict_env = {}
dict_env['default_rougail.general.autosavevar'] = "{{ \"oui\" | calc_val }}" dict_env['default_rougail.general.autosavevar'] = "{{ \"oui\" | calc_val }}"
ENV = SandboxedEnvironment(loader=DictLoader(dict_env), undefined=StrictUndefined)
ENV.filters = func
ENV.compile_templates('jinja_caches', zip=None)
option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "standard"})) option_2 = BoolOption(name="server_deployed", doc="server_deployed", default=True, properties=frozenset({"mandatory", "standard"}))
option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"})) option_4 = StrOption(name="mode_conteneur_actif", doc="No change", default="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}))
option_5 = StrOption(name="autosavevar", doc="autosave variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.general.autosavevar"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False)})), properties=frozenset({"basic", "force_store_value", "frozen", "hidden"})) option_5 = StrOption(name="autosavevar", doc="autosave variable", default=Calculation(func['jinja_to_function'], Params((), kwargs={'__internal_jinja': ParamValue("default_rougail.general.autosavevar"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False)})), properties=frozenset({"basic", "force_store_value", "frozen", "hidden"}))

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