refactoring

This commit is contained in:
Emmanuel Garette 2020-07-29 08:59:40 +02:00
parent d18248544c
commit 7a62ebf294
339 changed files with 1662 additions and 7139 deletions

View File

@ -1,5 +1,5 @@
from .loader import load #from .loader import load
from .objspace import CreoleObjSpace from .objspace import CreoleObjSpace
from .annotator import modes from .annotator import modes
__ALL__ = ('load', 'CreoleObjSpace', 'modes') __ALL__ = ('CreoleObjSpace', 'modes')

View File

@ -63,6 +63,11 @@ CONVERSION = {'number': int}
FREEZE_AUTOFREEZE_VARIABLE = 'module_instancie' FREEZE_AUTOFREEZE_VARIABLE = 'module_instancie'
PROPERTIES = ('hidden', 'frozen', 'auto_freeze', 'auto_save', 'force_default_on_freeze',
'force_store_value', 'disabled', 'mandatory')
CONVERT_PROPERTIES = {'auto_save': ['force_store_value'], 'auto_freeze': ['force_store_value', 'auto_freeze']}
RENAME_ATTIBUTES = {'description': 'doc'}
class SpaceAnnotator: class SpaceAnnotator:
"""Transformations applied on a CreoleObjSpace instance """Transformations applied on a CreoleObjSpace instance
@ -80,222 +85,7 @@ class SpaceAnnotator:
FamilyAnnotator(objectspace, FamilyAnnotator(objectspace,
self.force_not_mandatory, self.force_not_mandatory,
) )
PropertyAnnotator(objectspace)
class ServiceAnnotator:
"""Manage service's object
for example::
<services>
<service name="test">
<service_access service='ntp'>
<port protocol='udp' service_accesslist='ntp_udp'>123</port>
</service_access>
</service>
</services>
"""
def __init__(self, objectspace):
self.objectspace = objectspace
self.convert_services()
def gen_family(self,
name,
path,
):
family = self.objectspace.family()
family.name = name
family.doc = name
family.mode = None
self.objectspace.paths.add_family('services',
path,
family,
)
return family
def convert_services(self):
if not hasattr(self.objectspace.space, 'services'):
return
if not hasattr(self.objectspace.space.services, 'service'):
del self.objectspace.space.services
return
self.objectspace.space.services.hidden = True
families = {}
for idx, service_name in enumerate(self.objectspace.space.services.service.keys()):
service = self.objectspace.space.services.service[service_name]
new_service = self.objectspace.service()
for elttype, values in vars(service).items():
if elttype == 'name' or elttype in ERASED_ATTRIBUTES:
setattr(new_service, elttype, values)
continue
eltname = elttype + 's'
path = '.'.join(['services', eltname])
family = self.gen_family(eltname,
path,
)
if isinstance(values, dict):
values = list(values.values())
family.family = self.make_group_from_elts(service_name,
elttype,
values,
f'services.{service_name}.{eltname}',
)
setattr(new_service, elttype, family)
families[service_name] = new_service
self.objectspace.space.services.service = families
def make_group_from_elts(self,
service_name,
name,
elts,
path,
):
"""Splits each objects into a group (and `OptionDescription`, in tiramisu terms)
and build elements and its attributes (the `Options` in tiramisu terms)
"""
families = []
new_elts = self._reorder_elts(name,
elts,
)
for index, elt_info in enumerate(new_elts):
elt = elt_info['elt']
elt_name = elt_info['elt_name']
# try to launch _update_xxxx() function
update_elt = '_update_' + elt_name
if hasattr(self, update_elt):
getattr(self, update_elt)(elt,
index,
path,
service_name,
)
if hasattr(elt, 'source'):
c_name = elt.source
else:
c_name = elt.name
subpath = '{}.{}'.format(path, c_name)
family = self.gen_family(c_name, subpath)
family.variable = []
listname = '{}list'.format(name)
activate_path = '.'.join([subpath, 'activate'])
for key in dir(elt):
if key.startswith('_') or key.endswith('_type') or key in ERASED_ATTRIBUTES:
continue
value = getattr(elt, key)
if key == listname:
self.objectspace.list_conditions.setdefault(listname,
{}).setdefault(
value,
[]).append(activate_path)
continue
family.variable.append(self._generate_element(elt_name,
key,
value,
elt,
f'{subpath}.{key}'
))
# FIXME ne devrait pas etre True par défaut
# devrait etre un calcule
family.variable.append(self._generate_element(elt_name,
'activate',
True,
elt,
activate_path,
))
families.append(family)
return families
def _generate_element(self,
elt_name,
key,
value,
elt,
path,
):
variable = self.objectspace.variable()
variable.name = key
variable.mode = None
if key == 'name':
true_key = elt_name
else:
true_key = key
dtd_key_type = true_key + '_type'
if key == 'activate':
type_ = 'boolean'
elif hasattr(elt, dtd_key_type):
type_ = KEY_TYPE[getattr(elt, dtd_key_type)]
elif key in self.objectspace.booleans_attributs:
type_ = 'boolean'
else:
type_ = 'string'
variable.type = type_
if type_ == 'symlink':
variable.opt = self.objectspace.paths.get_variable_path(value,
'services',
)
# variable.opt = value
variable.multi = None
else:
variable.doc = key
val = self.objectspace.value()
val.type = type_
val.name = value
variable.value = [val]
self.objectspace.paths.add_variable('services',
path,
'service',
False,
variable,
)
return variable
def _reorder_elts(self,
name,
elts,
):
"""Reorders by index the elts
"""
new_elts = {}
# reorder elts by index
for idx, elt in enumerate(elts):
new_elts.setdefault(idx, []).append(elt)
idxes = list(new_elts.keys())
idxes.sort()
result_elts = []
for idx in idxes:
for elt in new_elts[idx]:
result_elts.append({'elt_name': name, 'elt': elt})
return result_elts
def _update_override(self,
file_,
index,
service_path,
service_name,
):
file_.name = f'/systemd/system/{service_name}.service.d/rougail.conf'
# retrieve default value from File object
for attr in ['owner', 'group', 'mode']:
setattr(file_, attr, getattr(self.objectspace.file, attr))
if not hasattr(file_, 'source'):
file_.source = f'{service_name}.service'
self._update_file(file_,
index,
service_path,
service_name,
)
def _update_file(self,
file_,
index,
service_path,
service_name,
):
if not hasattr(file_, 'file_type') or file_.file_type == "UnicodeOption":
if not hasattr(file_, 'source'):
file_.source = basename(file_.name)
elif not hasattr(file_, 'source'):
raise DictConsistencyError(_('attribute source mandatory for file with variable name '
'for {}').format(file_.name))
class GroupAnnotator: class GroupAnnotator:
@ -422,6 +212,225 @@ class GroupAnnotator:
) )
class ServiceAnnotator:
"""Manage service's object
for example::
<services>
<service name="test">
<service_access service='ntp'>
<port protocol='udp' service_accesslist='ntp_udp'>123</port>
</service_access>
</service>
</services>
"""
def __init__(self, objectspace):
self.objectspace = objectspace
self.convert_services()
def convert_services(self):
if not hasattr(self.objectspace.space, 'services'):
return
if not hasattr(self.objectspace.space.services, 'service'):
del self.objectspace.space.services
return
self.objectspace.space.services.hidden = True
self.objectspace.space.services.name = 'services'
self.objectspace.space.services.doc = 'services'
families = {}
for idx, service_name in enumerate(self.objectspace.space.services.service.keys()):
service = self.objectspace.space.services.service[service_name]
new_service = self.objectspace.service()
for elttype, values in vars(service).items():
if elttype == 'name' or elttype in ERASED_ATTRIBUTES:
setattr(new_service, elttype, values)
continue
eltname = elttype + 's'
path = '.'.join(['services', eltname])
family = self.gen_family(eltname,
path,
)
if isinstance(values, dict):
values = list(values.values())
family.family = self.make_group_from_elts(service_name,
elttype,
values,
f'services.{service_name}.{eltname}',
)
setattr(new_service, elttype, family)
new_service.doc = new_service.name
families[service_name] = new_service
self.objectspace.space.services.service = families
def gen_family(self,
name,
path,
):
family = self.objectspace.family()
family.name = normalize_family(name)
family.doc = name
family.mode = None
self.objectspace.paths.add_family('services',
path,
family,
)
return family
def make_group_from_elts(self,
service_name,
name,
elts,
path,
):
"""Splits each objects into a group (and `OptionDescription`, in tiramisu terms)
and build elements and its attributes (the `Options` in tiramisu terms)
"""
families = []
new_elts = self._reorder_elts(name,
elts,
)
for index, elt_info in enumerate(new_elts):
elt = elt_info['elt']
elt_name = elt_info['elt_name']
# try to launch _update_xxxx() function
update_elt = '_update_' + elt_name
if hasattr(self, update_elt):
getattr(self, update_elt)(elt,
index,
path,
service_name,
)
if hasattr(elt, 'source'):
c_name = elt.source
else:
c_name = elt.name
subpath = '{}.{}'.format(path, c_name)
family = self.gen_family(c_name, subpath)
family.variable = []
listname = '{}list'.format(name)
activate_path = '.'.join([subpath, 'activate'])
for key in dir(elt):
if key.startswith('_') or key.endswith('_type') or key in ERASED_ATTRIBUTES:
continue
value = getattr(elt, key)
if key == listname:
self.objectspace.list_conditions.setdefault(listname,
{}).setdefault(
value,
[]).append(activate_path)
continue
family.variable.append(self._generate_element(elt_name,
key,
value,
elt,
f'{subpath}.{key}'
))
# FIXME ne devrait pas etre True par défaut
# devrait etre un calcule
family.variable.append(self._generate_element(elt_name,
'activate',
True,
elt,
activate_path,
))
families.append(family)
return families
def _generate_element(self,
elt_name,
key,
value,
elt,
path,
):
variable = self.objectspace.variable()
variable.name = normalize_family(key)
variable.mode = None
if key == 'name':
true_key = elt_name
else:
true_key = key
dtd_key_type = true_key + '_type'
if key == 'activate':
type_ = 'boolean'
elif hasattr(elt, dtd_key_type):
type_ = KEY_TYPE[getattr(elt, dtd_key_type)]
elif key in self.objectspace.booleans_attributs:
type_ = 'boolean'
else:
type_ = 'string'
variable.type = type_
if type_ == 'symlink':
variable.opt = self.objectspace.paths.get_variable_path(value,
'services',
)
# variable.opt = value
variable.multi = None
else:
variable.doc = key
val = self.objectspace.value()
val.type = type_
val.name = value
variable.value = [val]
self.objectspace.paths.add_variable('services',
path,
'service',
False,
variable,
)
return variable
def _reorder_elts(self,
name,
elts,
):
"""Reorders by index the elts
"""
new_elts = {}
# reorder elts by index
for idx, elt in enumerate(elts):
new_elts.setdefault(idx, []).append(elt)
idxes = list(new_elts.keys())
idxes.sort()
result_elts = []
for idx in idxes:
for elt in new_elts[idx]:
result_elts.append({'elt_name': name, 'elt': elt})
return result_elts
def _update_override(self,
file_,
index,
service_path,
service_name,
):
file_.name = f'/systemd/system/{service_name}.service.d/rougail.conf'
# retrieve default value from File object
for attr in ['owner', 'group', 'mode']:
setattr(file_, attr, getattr(self.objectspace.file, attr))
if not hasattr(file_, 'source'):
file_.source = f'{service_name}.service'
self._update_file(file_,
index,
service_path,
service_name,
)
def _update_file(self,
file_,
index,
service_path,
service_name,
):
if not hasattr(file_, 'file_type') or file_.file_type == "UnicodeOption":
if not hasattr(file_, 'source'):
file_.source = basename(file_.name)
elif not hasattr(file_, 'source'):
raise DictConsistencyError(_('attribute source mandatory for file with variable name '
'for {}').format(file_.name))
class VariableAnnotator: class VariableAnnotator:
def __init__(self, def __init__(self,
objectspace, objectspace,
@ -433,7 +442,9 @@ class VariableAnnotator:
self.convert_separators() self.convert_separators()
def convert_variable(self): def convert_variable(self):
def _convert_variable(variable): def _convert_variable(variable,
variable_type,
):
if not hasattr(variable, 'type'): if not hasattr(variable, 'type'):
variable.type = 'string' variable.type = 'string'
if variable.type != 'symlink' and not hasattr(variable, 'description'): if variable.type != 'symlink' and not hasattr(variable, 'description'):
@ -442,6 +453,15 @@ class VariableAnnotator:
for value in variable.value: for value in variable.value:
if not hasattr(value, 'type'): if not hasattr(value, 'type'):
value.type = variable.type value.type = variable.type
value.name = CONVERSION.get(value.type, str)(value.name)
for key, value in RENAME_ATTIBUTES.items():
setattr(variable, value, getattr(variable, key))
setattr(variable, key, None)
if variable_type == 'follower':
if variable.multi is True:
variable.multi = 'submulti'
else:
variable.multi = True
def _convert_valid_enum(namespace, def _convert_valid_enum(namespace,
variable, variable,
@ -468,20 +488,31 @@ class VariableAnnotator:
for families in self.objectspace.space.variables.values(): for families in self.objectspace.space.variables.values():
namespace = families.name namespace = families.name
if hasattr(families, 'family'): if hasattr(families, 'family'):
families.doc = families.name
for family in families.family.values(): for family in families.family.values():
family.doc = family.name
family.name = normalize_family(family.name)
if hasattr(family, 'variable'): if hasattr(family, 'variable'):
for variable in family.variable.values(): for variable in family.variable.values():
if isinstance(variable, self.objectspace.Leadership): if isinstance(variable, self.objectspace.Leadership):
for follower in variable.variable: for idx, follower in enumerate(variable.variable):
if idx == 0:
variable_type = 'master'
else:
variable_type = 'follower'
path = '{}.{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name, follower.name) path = '{}.{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name, follower.name)
_convert_variable(follower) _convert_variable(follower,
variable_type,
)
_convert_valid_enum(namespace, _convert_valid_enum(namespace,
follower, follower,
path, path,
) )
else: else:
path = '{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name) path = '{}.{}.{}'.format(namespace, normalize_family(family.name), variable.name)
_convert_variable(variable) _convert_variable(variable,
'variable',
)
_convert_valid_enum(namespace, _convert_valid_enum(namespace,
variable, variable,
path, path,
@ -894,6 +925,8 @@ class ConstraintAnnotator:
choice.name = CONVERSION.get(type_, str)(value) choice.name = CONVERSION.get(type_, str)(value)
except: except:
raise DictConsistencyError(_(f'unable to change type of a valid_enum entry "{value}" is not a valid "{type_}" for "{variable.name}"')) raise DictConsistencyError(_(f'unable to change type of a valid_enum entry "{value}" is not a valid "{type_}" for "{variable.name}"'))
if choice.name == '':
choice.name = None
choices.append(choice.name) choices.append(choice.name)
choice.type = type_ choice.type = type_
variable.choice.append(choice) variable.choice.append(choice)
@ -1112,3 +1145,53 @@ class FamilyAnnotator:
variable.mode = modes_level[0] variable.mode = modes_level[0]
path = '{}.{}'.format(family.path, variable.name) path = '{}.{}'.format(family.path, variable.name)
self.annotate_variable(variable, family_mode, path) self.annotate_variable(variable, family_mode, path)
class PropertyAnnotator:
def __init__(self, objectspace):
self.objectspace = objectspace
self.convert_annotator()
def convert_property(self,
variable,
):
properties = []
for prop in PROPERTIES:
if hasattr(variable, prop):
if getattr(variable, prop) == True:
for subprop in CONVERT_PROPERTIES.get(prop, [prop]):
properties.append(subprop)
setattr(variable, prop, None)
if hasattr(variable, 'mode') and variable.mode:
properties.append(variable.mode)
variable.mode = None
if properties:
variable.properties = frozenset(properties)
def convert_annotator(self): # pylint: disable=C0111
if hasattr(self.objectspace.space, 'services'):
self.convert_property(self.objectspace.space.services)
for services in self.objectspace.space.services.service.values():
self.convert_property(services)
for service in vars(services).values():
if isinstance(service, self.objectspace.family):
self.convert_property(service)
if hasattr(service, 'family'):
self.convert_property(service)
for family in service.family:
self.convert_property(family)
if hasattr(family, 'variable'):
for variable in family.variable:
self.convert_property(variable)
if hasattr(self.objectspace.space, 'variables'):
for variables in self.objectspace.space.variables.values():
if hasattr(variables, 'family'):
for family in variables.family.values():
self.convert_property(family)
if hasattr(family, 'variable'):
for variable in family.variable.values():
if isinstance(variable, self.objectspace.Leadership):
self.convert_property(variable)
for follower in variable.variable:
self.convert_property(follower)
else:
self.convert_property(variable)

View File

@ -7,34 +7,12 @@ from lxml.etree import DTD
from .config import dtdfilename, variable_namespace from .config import dtdfilename, variable_namespace
from .i18n import _ from .i18n import _
from .error import LoaderError from .error import LoaderError
from .annotator import ERASED_ATTRIBUTES
FUNC_TO_DICT = ['valid_not_equal'] FUNC_TO_DICT = ['valid_not_equal']
FORCE_INFORMATIONS = ['help', 'test', 'separator'] FORCE_INFORMATIONS = ['help', 'test', 'separator']
ATTRIBUTES_ORDER = ('name', 'doc', 'default', 'multi')
def convert_boolean(value):
prop = {'True': True,
'False': False,
'None': None}
if value not in prop:
raise Exception('unknown value {} while trying to cast {} to boolean'.format(value, obj))
return prop[value]
def convert_tiramisu_value(value, type_):
"""
convertit les variables dans le bon type si nécessaire
"""
if value is None:
return value
func = CONVERT_OPTION[type_].get('func', None)
if func is None:
return value
if isinstance(value, list):
return [func(val) for val in value]
else:
return func(value)
CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int), CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
@ -42,7 +20,7 @@ CONVERT_OPTION = {'number': dict(opttype="IntOption", func=int),
'string': dict(opttype="StrOption"), 'string': dict(opttype="StrOption"),
'password': dict(opttype="PasswordOption"), 'password': dict(opttype="PasswordOption"),
'mail': dict(opttype="EmailOption"), 'mail': dict(opttype="EmailOption"),
'boolean': dict(opttype="BoolOption", initkwargs={'default': [True]}, func=convert_boolean), 'boolean': dict(opttype="BoolOption", initkwargs={'default': [True]}),
'symlink': dict(opttype="SymLinkOption"), 'symlink': dict(opttype="SymLinkOption"),
'filename': dict(opttype="FilenameOption"), 'filename': dict(opttype="FilenameOption"),
'date': dict(opttype="DateOption"), 'date': dict(opttype="DateOption"),
@ -70,7 +48,7 @@ class PopulateTiramisuObjects:
xmlroot, xmlroot,
funcs_path, funcs_path,
): ):
self.storage = ElementStorage(self.parse_dtd()) self.storage = ElementStorage()
self.storage.text = ["from tiramisu import *", self.storage.text = ["from tiramisu import *",
"from rougail.tiramisu import ConvertDynOptionDescription", "from rougail.tiramisu import ConvertDynOptionDescription",
"import imp", "import imp",
@ -80,25 +58,6 @@ class PopulateTiramisuObjects:
# parse object # parse object
self.storage.get('.').get() self.storage.get('.').get()
def parse_dtd(self):
"""Loads the DTD
:raises IOError: if the DTD is not found
:param dtdfilename: the full filename of the DTD
"""
if not isfile(dtdfilename):
raise IOError(_("no such DTD file: {}").format(dtdfilename))
booleans = []
with open(dtdfilename, 'r') as dtdfd:
dtd = DTD(dtdfd)
for elt in dtd.iterelements():
if elt.name == 'variable':
for attr in elt.iterattributes():
if set(attr.itervalues()) == set(['True', 'False']):
booleans.append(attr.name)
return booleans
def make_tiramisu_objects(self, def make_tiramisu_objects(self,
xmlroot, xmlroot,
): ):
@ -110,8 +69,9 @@ class PopulateTiramisuObjects:
) )
def get_root_family(self): def get_root_family(self):
family = Family(BaseElt({'name': 'baseoption', family = Family(BaseElt('baseoption',
'doc': 'baseoption'}), 'baseoption',
),
self.storage, self.storage,
False, False,
'.', '.',
@ -119,30 +79,49 @@ class PopulateTiramisuObjects:
return family return family
def reorder_family(self, xmlroot): def reorder_family(self, xmlroot):
xmlelts = [] # variable_namespace family has to be loaded before any other family
for xmlelt in xmlroot: # because `extra` family could use `variable_namespace` variables.
# variable_namespace family has to be loaded before any other family if hasattr(xmlroot, 'variables'):
# because `extra` family could use `variable_namespace` variables. if variable_namespace in xmlroot.variables:
if xmlelt.attrib['name'] == variable_namespace: yield xmlroot.variables[variable_namespace]
xmlelts.insert(0, xmlelt) for xmlelt, value in xmlroot.variables.items():
else: if xmlelt != variable_namespace:
xmlelts.append(xmlelt) yield value
return xmlelts if hasattr(xmlroot, 'services'):
yield xmlroot.services
def get_attributes(self, space): # pylint: disable=R0201
for attr in dir(space):
if not attr.startswith('_') and attr not in ERASED_ATTRIBUTES:
yield attr
def get_children(self,
space,
):
for tag in self.get_attributes(space):
children = getattr(space, tag)
if children.__class__.__name__ == 'Family':
children = [children]
if isinstance(children, dict):
children = list(children.values())
if isinstance(children, list):
yield tag, children
def iter_family(self, def iter_family(self,
child, child,
family, family,
subpath, subpath,
): ):
if child.tag in ['family', 'leader']: tag = child.__class__.__name__
function = self.populate_family if tag == 'Variable':
elif child.tag == 'variable':
function = self.populate_variable function = self.populate_variable
elif child.tag == 'property': elif tag == 'Property':
# property already imported with family # property already imported with family
return return
else: else:
raise Exception('unknown tag {}'.format(child.tag)) function = self.populate_family
#else:
# raise Exception('unknown tag {}'.format(child.tag))
function(family, function(family,
child, child,
subpath, subpath,
@ -156,14 +135,15 @@ class PopulateTiramisuObjects:
path = self.build_path(subpath, path = self.build_path(subpath,
elt, elt,
) )
tag = elt.__class__.__name__
family = Family(elt, family = Family(elt,
self.storage, self.storage,
elt.tag == 'leader', tag == 'Leadership',
path, path,
) )
parent_family.add(family) parent_family.add(family)
if len(elt) != 0: for tag, children in self.get_children(elt):
for child in elt: for child in children:
self.iter_family(child, self.iter_family(child,
family, family,
path, path,
@ -177,7 +157,7 @@ class PopulateTiramisuObjects:
is_follower = False is_follower = False
is_leader = False is_leader = False
if family.is_leader: if family.is_leader:
if elt.attrib['name'] != family.elt.attrib['name']: if elt.name != family.elt.name:
is_follower = True is_follower = True
else: else:
is_leader = True is_leader = True
@ -195,16 +175,20 @@ class PopulateTiramisuObjects:
elt, elt,
): ):
if subpath is None: if subpath is None:
return elt.attrib['name'] return elt.name
return subpath + '.' + elt.attrib['name'] return subpath + '.' + elt.name
def get_text(self): def get_text(self):
return '\n'.join(self.storage.get('.').get_text()) return '\n'.join(self.storage.get('.').get_text())
class BaseElt: class BaseElt:
def __init__(self, attrib): def __init__(self,
self.attrib = attrib name,
doc,
):
self.name = name
self.doc = doc
def __iter__(self): def __iter__(self):
return iter([]) return iter([])
@ -212,12 +196,10 @@ class BaseElt:
class ElementStorage: class ElementStorage:
def __init__(self, def __init__(self,
booleans,
): ):
self.paths = {} self.paths = {}
self.text = [] self.text = []
self.index = 0 self.index = 0
self.booleans = booleans
def add(self, path, elt): def add(self, path, elt):
self.paths[path] = (elt, self.index) self.paths[path] = (elt, self.index)
@ -250,11 +232,11 @@ class Common:
self.storage.add(self.path, self) self.storage.add(self.path, self)
def populate_properties(self, child): def populate_properties(self, child):
if child.get('type') == 'calculation': if child.type == 'calculation':
action = f"ParamValue('{child.text}')" action = f"ParamValue('{child.name}')"
option_name = self.storage.get(child.attrib['source']).get() option_name = self.storage.get(child.source).get()
kwargs = f"'condition': ParamOption({option_name}, todict=True), 'expected': ParamValue('{child.attrib.get('expected')}')" kwargs = f"'condition': ParamOption({option_name}, todict=True), 'expected': ParamValue('{child.expected}')"
if child.attrib['inverse'] == 'True': if child.inverse:
kwargs += ", 'reverse_condition': ParamValue(True)" kwargs += ", 'reverse_condition': ParamValue(True)"
prop = 'Calculation(calc_value, Params(' + action + ', kwargs={' + kwargs + '}))' prop = 'Calculation(calc_value, Params(' + action + ', kwargs={' + kwargs + '}))'
else: else:
@ -262,14 +244,16 @@ class Common:
if self.attrib['properties']: if self.attrib['properties']:
self.attrib['properties'] += ', ' self.attrib['properties'] += ', '
self.attrib['properties'] += prop self.attrib['properties'] += prop
if not self.attrib['properties']:
del self.attrib['properties']
def get_attrib(self, attrib): def get_attrib(self, attrib):
ret_list = [] ret_list = []
for key, value in self.attrib.items(): for key, value in self.attrib.items():
if value is None:
continue
if key == 'properties': if key == 'properties':
value = 'frozenset([' + self.attrib[key] + '])' if not self.attrib[key]:
continue
value = "frozenset({" + self.attrib[key] + "})"
elif key in ['default', 'multi', 'suffixes', 'validators']: elif key in ['default', 'multi', 'suffixes', 'validators']:
value = self.attrib[key] value = self.attrib[key]
elif isinstance(value, str) and key != 'opt' and not value.startswith('['): elif isinstance(value, str) and key != 'opt' and not value.startswith('['):
@ -286,6 +270,33 @@ class Common:
): ):
return self.storage.text return self.storage.text
def get_attributes(self, space): # pylint: disable=R0201
attributes = dir(space)
for attr in ATTRIBUTES_ORDER:
if attr in attributes:
yield attr
for attr in dir(space):
if attr not in ATTRIBUTES_ORDER:
if not attr.startswith('_') and attr not in ERASED_ATTRIBUTES:
value = getattr(space, attr)
if not isinstance(value, (list, dict)) and not value.__class__.__name__ == 'Family':
yield attr
def get_children(self,
space,
):
for attr in dir(space):
if not attr.startswith('_') and attr not in ERASED_ATTRIBUTES:
value = getattr(space, attr)
if isinstance(value, (list, dict)):
children = getattr(space, attr)
if children.__class__.__name__ == 'Family':
children = [children]
if isinstance(children, dict):
children = list(children.values())
if children and isinstance(children, list):
yield attr, children
class Variable(Common): class Variable(Common):
def __init__(self, def __init__(self,
@ -301,12 +312,12 @@ class Variable(Common):
path, path,
) )
self.is_follower = is_follower self.is_follower = is_follower
convert_option = CONVERT_OPTION[elt.attrib['type']] convert_option = CONVERT_OPTION[elt.type]
del elt.attrib['type'] del elt.type
self.object_type = convert_option['opttype'] self.object_type = convert_option['opttype']
self.attrib.update(convert_option.get('initkwargs', {})) self.attrib.update(convert_option.get('initkwargs', {}))
if self.object_type != 'SymLinkOption': if self.object_type != 'SymLinkOption':
self.attrib['properties'] = '' self.attrib['properties'] = []
self.attrib['validators'] = [] self.attrib['validators'] = []
self.elt = elt self.elt = elt
@ -316,7 +327,6 @@ class Variable(Common):
if self.object_type == 'SymLinkOption': if self.object_type == 'SymLinkOption':
self.attrib['opt'] = self.storage.get(self.attrib['opt']).get() self.attrib['opt'] = self.storage.get(self.attrib['opt']).get()
else: else:
self.parse_multi()
self.parse_children() self.parse_children()
attrib = self.get_attrib(self.attrib) attrib = self.get_attrib(self.attrib)
self.option_name = self.storage.get_name(self.path) self.option_name = self.storage.get_name(self.path)
@ -325,9 +335,8 @@ class Variable(Common):
return self.option_name return self.option_name
def populate_attrib(self): def populate_attrib(self):
for key, value in self.elt.attrib.items(): for key in self.get_attributes(self.elt):
if key in self.storage.booleans: value = getattr(self.elt, key)
value = convert_boolean(value)
if key in FORCE_INFORMATIONS: if key in FORCE_INFORMATIONS:
self.informations[key] = value self.informations[key] = value
else: else:
@ -339,18 +348,24 @@ class Variable(Common):
if self.attrib['multi'] == 'submulti' and self.is_follower: if self.attrib['multi'] == 'submulti' and self.is_follower:
self.attrib['default_multi'] = [] self.attrib['default_multi'] = []
choices = [] choices = []
for child in self.elt: if 'properties' in self.attrib:
if child.tag == 'property': if self.attrib['properties']:
self.populate_properties(child) self.attrib['properties'] = "'" + "', '".join(sorted(list(self.attrib['properties']))) + "'"
elif child.tag == 'value': else:
if child.attrib['type'] == 'calculation': self.attrib['properties'] = ''
self.attrib['default'] = self.calculation_value(child, []) for tag, children in self.get_children(self.elt):
else: for child in children:
self.populate_value(child) if tag == 'property':
elif child.tag == 'check': self.populate_properties(child)
self.attrib['validators'].append(self.calculation_value(child, ['ParamSelfOption()'])) elif tag == 'value':
elif child.tag == 'choice': if child.type == 'calculation':
choices.append(convert_tiramisu_value(child.text, child.attrib['type'])) self.attrib['default'] = self.calculation_value(child, [])
else:
self.populate_value(child)
elif tag == 'check':
self.attrib['validators'].append(self.calculation_value(child, ['ParamSelfOption()']))
elif tag == 'choice':
choices.append(child.name)
if choices: if choices:
self.attrib['values'] = tuple(choices) self.attrib['values'] = tuple(choices)
if self.attrib['default'] == []: if self.attrib['default'] == []:
@ -362,53 +377,47 @@ class Variable(Common):
else: else:
self.attrib['validators'] = '[' + ', '.join(self.attrib['validators']) + ']' self.attrib['validators'] = '[' + ', '.join(self.attrib['validators']) + ']'
def parse_multi(self):
if self.is_follower:
if self.attrib['multi'] is True:
self.attrib['multi'] = 'submulti'
else:
self.attrib['multi'] = True
def calculation_value(self, child, args): def calculation_value(self, child, args):
kwargs = [] kwargs = []
if 'name' in child.attrib: if hasattr(child, 'name'):
# has parameters # has parameters
function = child.attrib['name'] function = child.name
for param in child: if hasattr(child, 'param'):
value = self.populate_param(param) for param in child.param:
if 'name' not in param.attrib: value = self.populate_param(param)
args.append(str(value)) if not hasattr(param, 'name'):
else: args.append(str(value))
kwargs.append(f"'{param.attrib['name']}': " + value) else:
kwargs.append(f"'{param.name}': " + value)
else: else:
# function without any parameter # function without any parameter
function = child.text.strip() function = child.text.strip()
ret = f"Calculation(func.{function}, Params((" + ', '.join(args) + "), kwargs=" + "{" + ', '.join(kwargs) + "})" ret = f"Calculation(func.{function}, Params((" + ', '.join(args) + "), kwargs=" + "{" + ', '.join(kwargs) + "})"
if 'warnings_only' in child.attrib: if hasattr(child, 'warnings_only'):
ret += f', warnings_only={child.attrib["warnings_only"]}' ret += f', warnings_only={child.warnings_only}'
return ret + ')' return ret + ')'
def populate_param(self, def populate_param(self,
param, param,
): ):
if param.attrib['type'] == 'string': if param.type == 'string':
return f'ParamValue("{param.text}")' return f'ParamValue("{param.text}")'
elif param.attrib['type'] == 'number': elif param.type == 'number':
return f'ParamValue({param.text})' return f'ParamValue({param.text})'
elif param.attrib['type'] == 'variable': elif param.type == 'variable':
value = {'option': param.text, value = {'option': param.text,
'notraisepropertyerror': convert_boolean(param.attrib['notraisepropertyerror']), 'notraisepropertyerror': param.notraisepropertyerror,
'todict': param.text in FUNC_TO_DICT, 'todict': param.text in FUNC_TO_DICT,
} }
if 'suffix' in param.attrib: if hasattr(param, 'suffix'):
value['suffix'] = param.attrib['suffix'] value['suffix'] = param.suffix
return self.build_param(value) return self.build_param(value)
raise LoaderError(_('unknown param type {}').format(param.attrib['type'])) raise LoaderError(_('unknown param type {}').format(param.type))
def populate_value(self, def populate_value(self,
child, child,
): ):
value = convert_tiramisu_value(child.text, child.attrib['type']) value = child.name
if self.attrib['multi'] == 'submulti': if self.attrib['multi'] == 'submulti':
self.attrib['default_multi'].append(value) self.attrib['default_multi'].append(value)
elif self.is_follower: elif self.is_follower:
@ -463,7 +472,8 @@ class Family(Common):
return self.option_name return self.option_name
def populate_attrib(self): def populate_attrib(self):
for key, value in self.elt.attrib.items(): for key in self.get_attributes(self.elt):
value = getattr(self.elt, key)
if key == 'help': if key == 'help':
self.informations[key] = value self.informations[key] = value
elif key == 'dynamic': elif key == 'dynamic':
@ -473,12 +483,14 @@ class Family(Common):
self.attrib[key] = value self.attrib[key] = value
def parse_children(self): def parse_children(self):
self.attrib['properties'] = '' if 'properties' in self.attrib:
for child in self.elt: self.attrib['properties'] = "'" + "', '".join(sorted(list(self.attrib['properties']))) + "'"
if child.tag == 'property': if hasattr(self.elt, 'property'):
#self.attrib['properties'] = ''
for child in self.elt.property:
self.populate_properties(child) self.populate_properties(child)
if not self.attrib['properties']: if not self.attrib['properties']:
del self.attrib['properties'] del self.attrib['properties']
def get_object_name(self): def get_object_name(self):
if 'suffixes' in self.attrib: if 'suffixes' in self.attrib:
@ -486,11 +498,3 @@ class Family(Common):
elif not self.is_leader: elif not self.is_leader:
return 'OptionDescription' return 'OptionDescription'
return 'Leadership' return 'Leadership'
def load(xmlroot: str,
funcs_path: str):
tiramisu_objects = PopulateTiramisuObjects(xmlroot,
funcs_path,
)
return tiramisu_objects.get_text()

View File

@ -29,6 +29,7 @@ from lxml.etree import Element, SubElement # pylint: disable=E0611
from .i18n import _ from .i18n import _
from .xmlreflector import XMLReflector from .xmlreflector import XMLReflector
from .annotator import ERASED_ATTRIBUTES, SpaceAnnotator from .annotator import ERASED_ATTRIBUTES, SpaceAnnotator
from .loader import PopulateTiramisuObjects
from .utils import normalize_family from .utils import normalize_family
from .error import OperationError, SpaceObjShallNotBeUpdated, DictConsistencyError from .error import OperationError, SpaceObjShallNotBeUpdated, DictConsistencyError
from .path import Path from .path import Path
@ -41,8 +42,6 @@ FORCE_UNREDEFINABLES = ('value',)
# CreoleObjSpace's elements that shall be set to the UnRedefinable type # CreoleObjSpace's elements that shall be set to the UnRedefinable type
UNREDEFINABLE = ('multi', 'type') UNREDEFINABLE = ('multi', 'type')
PROPERTIES = ('hidden', 'frozen', 'auto_freeze', 'auto_save', 'force_default_on_freeze',
'force_store_value', 'disabled', 'mandatory')
CONVERT_PROPERTIES = {'auto_save': ['force_store_value'], 'auto_freeze': ['force_store_value', 'auto_freeze']} CONVERT_PROPERTIES = {'auto_save': ['force_store_value'], 'auto_freeze': ['force_store_value', 'auto_freeze']}
RENAME_ATTIBUTES = {'description': 'doc'} RENAME_ATTIBUTES = {'description': 'doc'}
@ -520,81 +519,13 @@ class CreoleObjSpace:
variableobj.path = self.paths.get_family_path(family_name, namespace) variableobj.path = self.paths.get_family_path(family_name, namespace)
def space_visitor(self, eosfunc_file): # pylint: disable=C0111 def space_visitor(self, eosfunc_file): # pylint: disable=C0111
self.funcs_path = eosfunc_file
SpaceAnnotator(self, eosfunc_file) SpaceAnnotator(self, eosfunc_file)
def save(self, filename, force_no_save=False): def save(self,
"""Save an XML output on disk filename,
):
:param filename: the full XML filename tiramisu_objects = PopulateTiramisuObjects(self.space,
""" self.funcs_path,
xml = Element('rougail') )
self._xml_export(xml, self.space) return tiramisu_objects.get_text() + '\n'
if not force_no_save:
self.xmlreflector.save_xmlfile(filename, xml)
return xml
def get_attributes(self, space): # pylint: disable=R0201
for attr in dir(space):
if not attr.startswith('_'):
yield attr
def _sub_xml_export(self, name, node, node_name, space, current_space):
if isinstance(space, dict):
space = list(space.values())
if isinstance(space, list):
for subspace in space:
if name == 'value' and (not hasattr(subspace, 'name') or subspace.name is None):
raise Exception('pfff')
continue
_name = CONVERT_EXPORT.get(subspace.__class__.__name__, 'family')
child_node = SubElement(node, _name)
self._xml_export(child_node, subspace, _name)
elif isinstance(space, (self.Atom, (self.Redefinable, self.UnRedefinable))):
_name = CONVERT_EXPORT.get(space.__class__.__name__, 'family')
child_node = SubElement(node, _name)
if _name != name:
child_node.attrib['name'] = name
if 'doc' not in child_node.attrib.keys():
child_node.attrib['doc'] = name
for subname in self.get_attributes(space):
subspace = getattr(space, subname)
self._sub_xml_export(subname, child_node, name, subspace, space)
elif name not in ERASED_ATTRIBUTES:
# # FIXME plutot dans annotator ...
if node.tag in ['variable', 'family', 'leader']:
if name in PROPERTIES:
if space is True:
for prop in CONVERT_PROPERTIES.get(name, [name]):
SubElement(node, 'property').text = prop
return
if name == 'mode' and space:
SubElement(node, 'property').text = space
return
# Not param for calculation ...
if name == 'name' and node_name in FORCED_TEXT_ELTS_AS_NAME and not hasattr(current_space, 'param'):
node.text = str(space)
elif name == 'text' and node_name in self.forced_text_elts:
node.text = space
elif node.tag == 'family' and name == 'name':
if 'doc' not in node.attrib.keys():
node.attrib['doc'] = space
node.attrib['name'] = normalize_family(space, check_name=False)
else:
if name in RENAME_ATTIBUTES:
name = RENAME_ATTIBUTES[name]
if space is not None:
node.attrib[name] = str(space)
def _xml_export(self,
node,
space,
node_name=variable_namespace,
):
for name in self.get_attributes(space):
subspace = getattr(space, name)
self._sub_xml_export(name,
node,
node_name,
subspace,
space,
)

View File

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family name="services" doc="services">
<property>hidden</property>
<family doc="tata" name="tata"/>
</family>
</rougail>

View File

@ -2,6 +2,6 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_2 = OptionDescription(doc='tata', name='tata', children=[]) option_2 = OptionDescription(name='tata', doc='tata', children=[])
option_1 = OptionDescription(name='services', doc='services', properties=frozenset(['hidden']), children=[option_2]) option_1 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<property>force_store_value</property>
<property>auto_freeze</property>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>basic</property>
<property expected="oui" inverse="True" source="rougail.general.module_instancie" type="calculation">auto_frozen</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="module_instancie" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='module_instancie', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_store_value', 'auto_freeze', 'mandatory', 'basic', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['basic']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<property>force_store_value</property>
<property>auto_freeze</property>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>expert</property>
<property expected="oui" inverse="True" source="rougail.general.module_instancie" type="calculation">auto_frozen</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="module_instancie" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='module_instancie', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_store_value', 'auto_freeze', 'mandatory', 'expert', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'expert', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,16 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<property>force_store_value</property>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>basic</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,7 +2,7 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_store_value', 'mandatory', 'basic']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['basic']), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,16 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>expert</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<property>force_store_value</property>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>expert</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,7 +2,7 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_store_value', 'mandatory', 'expert']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'expert', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['expert']), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'expert'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,18 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,7 +2,7 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,23 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="without_type" multi="False" name="without_type" type="string">
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='without_type', multi=False, name='without_type', default='non') option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='without_type', doc='without_type', multi=False, default='non')
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,18 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,7 +2,7 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,28 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,27 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="calculation">calc_val</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((), kwargs={})), values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,18 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="Redefine description" multi="True" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,7 +2,7 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='Redefine description', multi=True, name='mode_conteneur_actif', default=['non'], default_multi='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine description', multi=True, default=['non'], default_multi='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,34 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<property>force_store_value</property>
<property>auto_freeze</property>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>basic</property>
<property expected="oui" inverse="True" source="rougail.general.module_instancie" type="calculation">auto_frozen</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="module_instancie" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='module_instancie', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_store_value', 'auto_freeze', 'mandatory', 'basic', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['basic']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<property>force_store_value</property>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>basic</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_store_value', 'mandatory', 'basic']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['basic']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,27 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,27 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="Général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
option_2 = OptionDescription(doc='Général', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,22 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="domain">
<property>mandatory</property>
<property>expert</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = DomainnameOption(type='domainname', allow_ip=True, allow_without_dot=True, properties=frozenset(['mandatory', 'expert']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}))) option_3 = DomainnameOption(type='domainname', allow_ip=True, allow_without_dot=True, properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="number">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param type="number">3</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = IntOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={}))) option_3 = IntOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={})))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,27 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,18 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" separator="Établissement" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3.impl_set_information("separator", "Établissement") option_3.impl_set_information("separator", "Établissement")
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,18 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" separator="Établissement" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3.impl_set_information("separator", "Établissement") option_3.impl_set_information("separator", "Établissement")
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,28 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="autosave variable" multi="False" name="autosavevar" type="string">
<property>force_store_value</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>basic</property>
<value name="calc_val" type="calculation">
<param type="string">oui</param>
</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = StrOption(properties=frozenset(['force_store_value', 'frozen', 'hidden', 'mandatory', 'basic']), doc='autosave variable', multi=False, name='autosavevar', default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={}))) option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'frozen', 'hidden', 'mandatory'}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['basic']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,29 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="autosave variable" multi="False" name="autosavevar" type="string">
<property>force_store_value</property>
<property>mandatory</property>
<property>basic</property>
<property expected="oui" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">hidden</property>
<property expected="oui" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">frozen</property>
<property expected="oui" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">force_default_on_freeze</property>
<value name="calc_val" type="calculation">
<param type="string">oui</param>
</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = StrOption(properties=frozenset(['force_store_value', 'mandatory', 'basic', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), doc='autosave variable', multi=False, name='autosavevar', default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={}))) option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={})))
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['basic']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,20 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="string">
<property>mandatory</property>
<property>normal</property>
<value type="string">b</value>
</variable>
<variable doc="No change" multi="False" name="int" type="number">
<check name="valid_entier" warnings_only="False">
<param name="mini" type="string">0</param>
<param name="maxi" type="string">100</param>
</check>
<property>normal</property>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='b') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
option_4 = IntOption(properties=frozenset(['normal']), validators=[Calculation(func.valid_entier, Params((ParamSelfOption()), kwargs={'mini': ParamValue("0"), 'maxi': ParamValue("100")}), warnings_only=False)], doc='No change', multi=False, name='int') option_4 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_entier, Params((ParamSelfOption()), kwargs={'mini': ParamValue("0"), 'maxi': ParamValue("100")}), warnings_only=False)], name='int', doc='No change', multi=False)
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="string">
<property>mandatory</property>
<property>normal</property>
<value type="string">b</value>
</variable>
<variable doc="No change" multi="False" name="int2" type="number">
<property>mandatory</property>
<property>normal</property>
<value type="number">100</value>
</variable>
<variable doc="No change" multi="False" name="int" type="number">
<check name="valid_entier" warnings_only="False">
<param name="mini" type="string">0</param>
<param name="maxi" notraisepropertyerror="False" type="variable">rougail.general.int2</param>
</check>
<property>normal</property>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='b') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
option_4 = IntOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='int2', default=100) option_4 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='int2', doc='No change', multi=False, default=100)
option_5 = IntOption(properties=frozenset(['normal']), validators=[Calculation(func.valid_entier, Params((ParamSelfOption()), kwargs={'mini': ParamValue("0"), 'maxi': ParamOption(option_4, notraisepropertyerror=False, todict=False)}), warnings_only=False)], doc='No change', multi=False, name='int') option_5 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_entier, Params((ParamSelfOption()), kwargs={'mini': ParamValue("0"), 'maxi': ParamOption(option_4, notraisepropertyerror=False, todict=False)}), warnings_only=False)], name='int', doc='No change', multi=False)
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,22 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="string">
<property>mandatory</property>
<property>normal</property>
<value type="string">b</value>
</variable>
<variable doc="No change" multi="False" name="int" type="number">
<check name="valid_not_equal" warnings_only="False">
<param notraisepropertyerror="False" type="variable">rougail.general.int2</param>
</check>
<property>normal</property>
</variable>
<variable doc="No change" multi="False" name="int2" type="number">
<property>normal</property>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='b') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b')
option_5 = IntOption(properties=frozenset(['normal']), doc='No change', multi=False, name='int2') option_5 = IntOption(properties=frozenset({'normal'}), name='int2', doc='No change', multi=False)
option_4 = IntOption(properties=frozenset(['normal']), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], doc='No change', multi=False, name='int') option_4 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='int', doc='No change', multi=False)
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,25 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<check name="valid_not_equal" warnings_only="False">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</check>
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,8 +2,8 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], doc='No change', multi=False, name='mode_conteneur_actif', default='oui', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,40 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif3" type="string">
<check name="valid_not_equal" warnings_only="False">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</check>
<check name="valid_not_equal" warnings_only="False">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif2</param>
</check>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,10 +2,10 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='oui', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_6 = StrOption(properties=frozenset(['mandatory', 'normal']), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], doc='No change', multi=False, name='mode_conteneur_actif3', default='oui') option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif3', doc='No change', multi=False, default='oui')
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5, option_6]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5, option_6])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,40 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif3" type="string">
<check name="valid_not_equal" warnings_only="False">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif1</param>
</check>
<check name="valid_not_equal" warnings_only="False">
<param notraisepropertyerror="False" type="variable">rougail.general.mode_conteneur_actif2</param>
</check>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,10 +2,10 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='oui', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif1', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_6 = StrOption(properties=frozenset(['mandatory', 'normal']), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], doc='No change', multi=False, name='mode_conteneur_actif3', default='oui') option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False), Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif3', doc='No change', multi=False, default='oui')
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5, option_6]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5, option_6])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,26 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
<variable doc="Adresse IP de la carte" multi="False" name="adresse_ip_eth0" type="local_ip">
<property>mandatory</property>
<property>basic</property>
</variable>
<variable doc="Masque de sous réseau de la carte" multi="False" name="adresse_netmask_eth0" type="netmask">
<check name="valid_ip_netmask" warnings_only="True">
<param notraisepropertyerror="False" type="variable">rougail.general.adresse_ip_eth0</param>
</check>
<property>mandatory</property>
<property>basic</property>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='oui', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non'))
option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset(['mandatory', 'basic']), doc='Adresse IP de la carte', multi=False, name='adresse_ip_eth0') option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False)
option_5 = NetmaskOption(properties=frozenset(['mandatory', 'basic']), validators=[Calculation(func.valid_ip_netmask, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], doc='Masque de sous réseau de la carte', multi=False, name='adresse_netmask_eth0') option_5 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_ip_netmask, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_netmask_eth0', doc='Masque de sous réseau de la carte', multi=False)
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['basic']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,39 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
<family doc="general1" name="general1">
<property>normal</property>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general1.leader.follower1</param>
</value>
</variable>
<variable doc="follower3" multi="False" name="follower3" type="string">
<property>normal</property>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,13 +2,13 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_6 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_6 = StrOption(name='leader', doc='leader', multi=True)
option_7 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_8 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={}))) option_8 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
option_9 = StrOption(properties=frozenset(['normal']), doc='follower3', multi=True, name='follower3') option_9 = StrOption(properties=frozenset({'normal'}), name='follower3', doc='follower3', multi=True)
option_5 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_6, option_7, option_8, option_9]) option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8, option_9])
option_4 = OptionDescription(doc='general1', name='general1', properties=frozenset(['normal']), children=[option_5]) option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2, option_4]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,49 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.follower1</param>
</value>
</variable>
<variable doc="follower3" multi="False" name="follower3" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.leader</param>
</value>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,12 +2,12 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
option_8 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='follower3', multi=True, name='follower3', default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}))) option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower3', doc='follower3', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
option_4 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_5, option_6, option_7, option_8]) option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7, option_8])
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,39 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.leader</param>
</value>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,11 +2,11 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={})))
option_4 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_5, option_6, option_7]) option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,33 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>expert</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>expert</property>
<value type="string">non</value>
</variable>
</family>
<family doc="leadermode" name="leadermode">
<property>expert</property>
<leader doc="leader" name="leader">
<property>expert</property>
<variable doc="leader" multi="True" name="leader" type="string">
<property>mandatory</property>
<value name="calc_list" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>expert</property>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>expert</property>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,12 +2,12 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'expert']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['expert']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
option_6 = StrOption(properties=frozenset(['mandatory']), doc='leader', multi=True, name='leader', default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['expert']), doc='follower1', multi=True, name='follower1') option_7 = StrOption(properties=frozenset({'expert'}), name='follower1', doc='follower1', multi=True)
option_8 = StrOption(properties=frozenset(['expert']), doc='follower2', multi=True, name='follower2') option_8 = StrOption(properties=frozenset({'expert'}), name='follower2', doc='follower2', multi=True)
option_5 = Leadership(doc='leader', name='leader', properties=frozenset(['expert']), children=[option_6, option_7, option_8]) option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'expert'}), children=[option_6, option_7, option_8])
option_4 = OptionDescription(doc='leadermode', name='leadermode', properties=frozenset(['expert']), children=[option_5]) option_4 = OptionDescription(name='leadermode', doc='leadermode', properties=frozenset({'expert'}), children=[option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2, option_4]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,33 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>mandatory</property>
<property>expert</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.follower1</param>
</value>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,11 +2,11 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['mandatory', 'expert']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'expert', 'mandatory'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
option_4 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_5, option_6, option_7]) option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,33 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="Général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.follower1</param>
</value>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,11 +2,11 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
option_4 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_5, option_6, option_7]) option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
option_2 = OptionDescription(doc='Général', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,40 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>expert</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>expert</property>
<value type="string">non</value>
</variable>
</family>
<family doc="leadermode" name="leadermode">
<property>normal</property>
<leader doc="leader" name="leader">
<property>hidden</property>
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>mandatory</property>
<value name="calc_list" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>normal</property>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>normal</property>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,12 +2,12 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'expert']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['expert']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
option_6 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'mandatory']), doc='leader', multi=True, name='leader', default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'mandatory'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'normal']), doc='follower1', multi=True, name='follower1') option_7 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower1', doc='follower1', multi=True)
option_8 = StrOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'normal']), doc='follower2', multi=True, name='follower2') option_8 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'normal'}), name='follower2', doc='follower2', multi=True)
option_5 = Leadership(doc='leader', name='leader', properties=frozenset(['hidden', 'normal']), children=[option_6, option_7, option_8]) option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'hidden', 'normal'}), children=[option_6, option_7, option_8])
option_4 = OptionDescription(doc='leadermode', name='leadermode', properties=frozenset(['normal']), children=[option_5]) option_4 = OptionDescription(name='leadermode', doc='leadermode', properties=frozenset({'normal'}), children=[option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2, option_4]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,36 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>expert</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>expert</property>
<value type="string">non</value>
</variable>
</family>
<family doc="leadermode" name="leadermode">
<property>normal</property>
<leader doc="leader" name="leader">
<property>normal</property>
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">hidden</property>
<variable doc="leader" multi="True" name="leader" type="string">
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">frozen</property>
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">force_default_on_freeze</property>
</variable>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>normal</property>
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">frozen</property>
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">force_default_on_freeze</property>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>normal</property>
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">frozen</property>
<property expected="non" inverse="False" source="rougail.general.mode_conteneur_actif" type="calculation">force_default_on_freeze</property>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,12 +2,12 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'expert']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['expert']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3])
option_6 = StrOption(properties=frozenset([Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))]), doc='leader', multi=True, name='leader') option_6 = StrOption(properties=frozenset({Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='leader', doc='leader', multi=True)
option_7 = StrOption(properties=frozenset(['normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))]), doc='follower1', multi=True, name='follower1') option_7 = StrOption(properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='follower1', doc='follower1', multi=True)
option_8 = StrOption(properties=frozenset(['normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))]), doc='follower2', multi=True, name='follower2') option_8 = StrOption(properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='follower2', doc='follower2', multi=True)
option_5 = Leadership(doc='leader', name='leader', properties=frozenset(['normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))]), children=[option_6, option_7, option_8]) option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), children=[option_6, option_7, option_8])
option_4 = OptionDescription(doc='leadermode', name='leadermode', properties=frozenset(['normal']), children=[option_5]) option_4 = OptionDescription(name='leadermode', doc='leadermode', properties=frozenset({'normal'}), children=[option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2, option_4]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,35 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>basic</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<leader doc="leader" name="leader">
<property>basic</property>
<variable doc="leader" multi="True" name="leader" type="string">
<property>mandatory</property>
</variable>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.follower1</param>
</value>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,11 +2,11 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = StrOption(properties=frozenset(['mandatory']), doc='leader', multi=True, name='leader') option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
option_4 = Leadership(doc='leader', name='leader', properties=frozenset(['basic']), children=[option_5, option_6, option_7]) option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'basic'}), children=[option_5, option_6, option_7])
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['basic']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,33 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general.leader.follower1</param>
</value>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,11 +2,11 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_5 = StrOption(name='leader', doc='leader', multi=True)
option_6 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_7 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={}))) option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_6, notraisepropertyerror=False, todict=False)), kwargs={})))
option_4 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_5, option_6, option_7]) option_4 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_5, option_6, option_7])
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,26 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">oui</value>
</variable>
<leader doc="Masque de l'IP du réseau de l'esclave" name="nut_monitor_netmask">
<property>normal</property>
<variable doc="Masque de l'IP du réseau de l'esclave" multi="True" name="nut_monitor_netmask" type="netmask"/>
<variable doc="Adresse IP du réseau de l'esclave" multi="False" name="nut_monitor_host" type="network">
<property>mandatory</property>
<property>normal</property>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,10 +2,10 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='oui', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non'))
option_5 = NetmaskOption(properties=frozenset([]), doc='Masque de l\'IP du réseau de l\'esclave', multi=True, name='nut_monitor_netmask') option_5 = NetmaskOption(name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', multi=True)
option_6 = NetworkOption(properties=frozenset(['mandatory', 'normal']), doc='Adresse IP du réseau de l\'esclave', multi=True, name='nut_monitor_host') option_6 = NetworkOption(properties=frozenset({'mandatory', 'normal'}), name='nut_monitor_host', doc='Adresse IP du réseau de l\'esclave', multi=True)
option_4 = Leadership(doc='Masque de l\'IP du réseau de l\'esclave', name='nut_monitor_netmask', properties=frozenset(['normal']), children=[option_5, option_6]) option_4 = Leadership(name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', properties=frozenset({'normal'}), children=[option_5, option_6])
option_2 = OptionDescription(doc='général', name='general', properties=frozenset(['normal']), children=[option_3, option_4]) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,46 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
<family doc="general1" name="general1">
<property>normal</property>
<leader doc="leader" name="leader">
<property>normal</property>
<variable doc="leader" multi="True" name="leader" type="string"/>
<variable doc="follower1" multi="False" name="follower1" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param name="valeur" type="string">valfill</param>
</value>
</variable>
<variable doc="follower2" multi="False" name="follower2" type="string">
<property>mandatory</property>
<property>normal</property>
<value name="calc_val" type="calculation">
<param notraisepropertyerror="False" type="variable">rougail.general1.leader.follower1</param>
</value>
</variable>
</leader>
<leader doc="leader" name="leader1">
<property>normal</property>
<variable doc="leader" multi="True" name="leader1" type="string"/>
<variable doc="follower1" multi="False" name="follower11" type="string">
<property>normal</property>
</variable>
<variable doc="follower2" multi="False" name="follower21" type="string">
<property>normal</property>
</variable>
</leader>
</family>
</family>
</rougail>

View File

@ -2,16 +2,16 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
option_6 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader') option_6 = StrOption(name='leader', doc='leader', multi=True)
option_7 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower1', multi=True, name='follower1', default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) option_7 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
option_8 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='follower2', multi=True, name='follower2', default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={}))) option_8 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
option_5 = Leadership(doc='leader', name='leader', properties=frozenset(['normal']), children=[option_6, option_7, option_8]) option_5 = Leadership(name='leader', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
option_10 = StrOption(properties=frozenset([]), doc='leader', multi=True, name='leader1') option_10 = StrOption(name='leader1', doc='leader', multi=True)
option_11 = StrOption(properties=frozenset(['normal']), doc='follower1', multi=True, name='follower11') option_11 = StrOption(properties=frozenset({'normal'}), name='follower11', doc='follower1', multi=True)
option_12 = StrOption(properties=frozenset(['normal']), doc='follower2', multi=True, name='follower21') option_12 = StrOption(properties=frozenset({'normal'}), name='follower21', doc='follower2', multi=True)
option_9 = Leadership(doc='leader', name='leader1', properties=frozenset(['normal']), children=[option_10, option_11, option_12]) option_9 = Leadership(name='leader1', doc='leader', properties=frozenset({'normal'}), children=[option_10, option_11, option_12])
option_4 = OptionDescription(doc='general1', name='general1', properties=frozenset(['normal']), children=[option_5, option_9]) option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5, option_9])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2, option_4]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,37 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="condition" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='condition', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,35 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="condition" type="string">
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<property inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<property inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = StrOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='condition', default='non') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non')
option_4 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))]), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,45 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="Général" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="condition" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
</family>
<family doc="Général2" name="general2">
<property>normal</property>
<property expected="oui" inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<variable doc="No change" multi="False" name="mode_conteneur_actif3" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>force_default_on_freeze</property>
<property>frozen</property>
<property>hidden</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,11 +2,11 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='condition', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='Général', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_7 = ChoiceOption(properties=frozenset(['force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif3', default='non', values=('oui', 'non')) option_7 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif3', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_6 = OptionDescription(doc='Général2', name='general2', properties=frozenset(['normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), children=[option_7]) option_6 = OptionDescription(name='general2', doc='Général2', properties=frozenset({'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), children=[option_7])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2, option_6]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_6])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,31 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="condition" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="True" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="True" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='condition', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,31 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="condition" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="True" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="True" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='condition', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))]), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

View File

@ -1,31 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<family doc="rougail" name="rougail">
<family doc="general" name="general">
<property>normal</property>
<variable doc="No change" multi="False" name="condition" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>disabled</property>
<property>mandatory</property>
<property>normal</property>
<value type="string">non</value>
</variable>
<variable doc="No change" multi="False" name="mode_conteneur_actif2" type="choice">
<choice type="string">oui</choice>
<choice type="string">non</choice>
<property>mandatory</property>
<property>normal</property>
<property expected="oui" inverse="False" source="rougail.general.condition" type="calculation">disabled</property>
<value type="string">non</value>
</variable>
</family>
</family>
</rougail>

View File

@ -2,9 +2,9 @@ from tiramisu import *
from rougail.tiramisu import ConvertDynOptionDescription from rougail.tiramisu import ConvertDynOptionDescription
import imp import imp
func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py') func = imp.load_source('func', 'tests/flattener_dicos/../eosfunc/test.py')
option_3 = ChoiceOption(properties=frozenset(['mandatory', 'normal']), doc='No change', multi=False, name='condition', default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_4 = ChoiceOption(properties=frozenset(['disabled', 'mandatory', 'normal']), doc='No change', multi=False, name='mode_conteneur_actif', default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'disabled', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_5 = ChoiceOption(properties=frozenset(['mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))]), doc='No change', multi=False, name='mode_conteneur_actif2', default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non'))
option_2 = OptionDescription(doc='general', name='general', properties=frozenset(['normal']), children=[option_3, option_4, option_5]) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4, option_5])
option_1 = OptionDescription(doc='rougail', name='rougail', children=[option_2]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])

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