shorthand declaration (#20)

Co-authored-by: Emmanuel Garette <egarette@silique.fr>
Co-authored-by: gwen <gwenaelremond@free.fr>
Reviewed-on: #20
Co-authored-by: gnunux@silique.fr <gnunux@silique.fr>
Co-committed-by: gnunux@silique.fr <gnunux@silique.fr>
This commit is contained in:
gnunux@silique.fr 2024-07-01 14:06:59 +02:00 committed by gremond
parent e0e6597955
commit 5668520a31
127 changed files with 1033 additions and 307 deletions

View file

@ -15,6 +15,23 @@ It is with this name that we will be able to interact with the family.
It's best to follow the :ref:`convention on variable names`. It's best to follow the :ref:`convention on variable names`.
Shorthand declaration
----------------------------
Shorthand declaration is a way to declare a family in a single line. But you can only define family name and description.
To create a family, just add a key with it's name and variables as values. Attention, do not declare any other attributs.
By default, the description of the variable is the family name.
If you add comment in same line of name, this comment is use as description:
.. code-block:: yaml
---
version: '1.1'
my_family: # This is a great family
variable:
Parameters Parameters
--------------- ---------------

View file

@ -23,6 +23,28 @@ Variable's associated symbolic name.
It's best to follow the :ref:`convention on variable names`. It's best to follow the :ref:`convention on variable names`.
Shorthand declaration
----------------------------
Shorthand declaration is a way to declare a variable in a single line. But you can only define variable name, description, multi or default value.
To create a variable, just add a key with it's name and default value as value.
Be careful not to declare any other attributes.
To declare a multi variable just add a list as default value.
By default, the description of the variable is the variable name.
If you add a comment in the same line of the name, this comment will be used has a description.
.. code-block:: yaml
---
version: '1.1'
my_variable: 1 # This is a great integer variable
my_multi_variable: # This is a great multi string variable
- value1
- value2
Parameters Parameters
------------- -------------

View file

@ -23,7 +23,7 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"pyyaml ~= 6.0.1", "ruamel.yaml ~= 0.17.40",
"pydantic ~= 2.5.2", "pydantic ~= 2.5.2",
"jinja2 ~= 3.1.2", "jinja2 ~= 3.1.2",
"tiramisu ~= 4.1.0", "tiramisu ~= 4.1.0",

View file

@ -78,6 +78,9 @@ class Annotator(Walk): # pylint: disable=R0903
f'the follower "{variable.name}" without multi attribute can only have one value' f'the follower "{variable.name}" without multi attribute can only have one value'
) )
raise DictConsistencyError(msg, 87, variable.xmlfiles) raise DictConsistencyError(msg, 87, variable.xmlfiles)
if not variable.default:
variable.default = None
else:
if variable.path not in self.objectspace.leaders: if variable.path not in self.objectspace.leaders:
if multi == "submulti": if multi == "submulti":
self.objectspace.default_multi[ self.objectspace.default_multi[

View file

@ -43,8 +43,6 @@ RougailConfig = {
"templates_dir": join(ROUGAILROOT, "templates"), "templates_dir": join(ROUGAILROOT, "templates"),
"destinations_dir": join(ROUGAILROOT, "destinations"), "destinations_dir": join(ROUGAILROOT, "destinations"),
"tmp_dir": join(ROUGAILROOT, "tmp"), "tmp_dir": join(ROUGAILROOT, "tmp"),
"dtdfilename": join(DTDDIR, "rougail.dtd"),
"yamlschema_filename": join(DTDDIR, "rougail.yml"),
"functions_file": join(ROUGAILROOT, "functions.py"), "functions_file": join(ROUGAILROOT, "functions.py"),
"system_service_directory": "/usr/lib/systemd/system", "system_service_directory": "/usr/lib/systemd/system",
"systemd_service_destination_directory": "/usr/local/lib", "systemd_service_destination_directory": "/usr/local/lib",

View file

@ -44,7 +44,8 @@ from typing import (
from itertools import chain from itertools import chain
from re import findall, compile from re import findall, compile
from yaml import safe_load from ruamel.yaml import YAML
from ruamel.yaml.comments import CommentedMap
from pydantic import ValidationError from pydantic import ValidationError
from tiramisu.error import display_list from tiramisu.error import display_list
@ -338,6 +339,7 @@ class ParserVariable:
path: str, path: str,
obj: dict, obj: dict,
family_is_leadership: bool, family_is_leadership: bool,
version: str,
filename: str, filename: str,
) -> Literal["variable", "family"]: ) -> Literal["variable", "family"]:
"""Check object to determine if it's a variable or a family""" """Check object to determine if it's a variable or a family"""
@ -363,6 +365,7 @@ class ParserVariable:
return "variable" return "variable"
# all attributes are in variable object # all attributes are in variable object
# and values in attributes are not dict is not Calculation # and values in attributes are not dict is not Calculation
if isinstance(obj, dict):
extra_keys = set(obj) - self.choice_attrs extra_keys = set(obj) - self.choice_attrs
if not extra_keys: if not extra_keys:
for key, value in obj.items(): for key, value in obj.items():
@ -375,6 +378,11 @@ class ParserVariable:
break break
else: else:
return "variable" return "variable"
else:
if version == '1.0':
msg = f'Invalid value for the variable "{path}": "{obj}"'
raise DictConsistencyError(msg, 102, [filename])
return "variable"
return "family" return "family"
def get_family_or_variable_type( def get_family_or_variable_type(
@ -382,6 +390,8 @@ class ParserVariable:
obj: dict, obj: dict,
) -> Optional[str]: ) -> Optional[str]:
"""Check 'type' attributes""" """Check 'type' attributes"""
if not isinstance(obj, dict):
return None
if "_type" in obj: if "_type" in obj:
# only family has _type attributs # only family has _type attributs
return obj["_type"] return obj["_type"]
@ -399,6 +409,7 @@ class ParserVariable:
subpath: str, subpath: str,
obj: dict, obj: dict,
version: str, version: str,
comment: Optional[str],
*, *,
first_variable: bool = False, first_variable: bool = False,
family_is_leadership: bool = False, family_is_leadership: bool = False,
@ -409,10 +420,14 @@ class ParserVariable:
msg = f'the variable or family name "{name}" is incorrect, it must not starts with "_" character' msg = f'the variable or family name "{name}" is incorrect, it must not starts with "_" character'
raise DictConsistencyError(msg, 16, [filename]) raise DictConsistencyError(msg, 16, [filename])
path = f"{subpath}.{name}" path = f"{subpath}.{name}"
if version == '0.1' and not isinstance(obj, dict) and obj is not None:
msg = f'the variable "{path}" has a wrong type "{type(obj)}"'
raise DictConsistencyError(msg, 17, [filename])
typ = self.is_family_or_variable( typ = self.is_family_or_variable(
path, path,
obj, obj,
family_is_leadership, family_is_leadership,
version,
filename, filename,
) )
logging.info("family_or_variable: %s is a %s", path, typ) logging.info("family_or_variable: %s is a %s", path, typ)
@ -426,6 +441,7 @@ class ParserVariable:
path, path,
obj, obj,
version, version,
comment=comment,
first_variable=first_variable, first_variable=first_variable,
family_is_leadership=family_is_leadership, family_is_leadership=family_is_leadership,
family_is_dynamic=family_is_dynamic, family_is_dynamic=family_is_dynamic,
@ -440,6 +456,7 @@ class ParserVariable:
obj: Optional[Dict[str, Any]], obj: Optional[Dict[str, Any]],
version: str, version: str,
*, *,
comment: Optional[str] = None,
first_variable: bool = False, first_variable: bool = False,
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
@ -494,6 +511,8 @@ class ParserVariable:
if '{{ suffix }}' not in name: if '{{ suffix }}' not in name:
msg = f'dynamic family name must have "{{{{ suffix }}}}" in his name for "{path}"' msg = f'dynamic family name must have "{{{{ suffix }}}}" in his name for "{path}"'
raise DictConsistencyError(msg, 13, [filename]) raise DictConsistencyError(msg, 13, [filename])
if version != '1.0' and not family_obj and comment:
family_obj['description'] = comment
self.add_family( self.add_family(
path, path,
name, name,
@ -508,18 +527,15 @@ class ParserVariable:
family_is_leadership = True family_is_leadership = True
for idx, key in enumerate(subfamily_obj): for idx, key in enumerate(subfamily_obj):
value = subfamily_obj[key] value = subfamily_obj[key]
if not isinstance(value, dict) and value is not None:
msg = f'the variable "{path}.{key}" has a wrong type "{type(value)}"'
raise DictConsistencyError(msg, 17, [filename])
first_variable = not force_not_first and idx == 0 first_variable = not force_not_first and idx == 0
if value is None: comment = self.get_comment(key, obj)
value = {}
self.family_or_variable( self.family_or_variable(
filename, filename,
key, key,
path, path,
value, value,
version, version,
comment,
first_variable=first_variable, first_variable=first_variable,
family_is_leadership=family_is_leadership, family_is_leadership=family_is_leadership,
family_is_dynamic=family_is_dynamic, family_is_dynamic=family_is_dynamic,
@ -628,15 +644,22 @@ class ParserVariable:
obj: Optional[Dict[str, Any]], obj: Optional[Dict[str, Any]],
version: str, version: str,
*, *,
comment: Optional[str] = None,
first_variable: bool = False, first_variable: bool = False,
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
parent_dynamic: Optional[str] = None, parent_dynamic: Optional[str] = None,
) -> None: ) -> None:
"""Parse variable""" """Parse variable"""
if version == '1.0' or isinstance(obj, dict):
if obj is None: if obj is None:
obj = {} obj = {}
extra_attrs = set(obj) - self.choice_attrs extra_attrs = set(obj) - self.choice_attrs
else:
extra_attrs = []
obj = {'default': obj}
if comment:
obj['description'] = comment
if extra_attrs: if extra_attrs:
raise Exception( raise Exception(
f'"{path}" is not a valid variable, there are additional ' f'"{path}" is not a valid variable, there are additional '
@ -930,6 +953,7 @@ class RougailConvert(ParserVariable):
def __init__(self, rougailconfig) -> None: def __init__(self, rougailconfig) -> None:
self.annotator = False self.annotator = False
self.yaml = YAML()
super().__init__(rougailconfig) super().__init__(rougailconfig)
def search_calculation( def search_calculation(
@ -1007,6 +1031,18 @@ class RougailConvert(ParserVariable):
if path_prefix: if path_prefix:
self.path_prefix = None self.path_prefix = None
def get_comment(self,
name: str,
objects: CommentedMap,
) -> Optional[str]:
if name in objects.ca.items:
comment = objects.ca.items[name][2]
else:
comment = None
if comment:
comment = comment.value[1:].strip()
return comment
def parse_variable_file( def parse_variable_file(
self, self,
filename: str, filename: str,
@ -1014,7 +1050,7 @@ class RougailConvert(ParserVariable):
) -> None: ) -> None:
"""Parse file""" """Parse file"""
with open(filename, encoding="utf8") as file_fh: with open(filename, encoding="utf8") as file_fh:
objects = safe_load(file_fh) objects = self.yaml.load(file_fh)
version = self.validate_file_version( version = self.validate_file_version(
objects, objects,
filename, filename,
@ -1027,12 +1063,14 @@ class RougailConvert(ParserVariable):
version, version,
) )
for name, obj in objects.items(): for name, obj in objects.items():
comment = self.get_comment(name, objects)
self.family_or_variable( self.family_or_variable(
filename, filename,
name, name,
path, path,
obj, obj,
version, version,
comment,
) )
def get_sorted_filename( def get_sorted_filename(

View file

@ -35,7 +35,8 @@ except ModuleNotFoundError as err:
# from ast import parse as ast_parse # from ast import parse as ast_parse
from json import dumps from json import dumps
from yaml import safe_load, dump, SafeDumper from ruamel.yaml import YAML
from yaml import dump, SafeDumper
from pathlib import Path from pathlib import Path
from .i18n import _ from .i18n import _
@ -57,11 +58,6 @@ def get_function_name(version):
FUNCTION_VERSIONS = [(version, get_function_name(version)) for version in VERSIONS] FUNCTION_VERSIONS = [(version, get_function_name(version)) for version in VERSIONS]
class NoAliasDumper(SafeDumper):
def ignore_aliases(self, data):
return True
class upgrade_010_to_10: class upgrade_010_to_10:
def __init__( def __init__(
self, self,
@ -648,7 +644,7 @@ class RougailUpgrade:
ext = "xml" ext = "xml"
else: else:
with xmlsrc.open() as xml_fh: with xmlsrc.open() as xml_fh:
root = safe_load(xml_fh) root = YAML(typ='safe').load(file_fh)
search_function_name = get_function_name(str(root["version"])) search_function_name = get_function_name(str(root["version"]))
ext = "yml" ext = "yml"
function_found = False function_found = False
@ -671,23 +667,19 @@ class RougailUpgrade:
root["version"] = version root["version"] = version
xmldst.parent.mkdir(parents=True, exist_ok=True) xmldst.parent.mkdir(parents=True, exist_ok=True)
with xmldst.open("w") as ymlfh: with xmldst.open("w") as ymlfh:
dump( yaml = YAML()
yaml.dump(
root, root,
ymlfh, xmldst,
allow_unicode=True,
sort_keys=False,
Dumper=NoAliasDumper,
) )
if root_services and services_dstfolder: if root_services and services_dstfolder:
root_services["version"] = version root_services["version"] = version
ymldst_services.parent.mkdir(parents=True, exist_ok=True) ymldst_services.parent.mkdir(parents=True, exist_ok=True)
with ymldst_services.open("w") as ymlfh: with ymldst_services.open("w") as ymlfh:
dump( yaml = YAML()
yaml.dump(
root_services, root_services,
ymlfh, ymlfh,
allow_unicode=True,
sort_keys=False,
Dumper=NoAliasDumper,
) )
def _attribut_to_bool(self, variable): def _attribut_to_bool(self, variable):

View file

@ -0,0 +1,9 @@
---
version: '1.1'
bool: true
bool_multi:
- false
family:
bool: true
bool_multi:
- false

View file

@ -0,0 +1,22 @@
{
"rougail.bool": {
"owner": "default",
"value": true
},
"rougail.bool_multi": {
"owner": "default",
"value": [
false
]
},
"rougail.family.bool": {
"owner": "default",
"value": true
},
"rougail.family.bool_multi": {
"owner": "default",
"value": [
false
]
}
}

View file

@ -0,0 +1,10 @@
{
"rougail.bool": true,
"rougail.bool_multi": [
false
],
"rougail.family.bool": true,
"rougail.family.bool_multi": [
false
]
}

View file

@ -0,0 +1,22 @@
{
"rougail.bool": {
"owner": "default",
"value": true
},
"rougail.bool_multi": {
"owner": "default",
"value": [
false
]
},
"rougail.family.bool": {
"owner": "default",
"value": true
},
"rougail.family.bool_multi": {
"owner": "default",
"value": [
false
]
}
}

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1,14 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
option_3 = BoolOption(name="bool_multi", doc="bool_multi", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "notempty", "standard"}))
option_5 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
option_6 = BoolOption(name="bool_multi", doc="bool_multi", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_4 = OptionDescription(name="family", doc="family", children=[option_5, option_6], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, optiondescription_4], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,22 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_3 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
option_4 = BoolOption(name="bool_multi", doc="bool_multi", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "notempty", "standard"}))
option_6 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
option_7 = BoolOption(name="bool_multi", doc="bool_multi", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_5 = OptionDescription(name="family", doc="family", children=[option_6, option_7], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, option_4, optiondescription_5], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_10 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
option_11 = BoolOption(name="bool_multi", doc="bool_multi", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "notempty", "standard"}))
option_13 = BoolOption(name="bool", doc="bool", default=True, properties=frozenset({"mandatory", "standard"}))
option_14 = BoolOption(name="bool_multi", doc="bool_multi", multi=True, default=[False], default_multi=False, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_12 = OptionDescription(name="family", doc="family", children=[option_13, option_14], properties=frozenset({"standard"}))
optiondescription_9 = OptionDescription(name="rougail", doc="rougail", children=[option_10, option_11, optiondescription_12], properties=frozenset({"standard"}))
optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8])

View file

@ -0,0 +1,9 @@
---
version: '1.1'
float: 0.527
float_multi:
- 0.527
family:
float: 0.527
float_multi:
- 0.527

View file

@ -0,0 +1,22 @@
{
"rougail.float": {
"owner": "default",
"value": 0.527
},
"rougail.float_multi": {
"owner": "default",
"value": [
0.527
]
},
"rougail.family.float": {
"owner": "default",
"value": 0.527
},
"rougail.family.float_multi": {
"owner": "default",
"value": [
0.527
]
}
}

View file

@ -0,0 +1,10 @@
{
"rougail.float": 0.527,
"rougail.float_multi": [
0.527
],
"rougail.family.float": 0.527,
"rougail.family.float_multi": [
0.527
]
}

View file

@ -0,0 +1,22 @@
{
"rougail.float": {
"owner": "default",
"value": 0.527
},
"rougail.float_multi": {
"owner": "default",
"value": [
0.527
]
},
"rougail.family.float": {
"owner": "default",
"value": 0.527
},
"rougail.family.float_multi": {
"owner": "default",
"value": [
0.527
]
}
}

View file

@ -0,0 +1,14 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = FloatOption(name="float", doc="float", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_3 = FloatOption(name="float_multi", doc="float_multi", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
option_5 = FloatOption(name="float", doc="float", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_6 = FloatOption(name="float_multi", doc="float_multi", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_4 = OptionDescription(name="family", doc="family", children=[option_5, option_6], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, optiondescription_4], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,22 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_3 = FloatOption(name="float", doc="float", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_4 = FloatOption(name="float_multi", doc="float_multi", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
option_6 = FloatOption(name="float", doc="float", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_7 = FloatOption(name="float_multi", doc="float_multi", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_5 = OptionDescription(name="family", doc="family", children=[option_6, option_7], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, option_4, optiondescription_5], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_10 = FloatOption(name="float", doc="float", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_11 = FloatOption(name="float_multi", doc="float_multi", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
option_13 = FloatOption(name="float", doc="float", default=0.527, properties=frozenset({"mandatory", "standard"}))
option_14 = FloatOption(name="float_multi", doc="float_multi", multi=True, default=[0.527], default_multi=0.527, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_12 = OptionDescription(name="family", doc="family", children=[option_13, option_14], properties=frozenset({"standard"}))
optiondescription_9 = OptionDescription(name="rougail", doc="rougail", children=[option_10, option_11, optiondescription_12], properties=frozenset({"standard"}))
optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8])

View file

@ -0,0 +1,9 @@
---
version: '1.1'
int: 1
int_multi:
- 1
family:
int: 1
int_multi:
- 1

View file

@ -0,0 +1,22 @@
{
"rougail.int": {
"owner": "default",
"value": 1
},
"rougail.int_multi": {
"owner": "default",
"value": [
1
]
},
"rougail.family.int": {
"owner": "default",
"value": 1
},
"rougail.family.int_multi": {
"owner": "default",
"value": [
1
]
}
}

View file

@ -0,0 +1,10 @@
{
"rougail.int": 1,
"rougail.int_multi": [
1
],
"rougail.family.int": 1,
"rougail.family.int_multi": [
1
]
}

View file

@ -0,0 +1,22 @@
{
"rougail.int": {
"owner": "default",
"value": 1
},
"rougail.int_multi": {
"owner": "default",
"value": [
1
]
},
"rougail.family.int": {
"owner": "default",
"value": 1
},
"rougail.family.int_multi": {
"owner": "default",
"value": [
1
]
}
}

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1,14 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = IntOption(name="int", doc="int", default=1, properties=frozenset({"mandatory", "standard"}))
option_3 = IntOption(name="int_multi", doc="int_multi", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
option_5 = IntOption(name="int", doc="int", default=1, properties=frozenset({"mandatory", "standard"}))
option_6 = IntOption(name="int_multi", doc="int_multi", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_4 = OptionDescription(name="family", doc="family", children=[option_5, option_6], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, optiondescription_4], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,22 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_3 = IntOption(name="int", doc="int", default=1, properties=frozenset({"mandatory", "standard"}))
option_4 = IntOption(name="int_multi", doc="int_multi", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
option_6 = IntOption(name="int", doc="int", default=1, properties=frozenset({"mandatory", "standard"}))
option_7 = IntOption(name="int_multi", doc="int_multi", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_5 = OptionDescription(name="family", doc="family", children=[option_6, option_7], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, option_4, optiondescription_5], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_10 = IntOption(name="int", doc="int", default=1, properties=frozenset({"mandatory", "standard"}))
option_11 = IntOption(name="int_multi", doc="int_multi", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
option_13 = IntOption(name="int", doc="int", default=1, properties=frozenset({"mandatory", "standard"}))
option_14 = IntOption(name="int_multi", doc="int_multi", multi=True, default=[1], default_multi=1, properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_12 = OptionDescription(name="family", doc="family", children=[option_13, option_14], properties=frozenset({"standard"}))
optiondescription_9 = OptionDescription(name="rougail", doc="rougail", children=[option_10, option_11, optiondescription_12], properties=frozenset({"standard"}))
optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8])

View file

@ -0,0 +1,15 @@
---
version: '1.1'
root_variable: # With root comment
root_int: 1 # With root int comment
family: # With comment
variable: # With variable comment
int: 1 # With comment for an integer
multi: # With comment for a multi
- 0.1
- 0.2
empty_multi: [] # With comment for an empty multi
family_not_shorthand: # Not a description
hidden: true
variable: # Not a description
default: true

View file

@ -0,0 +1,33 @@
{
"rougail.root_variable": {
"owner": "default",
"value": null
},
"rougail.root_int": {
"owner": "default",
"value": 1
},
"rougail.family.variable": {
"owner": "default",
"value": null
},
"rougail.family.int": {
"owner": "default",
"value": 1
},
"rougail.family.multi": {
"owner": "default",
"value": [
0.1,
0.2
]
},
"rougail.family.empty_multi": {
"owner": "default",
"value": []
},
"rougail.family_not_shorthand.variable": {
"owner": "default",
"value": true
}
}

View file

@ -0,0 +1,12 @@
{
"rougail.root_variable": null,
"rougail.root_int": 1,
"rougail.family.variable": null,
"rougail.family.int": 1,
"rougail.family.multi": [
0.1,
0.2
],
"rougail.family.empty_multi": [],
"rougail.family_not_shorthand.variable": true
}

View file

@ -0,0 +1,33 @@
{
"rougail.root_variable": {
"owner": "default",
"value": null
},
"rougail.root_int": {
"owner": "default",
"value": 1
},
"rougail.family.variable": {
"owner": "default",
"value": null
},
"rougail.family.int": {
"owner": "default",
"value": 1
},
"rougail.family.multi": {
"owner": "default",
"value": [
0.1,
0.2
]
},
"rougail.family.empty_multi": {
"owner": "default",
"value": []
},
"rougail.family_not_shorthand.variable": {
"owner": "default",
"value": true
}
}

View file

@ -0,0 +1 @@
["rougail.root_variable", "rougail.family.variable", "rougail.family.empty_multi"]

View file

@ -0,0 +1,18 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="root_variable", doc="With root comment", properties=frozenset({"basic", "mandatory"}))
option_3 = IntOption(name="root_int", doc="With root int comment", default=1, properties=frozenset({"mandatory", "standard"}))
option_5 = StrOption(name="variable", doc="With variable comment", properties=frozenset({"basic", "mandatory"}))
option_6 = IntOption(name="int", doc="With comment for an integer", default=1, properties=frozenset({"mandatory", "standard"}))
option_7 = FloatOption(name="multi", doc="With comment for a multi", multi=True, default=[0.1, 0.2], default_multi=0.1, properties=frozenset({"mandatory", "notempty", "standard"}))
option_8 = StrOption(name="empty_multi", doc="With comment for an empty multi", multi=True, properties=frozenset({"basic", "mandatory", "notempty"}))
optiondescription_4 = OptionDescription(name="family", doc="With comment", children=[option_5, option_6, option_7, option_8], properties=frozenset({"basic"}))
option_10 = BoolOption(name="variable", doc="variable", default=True, properties=frozenset({"force_default_on_freeze", "frozen", "mandatory", "standard"}))
optiondescription_9 = OptionDescription(name="family_not_shorthand", doc="family_not_shorthand", children=[option_10], properties=frozenset({"hidden", "standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, optiondescription_4, optiondescription_9], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,30 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_3 = StrOption(name="root_variable", doc="With root comment", properties=frozenset({"basic", "mandatory"}))
option_4 = IntOption(name="root_int", doc="With root int comment", default=1, properties=frozenset({"mandatory", "standard"}))
option_6 = StrOption(name="variable", doc="With variable comment", properties=frozenset({"basic", "mandatory"}))
option_7 = IntOption(name="int", doc="With comment for an integer", default=1, properties=frozenset({"mandatory", "standard"}))
option_8 = FloatOption(name="multi", doc="With comment for a multi", multi=True, default=[0.1, 0.2], default_multi=0.1, properties=frozenset({"mandatory", "notempty", "standard"}))
option_9 = StrOption(name="empty_multi", doc="With comment for an empty multi", multi=True, properties=frozenset({"basic", "mandatory", "notempty"}))
optiondescription_5 = OptionDescription(name="family", doc="With comment", children=[option_6, option_7, option_8, option_9], properties=frozenset({"basic"}))
option_11 = BoolOption(name="variable", doc="variable", default=True, properties=frozenset({"force_default_on_freeze", "frozen", "mandatory", "standard"}))
optiondescription_10 = OptionDescription(name="family_not_shorthand", doc="family_not_shorthand", children=[option_11], properties=frozenset({"hidden", "standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, option_4, optiondescription_5, optiondescription_10], properties=frozenset({"basic"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"}))
option_14 = StrOption(name="root_variable", doc="With root comment", properties=frozenset({"basic", "mandatory"}))
option_15 = IntOption(name="root_int", doc="With root int comment", default=1, properties=frozenset({"mandatory", "standard"}))
option_17 = StrOption(name="variable", doc="With variable comment", properties=frozenset({"basic", "mandatory"}))
option_18 = IntOption(name="int", doc="With comment for an integer", default=1, properties=frozenset({"mandatory", "standard"}))
option_19 = FloatOption(name="multi", doc="With comment for a multi", multi=True, default=[0.1, 0.2], default_multi=0.1, properties=frozenset({"mandatory", "notempty", "standard"}))
option_20 = StrOption(name="empty_multi", doc="With comment for an empty multi", multi=True, properties=frozenset({"basic", "mandatory", "notempty"}))
optiondescription_16 = OptionDescription(name="family", doc="With comment", children=[option_17, option_18, option_19, option_20], properties=frozenset({"basic"}))
option_22 = BoolOption(name="variable", doc="variable", default=True, properties=frozenset({"force_default_on_freeze", "frozen", "mandatory", "standard"}))
optiondescription_21 = OptionDescription(name="family_not_shorthand", doc="family_not_shorthand", children=[option_22], properties=frozenset({"hidden", "standard"}))
optiondescription_13 = OptionDescription(name="rougail", doc="rougail", children=[option_14, option_15, optiondescription_16, optiondescription_21], properties=frozenset({"basic"}))
optiondescription_12 = OptionDescription(name="2", doc="2", children=[optiondescription_13], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_12])

View file

@ -0,0 +1,9 @@
---
version: '1.1'
string: value
string_multi:
- value
family:
string: value
string_multi:
- value

View file

@ -0,0 +1,22 @@
{
"rougail.string": {
"owner": "default",
"value": "value"
},
"rougail.string_multi": {
"owner": "default",
"value": [
"value"
]
},
"rougail.family.string": {
"owner": "default",
"value": "value"
},
"rougail.family.string_multi": {
"owner": "default",
"value": [
"value"
]
}
}

View file

@ -0,0 +1,10 @@
{
"rougail.string": "value",
"rougail.string_multi": [
"value"
],
"rougail.family.string": "value",
"rougail.family.string_multi": [
"value"
]
}

View file

@ -0,0 +1,22 @@
{
"rougail.string": {
"owner": "default",
"value": "value"
},
"rougail.string_multi": {
"owner": "default",
"value": [
"value"
]
},
"rougail.family.string": {
"owner": "default",
"value": "value"
},
"rougail.family.string_multi": {
"owner": "default",
"value": [
"value"
]
}
}

View file

@ -0,0 +1,14 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="string", doc="string", default="value", properties=frozenset({"mandatory", "standard"}))
option_3 = StrOption(name="string_multi", doc="string_multi", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}))
option_5 = StrOption(name="string", doc="string", default="value", properties=frozenset({"mandatory", "standard"}))
option_6 = StrOption(name="string_multi", doc="string_multi", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_4 = OptionDescription(name="family", doc="family", children=[option_5, option_6], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, optiondescription_4], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,22 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_3 = StrOption(name="string", doc="string", default="value", properties=frozenset({"mandatory", "standard"}))
option_4 = StrOption(name="string_multi", doc="string_multi", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}))
option_6 = StrOption(name="string", doc="string", default="value", properties=frozenset({"mandatory", "standard"}))
option_7 = StrOption(name="string_multi", doc="string_multi", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_5 = OptionDescription(name="family", doc="family", children=[option_6, option_7], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, option_4, optiondescription_5], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
option_10 = StrOption(name="string", doc="string", default="value", properties=frozenset({"mandatory", "standard"}))
option_11 = StrOption(name="string_multi", doc="string_multi", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}))
option_13 = StrOption(name="string", doc="string", default="value", properties=frozenset({"mandatory", "standard"}))
option_14 = StrOption(name="string_multi", doc="string_multi", multi=True, default=["value"], default_multi="value", properties=frozenset({"mandatory", "notempty", "standard"}))
optiondescription_12 = OptionDescription(name="family", doc="family", children=[option_13, option_14], properties=frozenset({"standard"}))
optiondescription_9 = OptionDescription(name="rougail", doc="rougail", children=[option_10, option_11, optiondescription_12], properties=frozenset({"standard"}))
optiondescription_8 = OptionDescription(name="2", doc="2", children=[optiondescription_9], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_8])

View file

@ -1,7 +1,8 @@
---
version: '1.0'
general: general:
mode_conteneur_actif: mode_conteneur_actif:
type: "boolean" type: "boolean"
test: test:
- false - false
default: true default: true
version: '1.0'

View file

@ -0,0 +1,24 @@
{
"rougail.leadermode.leader.leader": {
"owner": "default",
"value": [
"valfill"
]
},
"rougail.leadermode.leader.follower1": {
"owner": [
"default"
],
"value": [
null
]
},
"rougail.leadermode.leader.follower2": {
"owner": [
"default"
],
"value": [
null
]
}
}

View file

@ -0,0 +1,9 @@
{
"rougail.leadermode.leader.leader": [
{
"rougail.leadermode.leader.leader": "valfill",
"rougail.leadermode.leader.follower1": null,
"rougail.leadermode.leader.follower2": null
}
]
}

View file

@ -0,0 +1,24 @@
{
"rougail.leadermode.leader.leader": {
"owner": "default",
"value": [
"valfill"
]
},
"rougail.leadermode.leader.follower1": {
"owner": [
"default"
],
"value": [
null
]
},
"rougail.leadermode.leader.follower2": {
"owner": [
"default"
],
"value": [
null
]
}
}

View file

@ -26,3 +26,9 @@ varname:
default: default:
type: variable type: variable
variable: rougail.val4_dyn.var1 variable: rougail.val4_dyn.var1
disabled:
type: jinja
jinja: |
{% if 'val4' not in __.varname %}
val4 is not a valid value
{% endif %}

View file

@ -0,0 +1,33 @@
{
"rougail.varname": {
"owner": "default",
"value": [
"val1",
"val2"
]
},
"rougail.val1_dyn.var1": {
"owner": "default",
"value": "val1"
},
"rougail.val1_dyn.var2": {
"owner": "default",
"value": "val1"
},
"rougail.val1_dyn.var3": {
"owner": "default",
"value": "val1"
},
"rougail.val2_dyn.var1": {
"owner": "default",
"value": "val2"
},
"rougail.val2_dyn.var2": {
"owner": "default",
"value": "val2"
},
"rougail.val2_dyn.var3": {
"owner": "default",
"value": "val2"
}
}

View file

@ -0,0 +1,12 @@
{
"rougail.varname": [
"val1",
"val2"
],
"rougail.val1_dyn.var1": "val1",
"rougail.val1_dyn.var2": "val1",
"rougail.val1_dyn.var3": "val1",
"rougail.val2_dyn.var1": "val2",
"rougail.val2_dyn.var2": "val2",
"rougail.val2_dyn.var3": "val2"
}

View file

@ -0,0 +1,33 @@
{
"rougail.varname": {
"owner": "default",
"value": [
"val1",
"val2"
]
},
"rougail.val1_dyn.var1": {
"owner": "default",
"value": "val1"
},
"rougail.val1_dyn.var2": {
"owner": "default",
"value": "val1"
},
"rougail.val1_dyn.var3": {
"owner": "default",
"value": "val1"
},
"rougail.val2_dyn.var1": {
"owner": "default",
"value": "val2"
},
"rougail.val2_dyn.var2": {
"owner": "default",
"value": "val2"
},
"rougail.val2_dyn.var3": {
"owner": "default",
"value": "val2"
}
}

View file

@ -5,11 +5,12 @@ load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
dict_env['disabled_rougail.{{ suffix }}_dyn.var4'] = "{% if 'val4' not in __.varname %}\nval4 is not a valid value\n{% endif %}\n"
option_2 = StrOption(name="varname", doc="varname", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "notempty", "standard"})) option_2 = StrOption(name="varname", doc="varname", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "notempty", "standard"}))
option_4 = StrOption(name="var1", doc="var1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"})) option_4 = StrOption(name="var1", doc="var1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}))
option_5 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"})) option_5 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}))
option_6 = StrOption(name="var3", doc="var3", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"})) option_6 = StrOption(name="var3", doc="var3", default=Calculation(func['calc_value'], Params((ParamOption(option_4)))), properties=frozenset({"mandatory", "standard"}))
option_7 = StrOption(name="var4", doc="var4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ['val4'])))), properties=frozenset({"mandatory", "standard"})) option_7 = StrOption(name="var4", doc="var4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_4, ['val4'])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.{{ suffix }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__.varname': ParamOption(option_2)}), help_function=func['jinja_to_property_help'])}))
optiondescription_3 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="{{ suffix }}_dyn", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, option_5, option_6, option_7], properties=frozenset({"standard"})) optiondescription_3 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="{{ suffix }}_dyn", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4, option_5, option_6, option_7], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, optiondescription_3], properties=frozenset({"standard"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -5,11 +5,13 @@ load_functions('tests/dictionaries/../eosfunc/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced") ALLOWED_LEADER_PROPERTIES.add("advanced")
dict_env['disabled_1.rougail.{{ suffix }}_dyn.var4'] = "{% if 'val4' not in __.varname %}\nval4 is not a valid value\n{% endif %}\n"
dict_env['disabled_2.rougail.{{ suffix }}_dyn.var4'] = "{% if 'val4' not in __.varname %}\nval4 is not a valid value\n{% endif %}\n"
option_3 = StrOption(name="varname", doc="varname", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "notempty", "standard"})) option_3 = StrOption(name="varname", doc="varname", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"mandatory", "notempty", "standard"}))
option_5 = StrOption(name="var1", doc="var1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"})) option_5 = StrOption(name="var1", doc="var1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}))
option_6 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"})) option_6 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}))
option_7 = StrOption(name="var3", doc="var3", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"})) option_7 = StrOption(name="var3", doc="var3", default=Calculation(func['calc_value'], Params((ParamOption(option_5)))), properties=frozenset({"mandatory", "standard"}))
option_8 = StrOption(name="var4", doc="var4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ['val4'])))), properties=frozenset({"mandatory", "standard"})) option_8 = StrOption(name="var4", doc="var4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_5, ['val4'])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_1.rougail.{{ suffix }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__.varname': ParamOption(option_3)}), help_function=func['jinja_to_property_help'])}))
optiondescription_4 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="{{ suffix }}_dyn", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, option_6, option_7, option_8], properties=frozenset({"standard"})) optiondescription_4 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="{{ suffix }}_dyn", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_3)))), children=[option_5, option_6, option_7, option_8], properties=frozenset({"standard"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"})) optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3, optiondescription_4], properties=frozenset({"standard"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"})) optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"standard"}))
@ -17,7 +19,7 @@ option_11 = StrOption(name="varname", doc="varname", multi=True, default=["val1"
option_13 = StrOption(name="var1", doc="var1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"})) option_13 = StrOption(name="var1", doc="var1", default=Calculation(func['calc_value'], Params((ParamSuffix()))), properties=frozenset({"mandatory", "standard"}))
option_14 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"})) option_14 = StrOption(name="var2", doc="var2", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"}))
option_15 = StrOption(name="var3", doc="var3", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"})) option_15 = StrOption(name="var3", doc="var3", default=Calculation(func['calc_value'], Params((ParamOption(option_13)))), properties=frozenset({"mandatory", "standard"}))
option_16 = StrOption(name="var4", doc="var4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ['val4'])))), properties=frozenset({"mandatory", "standard"})) option_16 = StrOption(name="var4", doc="var4", default=Calculation(func['calc_value'], Params((ParamDynOption(option_13, ['val4'])))), properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_2.rougail.{{ suffix }}_dyn.var4"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), '__.varname': ParamOption(option_11)}), help_function=func['jinja_to_property_help'])}))
optiondescription_12 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="{{ suffix }}_dyn", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"})) optiondescription_12 = ConvertDynOptionDescription(name="{{ suffix }}_dyn", doc="{{ suffix }}_dyn", suffixes=Calculation(func['calc_value'], Params((ParamOption(option_11)))), children=[option_13, option_14, option_15, option_16], properties=frozenset({"standard"}))
optiondescription_10 = OptionDescription(name="rougail", doc="rougail", children=[option_11, optiondescription_12], properties=frozenset({"standard"})) optiondescription_10 = OptionDescription(name="rougail", doc="rougail", children=[option_11, optiondescription_12], properties=frozenset({"standard"}))
optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"})) optiondescription_9 = OptionDescription(name="2", doc="2", children=[optiondescription_10], properties=frozenset({"standard"}))

View file

@ -0,0 +1,6 @@
{
"rougail.version": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1,3 @@
{
"rougail.version": null
}

View file

@ -0,0 +1,6 @@
{
"rougail.version": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1 @@
["rougail.version"]

View file

@ -0,0 +1,6 @@
{
"rougail.leader.leader": {
"owner": "default",
"value": []
}
}

View file

@ -0,0 +1,3 @@
{
"rougail.leader.leader": []
}

View file

@ -0,0 +1,6 @@
{
"rougail.leader.leader": {
"owner": "default",
"value": []
}
}

View file

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

View file

@ -6,7 +6,7 @@ general:
mandatory: false mandatory: false
default: default:
type: jinja type: jinja
jinja: '{% if mode_conteneur_actif1 == ''non'' %}non{% else %}oui{% endif %}' jinja: "{% if mode_conteneur_actif1 == 'non' %}non{% else %}oui{% endif %}"
mode_conteneur_actif1: mode_conteneur_actif1:
type: string type: string
description: No change description: No change

View file

@ -4,7 +4,7 @@ my_var1:
type: jinja type: jinja
jinja: '{{ rougail.my_var2 | calc_val }}' jinja: '{{ rougail.my_var2 | calc_val }}'
my_var2: my_var2:
default: 'no' default: no
server_deployed: server_deployed:
type: boolean type: boolean
default: false default: false

View file

@ -5,7 +5,7 @@ general:
mandatory: false mandatory: false
default: default:
type: jinja type: jinja
jinja: '{{ "quote''" | calc_val }}' jinja: "{{ \"quote'\" | calc_val }}"
mode_conteneur_actif1: mode_conteneur_actif1:
type: string type: string
description: No change description: No change
@ -19,12 +19,12 @@ general:
mandatory: false mandatory: false
default: default:
type: jinja type: jinja
jinja: '{{ "quote\"''" | calc_val }}' jinja: "{{ \"quote\\\"'\" | calc_val }}"
mode_conteneur_actif3: mode_conteneur_actif3:
type: string type: string
description: No change description: No change
mandatory: false mandatory: false
default: default:
type: jinja type: jinja
jinja: '{{ "quote\"\\''" | calc_val }}' jinja: "{{ \"quote\\\"\\\\'\" | calc_val }}"
version: '1.1' version: '1.1'

View file

@ -1,7 +1,7 @@
general: general:
mode_conteneur_actif: mode_conteneur_actif:
test: test:
- null -
- test1 - test1
- test2 - test2
default: non default: non

View file

@ -2,5 +2,5 @@ general:
mode_conteneur_actif: mode_conteneur_actif:
redefine: true redefine: true
test: test:
- null -
version: '1.1' version: '1.1'

View file

@ -1,5 +1,5 @@
var1: var1:
default: 'no' default: no
var2: var2:
multi: true multi: true
mandatory: false mandatory: false

View file

@ -1,8 +1,8 @@
var1: var1:
multi: true multi: true
default: default:
- 'no' - no
- 'yes' - yes
- maybe - maybe
var2: var2:
multi: true multi: true

View file

@ -8,7 +8,7 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}disabled{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}disabled{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
@ -16,7 +16,5 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}disabled{% endif %}'
version: '1.1' version: '1.1'

View file

@ -1,7 +1,7 @@
general: general:
condition: condition:
type: string type: string
default: 'no' default: no
variable1: variable1:
type: string type: string
mandatory: false mandatory: false

View file

@ -8,7 +8,7 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "maybe" %}disabled{% endif %}' == "maybe" %}disabled{% endif %}'
@ -17,8 +17,5 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "maybe" %}disabled{% endif %}'
version: '1.1' version: '1.1'

View file

@ -2,16 +2,16 @@ general:
condition: condition:
type: string type: string
description: No change description: No change
default: 'no' default: no
condition2: condition2:
type: string type: string
description: No change description: No change
default: 'no' default: no
test_variable: test_variable:
type: string type: string
description: No change description: No change
hidden: true hidden: true
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2 jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2

View file

@ -2,16 +2,16 @@ general:
condition: condition:
type: string type: string
description: No change description: No change
default: 'no' default: no
condition2: condition2:
type: string type: string
description: No change description: No change
default: 'no' default: no
test_variable: test_variable:
type: string type: string
description: No change description: No change
hidden: true hidden: true
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2 jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2

View file

@ -2,16 +2,16 @@ general:
condition: condition:
type: string type: string
description: No change description: No change
default: 'yes' default: yes
condition2: condition2:
type: string type: string
description: No change description: No change
default: 'no' default: no
test_variable: test_variable:
type: string type: string
description: No change description: No change
hidden: true hidden: true
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2 jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2

View file

@ -2,16 +2,16 @@ general:
condition: condition:
type: string type: string
description: No change description: No change
default: 'yes' default: yes
condition2: condition2:
type: string type: string
description: No change description: No change
default: 'yes' default: yes
test_variable: test_variable:
type: string type: string
description: No change description: No change
hidden: true hidden: true
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2 jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2

View file

@ -2,16 +2,16 @@ general:
condition: condition:
type: string type: string
description: No change description: No change
default: 'no' default: no
condition2: condition2:
type: string type: string
description: No change description: No change
default: 'yes' default: yes
test_variable: test_variable:
type: string type: string
description: No change description: No change
hidden: true hidden: true
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2 jinja: '{% if rougail.general.condition2 == "yes" or rougail.general.condition2

View file

@ -8,7 +8,7 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "maybe" %}disabled{% endif %}' == "maybe" %}disabled{% endif %}'
@ -17,8 +17,5 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "maybe" %}disabled{% endif %}'
version: '1.1' version: '1.1'

View file

@ -8,7 +8,7 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == null %}disabled{% endif %}' jinja: '{% if rougail.general.condition == null %}disabled{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
@ -16,7 +16,5 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
disabled: disabled: *id001
type: jinja
jinja: '{% if rougail.general.condition == null %}disabled{% endif %}'
version: '1.1' version: '1.1'

View file

@ -1,12 +1,12 @@
my_var1: my_var1:
default: 'no' default: no
my_var2: my_var2:
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.my_var1 == "no" %}disabled{% endif %}' jinja: '{% if rougail.my_var1 == "no" %}disabled{% endif %}'
my_var3: my_var3:
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if rougail.my_var2 == "no" %}disabled{% endif %}' jinja: '{% if rougail.my_var2 == "no" %}disabled{% endif %}'

View file

@ -2,11 +2,11 @@ general:
condition: condition:
type: string type: string
description: No change description: No change
default: 'no' default: no
disable_variable: disable_variable:
type: string type: string
description: No change description: No change
default: 'no' default: no
disabled: disabled:
type: jinja type: jinja
jinja: '{% if __unknown == "no" %}{% else %}disabled{% endif %}' jinja: '{% if __unknown == "no" %}{% else %}disabled{% endif %}'

View file

@ -7,14 +7,12 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
disabled: disabled: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}disabled{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}disabled{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
default: non default: non
disabled: disabled: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}disabled{% endif %}'
version: '1.1' version: '1.1'

View file

@ -7,14 +7,12 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
version: '1.1' version: '1.1'

View file

@ -9,14 +9,12 @@ general:
default: default:
type: jinja type: jinja
jinja: '{{ "non" | calc_val }}' jinja: '{{ "non" | calc_val }}'
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
version: '1.1' version: '1.1'

View file

@ -11,7 +11,7 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "tous" or rougail.general.condition jinja: '{% if rougail.general.condition == "tous" or rougail.general.condition
== "authentifié" %}hidden{% endif %}' == "authentifié" %}hidden{% endif %}'
@ -19,8 +19,5 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "tous" or rougail.general.condition
== "authentifié" %}hidden{% endif %}'
version: '1.1' version: '1.1'

View file

@ -10,7 +10,7 @@ general:
mode_conteneur_actif: mode_conteneur_actif:
type: string type: string
description: No change description: No change
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "non" %}hidden{% endif %}' == "non" %}hidden{% endif %}'
@ -18,9 +18,6 @@ general:
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "non" %}hidden{% endif %}'
default: non default: non
version: '1.1' version: '1.1'

View file

@ -7,7 +7,7 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}{% else %}hidden{% endif jinja: '{% if rougail.general.condition == "oui" %}{% else %}hidden{% endif
%}' %}'
@ -15,8 +15,5 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}{% else %}hidden{% endif
%}'
version: '1.1' version: '1.1'

View file

@ -11,7 +11,7 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "non" %}{% else %}hidden{% endif %}' == "non" %}{% else %}hidden{% endif %}'
@ -19,8 +19,5 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "non" %}{% else %}hidden{% endif %}'
version: '1.1' version: '1.1'

View file

@ -8,19 +8,15 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
general2: general2:
description: Général2 description: Général2
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
version: '1.1' version: '1.1'

View file

@ -8,16 +8,14 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
general2: general2:
description: Général2 description: Général2
mode_conteneur_actif3: mode_conteneur_actif3:
@ -25,7 +23,5 @@ general2:
description: No change description: No change
hidden: true hidden: true
default: non default: non
hidden: hidden: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}hidden{% endif %}'
version: '1.1' version: '1.1'

View file

@ -7,14 +7,12 @@ general:
type: string type: string
description: No change description: No change
default: non default: non
mandatory: mandatory: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" %}mandatory{% endif %}' jinja: '{% if rougail.general.condition == "oui" %}mandatory{% endif %}'
mode_conteneur_actif2: mode_conteneur_actif2:
type: string type: string
description: No change description: No change
default: non default: non
mandatory: mandatory: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" %}mandatory{% endif %}'
version: '1.1' version: '1.1'

View file

@ -12,7 +12,7 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
mandatory: mandatory: &id001
type: jinja type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "non" %}{% else %}mandatory{% endif %}' == "non" %}{% else %}mandatory{% endif %}'
@ -21,8 +21,5 @@ general:
description: No change description: No change
hidden: true hidden: true
default: non default: non
mandatory: mandatory: *id001
type: jinja
jinja: '{% if rougail.general.condition == "oui" or rougail.general.condition
== "non" %}{% else %}mandatory{% endif %}'
version: '1.1' version: '1.1'

View file

@ -1,7 +1,7 @@
enumfam: enumfam:
enumvar: enumvar:
redefine: true redefine: true
validators: null validators:
default: c default: c
choices: choices:
- a - a

View file

@ -15,5 +15,5 @@ enumfam:
choices: choices:
- a - a
- b - b
- null -
version: '1.1' version: '1.1'

View file

@ -4,7 +4,7 @@ enumfam:
type: choice type: choice
description: multi description: multi
help: bla bla bla help: bla bla bla
default: null default:
choices: choices:
- null -
version: '1.1' version: '1.1'

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