Compare commits

..

4 commits

65 changed files with 515 additions and 67 deletions

View file

@ -1,3 +1,11 @@
## 0.2.0a21 (2025-05-12)
### Fix
- update translation
- black
- doc example with leader example lower than leader default value
## 0.2.0a20 (2025-05-09) ## 0.2.0a20 (2025-05-09)
### Fix ### Fix

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-05-05 10:08+0200\n" "POT-Creation-Date: 2025-05-12 08:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -87,75 +87,75 @@ msgstr ""
msgid "auto modified" msgid "auto modified"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:309 #: src/rougail/output_doc/doc.py:321
msgid "This family contains lists of variable blocks." msgid "This family contains lists of variable blocks."
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:317 #: src/rougail/output_doc/doc.py:329
msgid "This family builds families dynamically." msgid "This family builds families dynamically."
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:347 #: src/rougail/output_doc/doc.py:361
msgid "multiple" msgid "multiple"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:368 #: src/rougail/output_doc/doc.py:383
msgid "No attribute \"description\" for \"{0}\" in {1}" msgid "No attribute \"description\" for \"{0}\" in {1}"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:482 #: src/rougail/output_doc/doc.py:504
msgid "(default)" msgid "(default)"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:489 #: src/rougail/output_doc/doc.py:512
msgid "text based with regular expressions \"{0}\"" msgid "text based with regular expressions \"{0}\""
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:583 #: src/rougail/output_doc/doc.py:606
msgid "depends on a calculation" msgid "depends on a calculation"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:584 #: src/rougail/output_doc/doc.py:607
msgid "\"{0}\" is a calculation for {1} but has no description in {2}" msgid "\"{0}\" is a calculation for {1} but has no description in {2}"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:605 src/rougail/output_doc/doc.py:681 #: src/rougail/output_doc/doc.py:630 src/rougail/output_doc/doc.py:720
msgid "depends on an undocumented variable" msgid "depends on an undocumented variable"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:607 #: src/rougail/output_doc/doc.py:632
msgid "when the variable \"{0}\" hasn't the value \"{1}\"" msgid "when the variable \"{0}\" hasn't the value \"{1}\""
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:609 #: src/rougail/output_doc/doc.py:634
msgid "when the variable \"{0}\" has the value \"{1}\"" msgid "when the variable \"{0}\" has the value \"{1}\""
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:624 #: src/rougail/output_doc/doc.py:649
msgid "the value of the variable \"{0}\"" msgid "the value of the variable \"{0}\""
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:625 #: src/rougail/output_doc/doc.py:650
msgid "the value of an undocumented variable" msgid "the value of an undocumented variable"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:656 #: src/rougail/output_doc/doc.py:689
msgid "the values of undocumented variables" msgid "the values of undocumented variables"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:675 #: src/rougail/output_doc/doc.py:710
msgid "(from an undocumented variable){0}" msgid "(from an undocumented variable){0}"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:679 #: src/rougail/output_doc/doc.py:716
msgid "{0} (from an undocumented variable)" msgid "{0} (from an undocumented variable)"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:690 #: src/rougail/output_doc/doc.py:729
msgid "the value of the identifier" msgid "the value of the identifier"
msgstr "" msgstr ""
#: src/rougail/output_doc/doc.py:694 #: src/rougail/output_doc/doc.py:733
msgid "the value of the {0}" msgid "the value of the {0}"
msgstr "" msgstr ""
@ -167,13 +167,13 @@ msgstr ""
msgid "Example with all variables modifiable" msgid "Example with all variables modifiable"
msgstr "" msgstr ""
#: src/rougail/output_doc/output/console.py:142 #: src/rougail/output_doc/output/console.py:145
#: src/rougail/output_doc/utils.py:373 #: src/rougail/output_doc/utils.py:375
msgid "Variable" msgid "Variable"
msgstr "" msgstr ""
#: src/rougail/output_doc/output/console.py:143 #: src/rougail/output_doc/output/console.py:146
#: src/rougail/output_doc/utils.py:373 #: src/rougail/output_doc/utils.py:375
msgid "Description" msgid "Description"
msgstr "" msgstr ""
@ -277,35 +277,35 @@ msgstr ""
msgid "Variables for \"{0}\"" msgid "Variables for \"{0}\""
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:256 #: src/rougail/output_doc/utils.py:257
msgid "Identifiers" msgid "Identifiers"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:321 #: src/rougail/output_doc/utils.py:323
msgid "Validator" msgid "Validator"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:323 #: src/rougail/output_doc/utils.py:325
msgid "Validators" msgid "Validators"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:325 #: src/rougail/output_doc/utils.py:327
msgid "Choices" msgid "Choices"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:327 #: src/rougail/output_doc/utils.py:329
msgid "Default" msgid "Default"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:331 #: src/rougail/output_doc/utils.py:333
msgid "Example" msgid "Example"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:333 #: src/rougail/output_doc/utils.py:335
msgid "Examples" msgid "Examples"
msgstr "" msgstr ""
#: src/rougail/output_doc/utils.py:394 #: src/rougail/output_doc/utils.py:396
msgid "{0}: {1}" msgid "{0}: {1}"
msgstr "" msgstr ""

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail.output_doc" name = "rougail.output_doc"
version = "0.2.0a20" version = "0.2.0a21"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "Rougail output doc" description = "Rougail output doc"

View file

@ -1 +1 @@
__version__ = "0.2.0a20" __version__ = "0.2.0a21"

View file

@ -272,7 +272,7 @@ class Annotator(Walk):
return True return True
def _calculation_to_information_variable( def _calculation_to_information_variable(
self, variable_path: str, values, prop: str, version: str, path: str self, variable_path: str, values, prop: str, version: str, path: str
) -> str: ) -> str:
# is optional # is optional
variable = self.objectspace.paths.get_with_dynamic( variable = self.objectspace.paths.get_with_dynamic(

View file

@ -171,7 +171,7 @@ class RougailOutputDoc(Examples):
return True return True
calculation = child.information.get(f"{hidden_property}_calculation", None) calculation = child.information.get(f"{hidden_property}_calculation", None)
if calculation and calculation.get('type') == 'variable': if calculation and calculation.get("type") == "variable":
variable_path, value, condition = calculation["value"] variable_path, value, condition = calculation["value"]
variable = self.conf.forcepermissive.option(variable_path) variable = self.conf.forcepermissive.option(variable_path)
try: try:
@ -180,8 +180,16 @@ class RougailOutputDoc(Examples):
pass pass
else: else:
uncalculated = variable.value.get(uncalculated=True) uncalculated = variable.value.get(uncalculated=True)
if not isinstance(uncalculated, Calculation) and self._is_inaccessible_user_data(variable) and (condition == 'when' and value == variable_value or if (
condition == 'when_not' and value != variable_value): not isinstance(uncalculated, Calculation)
and self._is_inaccessible_user_data(variable)
and (
condition == "when"
and value == variable_value
or condition == "when_not"
and value != variable_value
)
):
return True return True
if not child.isoptiondescription(): if not child.isoptiondescription():
for hidden_property in self.disabled_modes: for hidden_property in self.disabled_modes:
@ -208,14 +216,15 @@ class RougailOutputDoc(Examples):
def _parse_variable( def _parse_variable(
self, variable, leader: dict, name: str, path: str, informations: dict self, variable, leader: dict, name: str, path: str, informations: dict
) -> Optional[dict]: ) -> Optional[dict]:
potential_leader = None
if variable.isdynamic(): if variable.isdynamic():
# information is already set # information is already set
potential_leader = self._parse_variable_dynamic( potential_leader = self._parse_variable_dynamic(
variable, leader, name, path, informations variable, leader, name, path, informations
) )
elif variable.isfollower() and variable.index(): elif variable.isfollower() and variable.index():
potential_leader = self._parse_variable_follower_with_index( self._parse_variable_follower_with_index(
variable, path, informations variable, leader, path, informations
) )
else: else:
potential_leader = self._parse_variable_normal( potential_leader = self._parse_variable_normal(
@ -244,14 +253,13 @@ class RougailOutputDoc(Examples):
return None return None
def _parse_variable_follower_with_index( def _parse_variable_follower_with_index(
self, variable, path: str, informations: dict self, variable, leader: dict, path: str, informations: dict
) -> None: ) -> None:
if not self.example: if not self.example or (variable.index() + 1) > len(leader["example"][-1]):
return None return
informations[path]["example"][-1][variable.index()] = self._get_example( informations[path]["example"][-1][variable.index()] = self._get_example(
variable, informations[path], None variable, informations[path], None
) )
return None
def _parse_variable_dynamic( def _parse_variable_dynamic(
self, variable, leader, name, path, informations self, variable, leader, name, path, informations
@ -262,10 +270,14 @@ class RougailOutputDoc(Examples):
dynamic_variable["example"].append( dynamic_variable["example"].append(
self._get_example(variable, dynamic_variable, leader) self._get_example(variable, dynamic_variable, leader)
) )
description = self.formater.to_phrase(variable.description(uncalculated=True)) description = self.formater.to_phrase(
variable.description(uncalculated=True)
)
if "{{ identifier }}" in description: if "{{ identifier }}" in description:
description = self._convert_description(description, variable) description = self._convert_description(description, variable)
dynamic_variable["descriptions"].append(self.formater.to_phrase(description)) dynamic_variable["descriptions"].append(
self.formater.to_phrase(description)
)
if variable.isleader(): if variable.isleader():
return dynamic_variable return dynamic_variable
return None return None
@ -335,7 +347,9 @@ class RougailOutputDoc(Examples):
) )
self._populate(variable, informations) self._populate(variable, informations)
if "description" in informations: if "description" in informations:
informations["descriptions"] = [self.formater.to_phrase(informations.pop("description"))] informations["descriptions"] = [
self.formater.to_phrase(informations.pop("description"))
]
if variable.ismulti(): if variable.ismulti():
multi = not variable.isfollower() or variable.issubmulti() multi = not variable.isfollower() or variable.issubmulti()
else: else:
@ -363,7 +377,8 @@ class RougailOutputDoc(Examples):
informations["names"] = [obj.name()] informations["names"] = [obj.name()]
description = obj.description(uncalculated=True) description = obj.description(uncalculated=True)
if obj.name(uncalculated=True) == description and ( if obj.name(uncalculated=True) == description and (
not obj.isoptiondescription() or (self.support_namespace and obj.group_type() is not groups.namespace) not obj.isoptiondescription()
or (self.support_namespace and obj.group_type() is not groups.namespace)
): ):
warning = _('No attribute "description" for "{0}" in {1}').format( warning = _('No attribute "description" for "{0}" in {1}').format(
obj.path(uncalculated=True), obj.path(uncalculated=True),
@ -392,7 +407,10 @@ class RougailOutputDoc(Examples):
informations["example"] = [example] informations["example"] = [example]
informations["mandatory_without_value"] = "mandatory" in variable.property.get( informations["mandatory_without_value"] = "mandatory" in variable.property.get(
uncalculated=True uncalculated=True
) and (not variable.information.get("default_value_makes_sense", True) or variable.value.get(uncalculated=True) in [None, []]) ) and (
not variable.information.get("default_value_makes_sense", True)
or variable.value.get(uncalculated=True) in [None, []]
)
def _get_example(self, variable, informations: dict, leader): def _get_example(self, variable, informations: dict, leader):
example = informations.get("examples") example = informations.get("examples")
@ -432,6 +450,7 @@ class RougailOutputDoc(Examples):
if multi: if multi:
example = [example] example = [example]
if leader is not None and variable.isfollower(): if leader is not None and variable.isfollower():
# len of leader is known, add "undefined" example, it will be modify latter with true value
example = [example] + [undefined] * (len(leader["example"][-1]) - 1) example = [example] + [undefined] * (len(leader["example"][-1]) - 1)
return example return example
@ -479,7 +498,11 @@ class RougailOutputDoc(Examples):
if not isinstance(val, Calculation): if not isinstance(val, Calculation):
default = informations.get("default") default = informations.get("default")
if default is not None and val == default: if default is not None and val == default:
choices[idx] = str(val) + " " + self.formater.bold("" + _("(default)")) choices[idx] = (
str(val)
+ " "
+ self.formater.bold("" + _("(default)"))
)
informations["display_default"] = False informations["display_default"] = False
continue continue
choices[idx] = self._to_string(variable, "choice", f"_{idx}") choices[idx] = self._to_string(variable, "choice", f"_{idx}")
@ -599,7 +622,9 @@ class RougailOutputDoc(Examples):
variable = None variable = None
else: else:
uncalculated = variable.value.get(uncalculated=True) uncalculated = variable.value.get(uncalculated=True)
if not isinstance(uncalculated, Calculation) and self._is_inaccessible_user_data(variable): if not isinstance(
uncalculated, Calculation
) and self._is_inaccessible_user_data(variable):
return None return None
if variable and self._is_inaccessible_user_data(variable): if variable and self._is_inaccessible_user_data(variable):
msg = _("depends on an undocumented variable") msg = _("depends on an undocumented variable")
@ -625,10 +650,16 @@ class RougailOutputDoc(Examples):
hidden_msg = _("the value of an undocumented variable") hidden_msg = _("the value of an undocumented variable")
# if "{{ identifier }}" in calculation["value"] and calculation["value"] in self.dynamic_paths: # if "{{ identifier }}" in calculation["value"] and calculation["value"] in self.dynamic_paths:
if "{{ identifier }}" in calculation["ori_path"]: if "{{ identifier }}" in calculation["ori_path"]:
if calculation["value"] == calculation['ori_path']: if calculation["value"] == calculation["ori_path"]:
regexp = None regexp = None
else: else:
regexp = compile("^" + calculation["ori_path"].replace("{{ identifier }}", "(.*)") + "$") regexp = compile(
"^"
+ calculation["ori_path"].replace(
"{{ identifier }}", "(.*)"
)
+ "$"
)
informations = [self.dynamic_paths[calculation["value"]]] informations = [self.dynamic_paths[calculation["value"]]]
values = [] values = []
all_is_undocumented = None all_is_undocumented = None
@ -642,10 +673,12 @@ class RougailOutputDoc(Examples):
msg = hidden_msg msg = hidden_msg
else: else:
if regexp: if regexp:
display_path = calculation['ori_path'] display_path = calculation["ori_path"]
for identifier in regexp.findall(path): for identifier in regexp.findall(path):
display_path = display_path.replace( display_path = display_path.replace(
"{{ identifier }}", self.formater.italic(identifier), 1 "{{ identifier }}",
self.formater.italic(identifier),
1,
) )
else: else:
display_path = get_display_path(information, idx) display_path = get_display_path(information, idx)
@ -667,16 +700,22 @@ class RougailOutputDoc(Examples):
uncalculated = variable.value.get(uncalculated=True) uncalculated = variable.value.get(uncalculated=True)
except PropertiesOptionError: except PropertiesOptionError:
true_msg = None true_msg = None
# true_msg = _("depends on an undocumented variable") # true_msg = _("depends on an undocumented variable")
else: else:
if uncalculated and not isinstance(uncalculated, Calculation): if uncalculated and not isinstance(
uncalculated, Calculation
):
if isinstance(uncalculated, list): if isinstance(uncalculated, list):
uncalculated = self.formater.list(uncalculated) uncalculated = self.formater.list(uncalculated)
true_msg = _('(from an undocumented variable){0}').format(uncalculated) true_msg = _(
"(from an undocumented variable){0}"
).format(uncalculated)
else: else:
if not isinstance(uncalculated, str): if not isinstance(uncalculated, str):
uncalculated = dump(uncalculated) uncalculated = dump(uncalculated)
true_msg = _('{0} (from an undocumented variable)').format(uncalculated) true_msg = _(
"{0} (from an undocumented variable)"
).format(uncalculated)
else: else:
true_msg = _("depends on an undocumented variable") true_msg = _("depends on an undocumented variable")
if true_msg: if true_msg:

View file

@ -15,6 +15,7 @@ details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
""" """
from typing import List from typing import List
from ..i18n import _ from ..i18n import _
@ -27,12 +28,13 @@ class Formater(CommonFormater):
name = "console" name = "console"
level = 10 level = 10
enter_table = "\n" enter_table = "\n"
titles_color = {"title1": "bright_cyan underline bold", titles_color = {
"title2": "bright_green underline bold", "title1": "bright_cyan underline bold",
"title3": "green1 underline bold", "title2": "bright_green underline bold",
"title4": "green3 underline bold", "title3": "green1 underline bold",
"title5": "dark_green underline bold", "title4": "green3 underline bold",
} "title5": "dark_green underline bold",
}
def __init__(self) -> None: def __init__(self) -> None:
self.max_line = 0 self.max_line = 0
@ -43,6 +45,7 @@ class Formater(CommonFormater):
from rich.table import Table from rich.table import Table
from rich.theme import Theme from rich.theme import Theme
from rich.console import Console from rich.console import Console
self.rich_table = Table self.rich_table = Table
custom_theme = Theme(self.titles_color) custom_theme = Theme(self.titles_color)
@ -125,7 +128,7 @@ class Formater(CommonFormater):
) -> str: ) -> str:
"""Add a link""" """Add a link"""
return self.prop(comment, False) return self.prop(comment, False)
#return f"{comment} ({link})" # return f"{comment} ({link})"
def columns( def columns(
self, self,

View file

@ -253,7 +253,9 @@ class CommonFormater:
for help_ in helps: for help_ in helps:
msg.append(help_.strip() + ENTER) msg.append(help_.strip() + ENTER)
if "identifiers" in informations: if "identifiers" in informations:
msg.append(self.section(_("Identifiers"), informations["identifiers"]) + ENTER) msg.append(
self.section(_("Identifiers"), informations["identifiers"]) + ENTER
)
return msg return msg
def family_description(self, informations: dict) -> str(): def family_description(self, informations: dict) -> str():

View file

View file

@ -0,0 +1 @@
{}

View file

View file

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,31 @@
== a leadership
`basic`
This family contains lists of variable blocks.
[cols="1a,1a"]
|====
| Variable | Description
|
**leadership.leader** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
A leader. +
**Default**:
* value_1
* value_2
* value_3
**Examples**:
* val1
* val2
|
**leadership.follower** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
A follower.
|====

View file

@ -0,0 +1,94 @@
{
"leadership": {
"type": "leadership",
"informations": {
"paths": [
"leadership"
],
"names": [
"leadership"
],
"description": "a leadership",
"properties": [
{
"type": "mode",
"name": "basic"
}
],
"help": [
"This family contains lists of variable blocks."
]
},
"children": {
"leadership.leader": {
"type": "variable",
"default": [
"value_1",
"value_2",
"value_3"
],
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "mandatory"
},
{
"type": "property",
"name": "unique"
},
{
"type": "multiple",
"name": "multiple"
}
],
"paths": [
"leadership.leader"
],
"names": [
"leader"
],
"descriptions": [
"A leader."
],
"examples": [
"val1",
"val2"
]
},
"leadership.follower": {
"type": "variable",
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "basic"
},
{
"type": "property",
"name": "mandatory"
}
],
"paths": [
"leadership.follower"
],
"names": [
"follower"
],
"descriptions": [
"A follower."
]
}
}
}
}

View file

@ -0,0 +1,11 @@
# a leadership
`basic`
This family contains lists of variable blocks.
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **leadership.leader**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A leader.<br/>**Default**: <br/>- value_1<br/>- value_2<br/>- value_3<br/>**Examples**: <br/>- val1<br/>- val2 |
| **leadership.follower**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A follower. |

View file

@ -0,0 +1,26 @@
a leadership
 basic 
This family contains lists of variable blocks.
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
leadership.leader │ A leader. │
 string   standard   mandatory    │ Default: │
unique   multiple  │ - value_1 │
│ │ - value_2 │
│ │ - value_3 │
│ │ Examples: │
│ │ - val1 │
│ │ - val2 │
├───────────────────────────────────────┼──────────────────────────────────────┤
leadership.follower │ A follower. │
 string   basic   mandatory  │ │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1,10 @@
# Example with all variables modifiable
```yaml
---
leadership:
- leader: val1
follower: example
- leader: val2
follower: example
```

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,33 @@
== Variables for "Rougail"
=== a leadership
`basic`
This family contains lists of variable blocks.
[cols="1a,1a"]
|====
| Variable | Description
|
**rougail.leadership.leader** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
A leader. +
**Default**:
* value_1
* value_2
* value_3
**Examples**:
* val1
* val2
|
**rougail.leadership.follower** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
A follower.
|====

View file

@ -0,0 +1,114 @@
{
"rougail": {
"type": "namespace",
"informations": {
"paths": [
"rougail"
],
"names": [
"rougail"
],
"description": "Rougail",
"properties": [
{
"type": "mode",
"name": "basic"
}
]
},
"children": {
"leadership": {
"type": "leadership",
"informations": {
"paths": [
"rougail.leadership"
],
"names": [
"leadership"
],
"description": "a leadership",
"properties": [
{
"type": "mode",
"name": "basic"
}
],
"help": [
"This family contains lists of variable blocks."
]
},
"children": {
"rougail.leadership.leader": {
"type": "variable",
"default": [
"value_1",
"value_2",
"value_3"
],
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "mandatory"
},
{
"type": "property",
"name": "unique"
},
{
"type": "multiple",
"name": "multiple"
}
],
"paths": [
"rougail.leadership.leader"
],
"names": [
"leader"
],
"descriptions": [
"A leader."
],
"examples": [
"val1",
"val2"
]
},
"rougail.leadership.follower": {
"type": "variable",
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "basic"
},
{
"type": "property",
"name": "mandatory"
}
],
"paths": [
"rougail.leadership.follower"
],
"names": [
"follower"
],
"descriptions": [
"A follower."
]
}
}
}
}
}
}

View file

@ -0,0 +1,13 @@
# Variables for "Rougail"
## a leadership
`basic`
This family contains lists of variable blocks.
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.leadership.leader**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A leader.<br/>**Default**: <br/>- value_1<br/>- value_2<br/>- value_3<br/>**Examples**: <br/>- val1<br/>- val2 |
| **rougail.leadership.follower**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A follower. |

View file

@ -0,0 +1,31 @@
Variables for "Rougail"
a leadership
 basic 
This family contains lists of variable blocks.
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
rougail.leadership.leader │ A leader. │
 string   standard   mandatory    │ Default: │
unique   multiple  │ - value_1 │
│ │ - value_2 │
│ │ - value_3 │
│ │ Examples: │
│ │ - val1 │
│ │ - val2 │
├───────────────────────────────────────┼──────────────────────────────────────┤
rougail.leadership.follower │ A follower. │
 string   basic   mandatory  │ │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1,11 @@
# Example with all variables modifiable
```yaml
---
rougail:
leadership:
- leader: val1
follower: example
- leader: val2
follower: example
```

View file

@ -0,0 +1 @@
[]

View file

@ -20,7 +20,7 @@ excludes = [
] ]
test_ok = get_structures_list(excludes) test_ok = get_structures_list(excludes)
# test_ok = [HERE.parent.parent / "rougail-tests" / "structures" / "60_5family_dynamic_calc_suffix_hidden"] # test_ok = [HERE.parent.parent / "rougail-tests" / "structures" / "40_0leadership_reduce"]
os.environ['COLUMNS'] = '80' os.environ['COLUMNS'] = '80'