WIP: Expand the developer documentation #27

Draft
gremond wants to merge 226 commits from develop into developer_docs
8 changed files with 112 additions and 1 deletions
Showing only changes of commit 4c8a3c813a - Show all commits

View file

@ -68,7 +68,7 @@ def to_dict_family(family_name, paths, parents, families, root=True):
raise DictConsistencyError(_("type is not compatible with dynamic family"), variable.xmlfiles) raise DictConsistencyError(_("type is not compatible with dynamic family"), variable.xmlfiles)
if variable_name in ret: if variable_name in ret:
ret["_" + variable_name] = ret.pop(variable_name) ret["_" + variable_name] = ret.pop(variable_name)
ret[variable_name] = to_dict_family(variable_name, paths, parents, families, False) ret[variable_name] = to_dict_family(variable.path, paths, parents, families, False)
else: else:
ret[variable_name] = to_dict_variable(variable, False) ret[variable_name] = to_dict_variable(variable, False)
return ret return ret

View file

@ -0,0 +1,25 @@
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
try:
groups.namespace
except:
groups.addgroup('namespace')
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
option_3 = StrOption(name="a_first_variable", doc="a first variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'})
option_5 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'})
optiondescription_4 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_5], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']})
optiondescription_2 = OptionDescription(name="my_family_1", doc="My family type", children=[option_3, optiondescription_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']})
option_7 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'})
option_9 = StrOption(name="a_second_variable", doc="a second variable", properties=frozenset({"basic", "mandatory"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'})
optiondescription_8 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_9], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml']})
optiondescription_6 = OptionDescription(name="my_family_2", doc="My family type", children=[option_7, optiondescription_8], properties=frozenset({"basic"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']})
option_11 = StrOption(name="a_first_variable", doc="a first variable", default="a value", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml'], 'type': 'string'})
option_13 = StrOption(name="a_second_variable", doc="a second variable", default="a modified value 2", properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml'], 'type': 'string'})
optiondescription_12 = OptionDescription(name="a_sub_family", doc="My subfamily", children=[option_13], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']})
optiondescription_10 = OptionDescription(name="my_family_3", doc="My family type", children=[option_11, optiondescription_12], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_subfamily/00_structure.yml', 'tests/types/structures/family_subfamily/00_structure.yml']})
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", group_type=groups.namespace, children=[optiondescription_2, optiondescription_6, optiondescription_10], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,8 @@
{
"rougail.my_family_1.a_first_variable": "a modified value",
"rougail.my_family_1.a_sub_family.a_second_variable": "a modified value",
"rougail.my_family_2.a_first_variable": "a value",
"rougail.my_family_2.a_sub_family.a_second_variable": null,
"rougail.my_family_3.a_first_variable": "a value",
"rougail.my_family_3.a_sub_family.a_second_variable": "a modified value 2"
}

View file

@ -0,0 +1,23 @@
%YAML 1.2
---
version: 1.1
my_family_1:
type: my_family_type
a_first_variable: a modified value
a_sub_family:
a_second_variable: a modified value
my_family_2:
type: my_family_type
my_family_3:
type: my_family_type
a_sub_family:
a_second_variable: a modified value 2
...

View file

@ -0,0 +1,19 @@
%YAML 1.2
---
version: 1.1
my_family_1:
type: my_family_type
a_first_variable: a modified value
a_second_variable: a modified value
my_family_2:
type: my_family_type
my_family_3:
type: my_family_type
a_second_variable: a modified value 2
...

View file

@ -0,0 +1,10 @@
%YAML 1.2
---
version: 1.1
my_family_type: # My family type
a_first_variable: a value # a first variable
a_second_variable: # a second variable
...

View file

@ -0,0 +1,12 @@
%YAML 1.2
---
version: 1.1
my_family_type: # My family type
a_first_variable: a value # a first variable
a_sub_family: # My subfamily
a_second_variable: # a second variable
...

View file

@ -0,0 +1,14 @@
%YAML 1.2
---
version: 1.1
my_family_type: # My family type
a_first_variable: a value # a first variable
a_second_variable:
description: a second variable
hidden:
variable: _.a_first_variable
when_not: a value
...