Compare commits
No commits in common. "11294fdd617bfa497a49c1932af2cc768758237c" and "4351662f2e30d1bee58de4eb2ce88a7882df597f" have entirely different histories.
11294fdd61
...
4351662f2e
|
@ -108,7 +108,7 @@ class GroupAnnotator:
|
||||||
self.manage_follower(namespace,
|
self.manage_follower(namespace,
|
||||||
leader_family_name,
|
leader_family_name,
|
||||||
variable,
|
variable,
|
||||||
leadership_name,
|
leader_name,
|
||||||
follower_names,
|
follower_names,
|
||||||
leader_space,
|
leader_space,
|
||||||
leader_is_hidden,
|
leader_is_hidden,
|
||||||
|
@ -126,13 +126,8 @@ class GroupAnnotator:
|
||||||
# leader_is_hidden = True
|
# leader_is_hidden = True
|
||||||
else:
|
else:
|
||||||
leader_space = self.objectspace.Leadership(variable.xmlfiles)
|
leader_space = self.objectspace.Leadership(variable.xmlfiles)
|
||||||
if hasattr(group, 'name'):
|
|
||||||
leadership_name = group.name
|
|
||||||
else:
|
|
||||||
leadership_name = leader_name
|
|
||||||
leader_is_hidden = self.manage_leader(leader_space,
|
leader_is_hidden = self.manage_leader(leader_space,
|
||||||
leader_family_name,
|
leader_family_name,
|
||||||
leadership_name,
|
|
||||||
leader_name,
|
leader_name,
|
||||||
namespace,
|
namespace,
|
||||||
variable,
|
variable,
|
||||||
|
@ -147,7 +142,6 @@ class GroupAnnotator:
|
||||||
def manage_leader(self,
|
def manage_leader(self,
|
||||||
leader_space: 'Leadership',
|
leader_space: 'Leadership',
|
||||||
leader_family_name: str,
|
leader_family_name: str,
|
||||||
leadership_name: str,
|
|
||||||
leader_name: str,
|
leader_name: str,
|
||||||
namespace: str,
|
namespace: str,
|
||||||
variable: 'Variable',
|
variable: 'Variable',
|
||||||
|
@ -158,7 +152,7 @@ class GroupAnnotator:
|
||||||
if variable.multi is not True:
|
if variable.multi is not True:
|
||||||
raise DictConsistencyError(_('the variable {} in a group must be multi').format(variable.name))
|
raise DictConsistencyError(_('the variable {} in a group must be multi').format(variable.name))
|
||||||
leader_space.variable = []
|
leader_space.variable = []
|
||||||
leader_space.name = leadership_name
|
leader_space.name = leader_name
|
||||||
leader_space.hidden = variable.hidden
|
leader_space.hidden = variable.hidden
|
||||||
if variable.hidden:
|
if variable.hidden:
|
||||||
leader_is_hidden = True
|
leader_is_hidden = True
|
||||||
|
@ -173,9 +167,9 @@ class GroupAnnotator:
|
||||||
leader_space.doc = variable.description
|
leader_space.doc = variable.description
|
||||||
else:
|
else:
|
||||||
leader_space.doc = variable.name
|
leader_space.doc = variable.name
|
||||||
leadership_path = namespace + '.' + leader_family_name + '.' + leadership_name
|
leader_path = namespace + '.' + leader_family_name + '.' + leader_name
|
||||||
self.objectspace.paths.add_family(namespace,
|
self.objectspace.paths.add_family(namespace,
|
||||||
leadership_path,
|
leader_path,
|
||||||
leader_space,
|
leader_space,
|
||||||
)
|
)
|
||||||
leader_family = self.objectspace.space.variables[namespace].family[leader_family_name]
|
leader_family = self.objectspace.space.variables[namespace].family[leader_family_name]
|
||||||
|
|
|
@ -131,7 +131,6 @@
|
||||||
|
|
||||||
<!ELEMENT group (follower+)>
|
<!ELEMENT group (follower+)>
|
||||||
<!ATTLIST group leader CDATA #REQUIRED>
|
<!ATTLIST group leader CDATA #REQUIRED>
|
||||||
<!ATTLIST group name CDATA #IMPLIED>
|
|
||||||
<!ATTLIST group description CDATA #IMPLIED>
|
<!ATTLIST group description CDATA #IMPLIED>
|
||||||
|
|
||||||
<!ELEMENT param (#PCDATA)>
|
<!ELEMENT param (#PCDATA)>
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<rougail>
|
|
||||||
<variables>
|
|
||||||
<family name='general'>
|
|
||||||
<variable name='mode_conteneur_actif' type='oui/non' description="No change">
|
|
||||||
<value>non</value>
|
|
||||||
</variable>
|
|
||||||
</family>
|
|
||||||
<family name='general1'>
|
|
||||||
<variable name='leader' type='string' description="leader" multi="True"/>
|
|
||||||
<variable name='follower1' type='string' description="follower1"/>
|
|
||||||
<variable name='follower2' type='string' description="follower2"/>
|
|
||||||
</family>
|
|
||||||
</variables>
|
|
||||||
<constraints>
|
|
||||||
<fill name='calc_val' target='follower1'>
|
|
||||||
<param name='valeur'>valfill</param>
|
|
||||||
</fill>
|
|
||||||
<fill name='calc_val' target='follower2'>
|
|
||||||
<param type='variable'>follower1</param>
|
|
||||||
</fill>
|
|
||||||
<group leader='leader' name="other_name">
|
|
||||||
<follower>follower1</follower>
|
|
||||||
<follower>follower2</follower>
|
|
||||||
</group>
|
|
||||||
</constraints>
|
|
||||||
</rougail>
|
|
|
@ -1 +0,0 @@
|
||||||
{"rougail.general.mode_conteneur_actif": "non", "rougail.general1.other_name.leader": [], "rougail.general1.other_name.follower1": [], "rougail.general1.other_name.follower2": []}
|
|
|
@ -1,19 +0,0 @@
|
||||||
import imp
|
|
||||||
func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py')
|
|
||||||
for key, value in dict(locals()).items():
|
|
||||||
if key != ['imp', 'func']:
|
|
||||||
setattr(func, key, value)
|
|
||||||
try:
|
|
||||||
from tiramisu3 import *
|
|
||||||
except:
|
|
||||||
from tiramisu import *
|
|
||||||
from rougail.tiramisu import ConvertDynOptionDescription
|
|
||||||
option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non'))
|
|
||||||
option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3])
|
|
||||||
option_6 = StrOption(name='leader', doc='leader', multi=True)
|
|
||||||
option_7 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")})))
|
|
||||||
option_8 = StrOption(properties=frozenset({'normal'}), name='follower2', doc='follower2', multi=True, default=Calculation(func.calc_val, Params((ParamOption(option_7, notraisepropertyerror=False, todict=False)), kwargs={})))
|
|
||||||
option_5 = Leadership(name='other_name', doc='leader', properties=frozenset({'normal'}), children=[option_6, option_7, option_8])
|
|
||||||
option_4 = OptionDescription(name='general1', doc='general1', properties=frozenset({'normal'}), children=[option_5])
|
|
||||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2, option_4])
|
|
||||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
|
Loading…
Reference in New Issue