WIP: Expand the developer documentation #27

Draft
gremond wants to merge 189 commits from develop into developer_docs
9 changed files with 79 additions and 3 deletions
Showing only changes of commit 0dfb901fd5 - Show all commits

View file

@ -408,8 +408,8 @@ class ConvertDynOptionDescription(DynOptionDescription):
"""Identifier could be an integer, we should convert it in str """Identifier could be an integer, we should convert it in str
Identifier could also contain invalid character, so we should "normalize" it Identifier could also contain invalid character, so we should "normalize" it
""" """
@staticmethod
def convert_identifier_to_path(self, identifier): def convert_identifier_to_path(identifier):
if identifier is None: if identifier is None:
return identifier return identifier
if not isinstance(identifier, str): if not isinstance(identifier, str):

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,4 @@
{
"rougail.dynval1.var": null,
"rougail.dynval2.var": null
}

View file

@ -0,0 +1,17 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from re import compile as re_compile
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('../rougail-tests/funcs/test.py')
try:
groups.namespace
except:
groups.addgroup('namespace')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_2 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'ymlfiles': ['../rougail-tests/structures/60_0family_dynamic_source_hidden/rougail/00-base.yml'], 'type': 'string'})
option_4 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['../rougail-tests/structures/60_0family_dynamic_source_hidden/rougail/00-base.yml'], 'type': 'string'})
optiondescription_3 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_2)))), children=[option_4], properties=frozenset({"basic"}), informations={'dynamic_variable': 'rougail.var', 'ymlfiles': ['../rougail-tests/structures/60_0family_dynamic_source_hidden/rougail/00-base.yml']})
optiondescription_1 = OptionDescription(name="rougail", doc="Rougail", group_type=groups.namespace, children=[option_2, optiondescription_3], properties=frozenset({"basic"}), informations={'ymlfiles': ['']})
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,12 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
from re import compile as re_compile
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
load_functions('../rougail-tests/funcs/test.py')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_1 = StrOption(name="var", doc="A suffix variable", multi=True, default=["val1", "val2"], default_multi="val1", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "standard"}), informations={'ymlfiles': ['../rougail-tests/structures/60_0family_dynamic_source_hidden/rougail/00-base.yml'], 'type': 'string'})
option_3 = StrOption(name="var", doc="A dynamic variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['../rougail-tests/structures/60_0family_dynamic_source_hidden/rougail/00-base.yml'], 'type': 'string'})
optiondescription_2 = ConvertDynOptionDescription(name="dyn{{ identifier }}", doc="A dynamic family", identifiers=Calculation(func['calc_value'], Params((ParamOption(option_1)))), children=[option_3], properties=frozenset({"basic"}), informations={'dynamic_variable': 'var', 'ymlfiles': ['../rougail-tests/structures/60_0family_dynamic_source_hidden/rougail/00-base.yml']})
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1, optiondescription_2])

View file

@ -47,7 +47,7 @@ excludes = set([
]) ])
test_ok -= excludes test_ok -= excludes
test_raise -= excludes test_raise -= excludes
#test_ok = ['04_5disabled_calculation_boolean'] #test_ok = ['60_0family_dynamic_source_hidden']
#test_ok = [] #test_ok = []
# test_raise = ['80unknown_default_variable_inside_dynamic_family'] # test_raise = ['80unknown_default_variable_inside_dynamic_family']
#test_raise = [] #test_raise = []