diff --git a/locale/fr/LC_MESSAGES/rougail_output_doc.po b/locale/fr/LC_MESSAGES/rougail_output_doc.po index 161664ab4..abc4d2351 100644 --- a/locale/fr/LC_MESSAGES/rougail_output_doc.po +++ b/locale/fr/LC_MESSAGES/rougail_output_doc.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2025-10-22 16:58+0200\n" -"PO-Revision-Date: 2025-10-22 16:59+0200\n" +"POT-Creation-Date: 2025-10-26 15:19+0100\n" +"PO-Revision-Date: 2025-10-26 15:20+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -104,107 +104,115 @@ msgstr "Générer le document au format" msgid "Force true color terminal" msgstr "Force les vrais couleurs dans le terminal" -#: src/rougail/output_doc/doc.py:345 +#: src/rougail/output_doc/doc.py:344 msgid "This family contains lists of variable blocks." msgstr "Cette famille contient des listes de bloc de variable." -#: src/rougail/output_doc/doc.py:355 +#: src/rougail/output_doc/doc.py:354 msgid "This family builds families dynamically." msgstr "Cette famille construit des familles dynamiquement." -#: src/rougail/output_doc/doc.py:369 +#: src/rougail/output_doc/doc.py:368 msgid "Default" msgstr "Défaut" -#: src/rougail/output_doc/doc.py:384 +#: src/rougail/output_doc/doc.py:383 msgid "multiple" msgstr "multiple" -#: src/rougail/output_doc/doc.py:392 +#: src/rougail/output_doc/doc.py:391 msgid "Example" msgstr "Exemple" -#: src/rougail/output_doc/doc.py:395 +#: src/rougail/output_doc/doc.py:394 msgid "Examples" msgstr "Exemples" -#: src/rougail/output_doc/doc.py:421 +#: src/rougail/output_doc/doc.py:403 +msgid "Tag" +msgstr "Étiquette" + +#: src/rougail/output_doc/doc.py:406 +msgid "Tags" +msgstr "Étiquettes" + +#: src/rougail/output_doc/doc.py:435 msgid "No attribute \"description\" for \"{0}\" in {1}" msgstr "Aucun attribut \"description\" pour \"{0}\" dans {1}" -#: src/rougail/output_doc/doc.py:563 +#: src/rougail/output_doc/doc.py:577 msgid "text based with regular expressions \"{0}\"" msgstr "texte avec expression rationnelle \"{0}\"" -#: src/rougail/output_doc/doc.py:567 +#: src/rougail/output_doc/doc.py:581 msgid "Validator" msgstr "Validateur" -#: src/rougail/output_doc/doc.py:570 +#: src/rougail/output_doc/doc.py:584 msgid "Validators" msgstr "Validateurs" -#: src/rougail/output_doc/doc.py:579 +#: src/rougail/output_doc/doc.py:593 msgid "Choices" msgstr "Choix" -#: src/rougail/output_doc/doc.py:682 +#: src/rougail/output_doc/doc.py:696 msgid "the value of the identifier" msgstr "la valeur de l'identifiant" -#: src/rougail/output_doc/doc.py:686 +#: src/rougail/output_doc/doc.py:700 msgid "the value of the {0}" msgstr "la valeur de l'{0}" -#: src/rougail/output_doc/doc.py:695 +#: src/rougail/output_doc/doc.py:709 msgid "depends on a calculation" msgstr "dépend d'un calcul" -#: src/rougail/output_doc/doc.py:701 +#: src/rougail/output_doc/doc.py:715 msgid "\"{0}\" is a calculation for {1} but has no description in {2}" msgstr "\"{0}\" est un calcul pour {1} mais n'a pas de description dans {2}" -#: src/rougail/output_doc/doc.py:728 src/rougail/output_doc/doc.py:844 +#: src/rougail/output_doc/doc.py:742 src/rougail/output_doc/doc.py:858 msgid "depends on an undocumented variable" msgstr "dépends d'une variable non documentée" -#: src/rougail/output_doc/doc.py:744 +#: src/rougail/output_doc/doc.py:758 msgid "when the variable \"{0}\" hasn't the value \"{1}\"" msgstr "lorsque la variable \"{0}\" n'a pas la valeur \"{1}\"" -#: src/rougail/output_doc/doc.py:746 +#: src/rougail/output_doc/doc.py:760 msgid "when the variable \"{0}\" is defined and hasn't the value \"{1}\"" msgstr "lorsque la variable \"{0}\" est définie et n'a pas la valeur \"{1}\"" -#: src/rougail/output_doc/doc.py:751 +#: src/rougail/output_doc/doc.py:765 msgid "when the variable \"{0}\" has the value \"{1}\"" msgstr "lorsque la variable \"{0}\" a la valeur \"{1}\"" -#: src/rougail/output_doc/doc.py:753 +#: src/rougail/output_doc/doc.py:767 msgid "when the variable \"{0}\" is defined and has the value \"{1}\"" msgstr "lorsque la variable \"{0}\" est définie et a la valeur \"{1}\"" -#: src/rougail/output_doc/doc.py:771 +#: src/rougail/output_doc/doc.py:785 msgid "the value of the variable \"{0}\"" msgstr "la valeur de la variable \"{0}\"" -#: src/rougail/output_doc/doc.py:773 +#: src/rougail/output_doc/doc.py:787 msgid "the value of the variable \"{0}\" if it is defined" msgstr "la valeur de la variable \"{0}\" si elle est définie" -#: src/rougail/output_doc/doc.py:774 +#: src/rougail/output_doc/doc.py:788 msgid "the value of an undocumented variable" msgstr "la valeur d'une variable non documentée" -#: src/rougail/output_doc/doc.py:812 +#: src/rougail/output_doc/doc.py:826 msgid "the values of undocumented variables" msgstr "les valeurs de variables non documentées" -#: src/rougail/output_doc/doc.py:832 +#: src/rougail/output_doc/doc.py:846 msgid "(from an undocumented variable)" msgstr "(issue d'une variable non documentée)" -#: src/rougail/output_doc/doc.py:840 +#: src/rougail/output_doc/doc.py:854 msgid "{0} (from an undocumented variable)" msgstr "{0} (issue d'une variable non documentée)" @@ -217,12 +225,12 @@ msgid "Example with all variables modifiable" msgstr "Exemple avec toutes les variables modifiable" #: src/rougail/output_doc/output/console.py:164 -#: src/rougail/output_doc/utils.py:777 +#: src/rougail/output_doc/utils.py:782 msgid "Variable" msgstr "Variable" #: src/rougail/output_doc/output/console.py:165 -#: src/rougail/output_doc/utils.py:777 +#: src/rougail/output_doc/utils.py:782 msgid "Description" msgstr "Description" @@ -338,13 +346,13 @@ msgstr "Variables pour \"{0}\"" msgid "Identifiers" msgstr "Identifiants" -#: src/rougail/output_doc/utils.py:654 src/rougail/output_doc/utils.py:663 -#: src/rougail/output_doc/utils.py:669 src/rougail/output_doc/utils.py:675 -#: src/rougail/output_doc/utils.py:679 +#: src/rougail/output_doc/utils.py:659 src/rougail/output_doc/utils.py:668 +#: src/rougail/output_doc/utils.py:674 src/rougail/output_doc/utils.py:680 +#: src/rougail/output_doc/utils.py:684 msgid "(default)" msgstr "(défaut)" -#: src/rougail/output_doc/utils.py:827 +#: src/rougail/output_doc/utils.py:832 msgid "{0}: {1}" msgstr "{0} : {1}" diff --git a/locale/rougail_output_doc.pot b/locale/rougail_output_doc.pot index 4c3a153df..c14e387ed 100644 --- a/locale/rougail_output_doc.pot +++ b/locale/rougail_output_doc.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-10-22 16:59+0200\n" +"POT-Creation-Date: 2025-10-26 15:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -103,107 +103,115 @@ msgstr "" msgid "Force true color terminal" msgstr "" -#: src/rougail/output_doc/doc.py:345 +#: src/rougail/output_doc/doc.py:344 msgid "This family contains lists of variable blocks." msgstr "" -#: src/rougail/output_doc/doc.py:355 +#: src/rougail/output_doc/doc.py:354 msgid "This family builds families dynamically." msgstr "" -#: src/rougail/output_doc/doc.py:369 +#: src/rougail/output_doc/doc.py:368 msgid "Default" msgstr "" -#: src/rougail/output_doc/doc.py:384 +#: src/rougail/output_doc/doc.py:383 msgid "multiple" msgstr "" -#: src/rougail/output_doc/doc.py:392 +#: src/rougail/output_doc/doc.py:391 msgid "Example" msgstr "" -#: src/rougail/output_doc/doc.py:395 +#: src/rougail/output_doc/doc.py:394 msgid "Examples" msgstr "" -#: src/rougail/output_doc/doc.py:421 +#: src/rougail/output_doc/doc.py:403 +msgid "Tag" +msgstr "" + +#: src/rougail/output_doc/doc.py:406 +msgid "Tags" +msgstr "" + +#: src/rougail/output_doc/doc.py:435 msgid "No attribute \"description\" for \"{0}\" in {1}" msgstr "" -#: src/rougail/output_doc/doc.py:563 +#: src/rougail/output_doc/doc.py:577 msgid "text based with regular expressions \"{0}\"" msgstr "" -#: src/rougail/output_doc/doc.py:567 +#: src/rougail/output_doc/doc.py:581 msgid "Validator" msgstr "" -#: src/rougail/output_doc/doc.py:570 +#: src/rougail/output_doc/doc.py:584 msgid "Validators" msgstr "" -#: src/rougail/output_doc/doc.py:579 +#: src/rougail/output_doc/doc.py:593 msgid "Choices" msgstr "" -#: src/rougail/output_doc/doc.py:682 +#: src/rougail/output_doc/doc.py:696 msgid "the value of the identifier" msgstr "" -#: src/rougail/output_doc/doc.py:686 +#: src/rougail/output_doc/doc.py:700 msgid "the value of the {0}" msgstr "" -#: src/rougail/output_doc/doc.py:695 +#: src/rougail/output_doc/doc.py:709 msgid "depends on a calculation" msgstr "" -#: src/rougail/output_doc/doc.py:701 +#: src/rougail/output_doc/doc.py:715 msgid "\"{0}\" is a calculation for {1} but has no description in {2}" msgstr "" -#: src/rougail/output_doc/doc.py:728 src/rougail/output_doc/doc.py:844 +#: src/rougail/output_doc/doc.py:742 src/rougail/output_doc/doc.py:858 msgid "depends on an undocumented variable" msgstr "" -#: src/rougail/output_doc/doc.py:744 +#: src/rougail/output_doc/doc.py:758 msgid "when the variable \"{0}\" hasn't the value \"{1}\"" msgstr "" -#: src/rougail/output_doc/doc.py:746 +#: src/rougail/output_doc/doc.py:760 msgid "when the variable \"{0}\" is defined and hasn't the value \"{1}\"" msgstr "" -#: src/rougail/output_doc/doc.py:751 +#: src/rougail/output_doc/doc.py:765 msgid "when the variable \"{0}\" has the value \"{1}\"" msgstr "" -#: src/rougail/output_doc/doc.py:753 +#: src/rougail/output_doc/doc.py:767 msgid "when the variable \"{0}\" is defined and has the value \"{1}\"" msgstr "" -#: src/rougail/output_doc/doc.py:771 +#: src/rougail/output_doc/doc.py:785 msgid "the value of the variable \"{0}\"" msgstr "" -#: src/rougail/output_doc/doc.py:773 +#: src/rougail/output_doc/doc.py:787 msgid "the value of the variable \"{0}\" if it is defined" msgstr "" -#: src/rougail/output_doc/doc.py:774 +#: src/rougail/output_doc/doc.py:788 msgid "the value of an undocumented variable" msgstr "" -#: src/rougail/output_doc/doc.py:812 +#: src/rougail/output_doc/doc.py:826 msgid "the values of undocumented variables" msgstr "" -#: src/rougail/output_doc/doc.py:832 +#: src/rougail/output_doc/doc.py:846 msgid "(from an undocumented variable)" msgstr "" -#: src/rougail/output_doc/doc.py:840 +#: src/rougail/output_doc/doc.py:854 msgid "{0} (from an undocumented variable)" msgstr "" @@ -216,12 +224,12 @@ msgid "Example with all variables modifiable" msgstr "" #: src/rougail/output_doc/output/console.py:164 -#: src/rougail/output_doc/utils.py:777 +#: src/rougail/output_doc/utils.py:782 msgid "Variable" msgstr "" #: src/rougail/output_doc/output/console.py:165 -#: src/rougail/output_doc/utils.py:777 +#: src/rougail/output_doc/utils.py:782 msgid "Description" msgstr "" @@ -337,13 +345,13 @@ msgstr "" msgid "Identifiers" msgstr "" -#: src/rougail/output_doc/utils.py:654 src/rougail/output_doc/utils.py:663 -#: src/rougail/output_doc/utils.py:669 src/rougail/output_doc/utils.py:675 -#: src/rougail/output_doc/utils.py:679 +#: src/rougail/output_doc/utils.py:659 src/rougail/output_doc/utils.py:668 +#: src/rougail/output_doc/utils.py:674 src/rougail/output_doc/utils.py:680 +#: src/rougail/output_doc/utils.py:684 msgid "(default)" msgstr "" -#: src/rougail/output_doc/utils.py:827 +#: src/rougail/output_doc/utils.py:832 msgid "{0}: {1}" msgstr "" diff --git a/src/rougail/output_doc/doc.py b/src/rougail/output_doc/doc.py index 9ce8cf0ad..387d0cd78 100644 --- a/src/rougail/output_doc/doc.py +++ b/src/rougail/output_doc/doc.py @@ -260,15 +260,14 @@ class RougailOutputDoc(Examples, Changelog): potential_leader = self._parse_variable_dynamic( variable, leader, name, path, informations, only_one ) + elif variable.isfollower() and variable.index(): + self._parse_variable_follower_with_index( + variable, leader, name, informations + ) else: - if variable.isfollower() and variable.index(): - self._parse_variable_follower_with_index( - variable, leader, name, informations - ) - else: - potential_leader = self.parse_variable_normal( - variable, leader, name, path, informations - ) + potential_leader = self.parse_variable_normal( + variable, leader, name, path, informations + ) if potential_leader: leader = potential_leader return leader @@ -389,12 +388,27 @@ class RougailOutputDoc(Examples, Changelog): examples = variable.information.get("test", None) if examples is not None: if len(examples) == 1: - informations["examples"] = {"name": _("Example"), "values": examples[0]} + name = _("Example") + values = examples[0] else: - informations["examples"] = { - "name": _("Examples"), - "values": list(examples), - } + name = _("Examples") + values = list(examples) + informations["examples"] = { + "name": name, + "values": values + } + tags = variable.information.get("tags", None) + if tags: + if len(tags) == 1: + name = _("Tag") + values = tags[0] + else: + name = _("Tags") + values = list(tags) + informations["tags"] = { + "name": name, + "values": values, + } return True def _populate( diff --git a/src/rougail/output_doc/locale/fr/LC_MESSAGES/rougail_output_doc.mo b/src/rougail/output_doc/locale/fr/LC_MESSAGES/rougail_output_doc.mo index 9c30ffb85..80e1d6a47 100644 Binary files a/src/rougail/output_doc/locale/fr/LC_MESSAGES/rougail_output_doc.mo and b/src/rougail/output_doc/locale/fr/LC_MESSAGES/rougail_output_doc.mo differ diff --git a/src/rougail/output_doc/utils.py b/src/rougail/output_doc/utils.py index c19e10d9d..926524d6c 100644 --- a/src/rougail/output_doc/utils.py +++ b/src/rougail/output_doc/utils.py @@ -532,6 +532,11 @@ class CommonFormater: ) if examples: second_col.append(examples) + tags = self.convert_section_to_string( + "tags", informations, modified_attributes, multi=True + ) + if tags: + second_col.append(tags) second_col.extend(calculated_properties) self.columns(second_col) return second_col diff --git a/tests/changelog/13add_tags/after/rougail/00-base.yml b/tests/changelog/13add_tags/after/rougail/00-base.yml new file mode 100644 index 000000000..1f15dbc62 --- /dev/null +++ b/tests/changelog/13add_tags/after/rougail/00-base.yml @@ -0,0 +1,15 @@ +%YAML 1.2 +--- +version: 1.1 + +var1: + description: the first variable + tags: + - one_tag + +var2: + description: the second variable + tags: + - one_tag + - second_tag +... diff --git a/tests/changelog/13add_tags/before/rougail/00-base.yml b/tests/changelog/13add_tags/before/rougail/00-base.yml new file mode 100644 index 000000000..899219d28 --- /dev/null +++ b/tests/changelog/13add_tags/before/rougail/00-base.yml @@ -0,0 +1,10 @@ +%YAML 1.2 +--- +version: 1.1 + +var1: + description: the first variable + +var2: + description: the second variable +... diff --git a/tests/changelog/13add_tags/result.adoc b/tests/changelog/13add_tags/result.adoc new file mode 100644 index 000000000..aa9494864 --- /dev/null +++ b/tests/changelog/13add_tags/result.adoc @@ -0,0 +1,22 @@ +== Modified variables + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The first variable. + +**Tag**: #one_tag# +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The second variable. + +**Tags**: + +* '#one_tag#' +* '#second_tag#' +|==== + diff --git a/tests/changelog/13add_tags/result.sh b/tests/changelog/13add_tags/result.sh new file mode 100644 index 000000000..1b43e3304 --- /dev/null +++ b/tests/changelog/13add_tags/result.sh @@ -0,0 +1,16 @@ + + +Modified variables + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Variable  ┃ Description  ┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ var1 │ The first variable. │ +│  string   basic   mandatory  │ Tag: one_tag │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ var2 │ The second variable. │ +│  string   basic   mandatory  │ Tags: │ +│ │ - one_tag │ +│ │ - second_tag │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/changelog/13mod_tags/after/rougail/00-base.yml b/tests/changelog/13mod_tags/after/rougail/00-base.yml new file mode 100644 index 000000000..81f18dcb2 --- /dev/null +++ b/tests/changelog/13mod_tags/after/rougail/00-base.yml @@ -0,0 +1,14 @@ +%YAML 1.2 +--- +version: 1.1 + +var1: + description: the first variable + tags: + - second_tag + +var2: + description: the second variable + tags: + - one_tag +... diff --git a/tests/changelog/13mod_tags/before/rougail/00-base.yml b/tests/changelog/13mod_tags/before/rougail/00-base.yml new file mode 100644 index 000000000..1f15dbc62 --- /dev/null +++ b/tests/changelog/13mod_tags/before/rougail/00-base.yml @@ -0,0 +1,15 @@ +%YAML 1.2 +--- +version: 1.1 + +var1: + description: the first variable + tags: + - one_tag + +var2: + description: the second variable + tags: + - one_tag + - second_tag +... diff --git a/tests/changelog/13mod_tags/result.adoc b/tests/changelog/13mod_tags/result.adoc new file mode 100644 index 000000000..6b1ce9e4c --- /dev/null +++ b/tests/changelog/13mod_tags/result.adoc @@ -0,0 +1,23 @@ +== Modified variables + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The first variable. + +**Tag**: ++++one_tag+++ + +#second_tag# +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The second variable. + +**Tag**: ++++second_tag+++ + +one_tag +|==== + diff --git a/tests/changelog/13mod_tags/result.sh b/tests/changelog/13mod_tags/result.sh new file mode 100644 index 000000000..337bb1031 --- /dev/null +++ b/tests/changelog/13mod_tags/result.sh @@ -0,0 +1,16 @@ + + +Modified variables + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Variable  ┃ Description  ┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ var1 │ The first variable. │ +│  string   basic   mandatory  │ Tag: one_tag │ +│ │ second_tag │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ var2 │ The second variable. │ +│  string   basic   mandatory  │ Tag: second_tag │ +│ │ one_tag │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/changelog/13remove_tags/after/rougail/00-base.yml b/tests/changelog/13remove_tags/after/rougail/00-base.yml new file mode 100644 index 000000000..899219d28 --- /dev/null +++ b/tests/changelog/13remove_tags/after/rougail/00-base.yml @@ -0,0 +1,10 @@ +%YAML 1.2 +--- +version: 1.1 + +var1: + description: the first variable + +var2: + description: the second variable +... diff --git a/tests/changelog/13remove_tags/before/rougail/00-base.yml b/tests/changelog/13remove_tags/before/rougail/00-base.yml new file mode 100644 index 000000000..1f15dbc62 --- /dev/null +++ b/tests/changelog/13remove_tags/before/rougail/00-base.yml @@ -0,0 +1,15 @@ +%YAML 1.2 +--- +version: 1.1 + +var1: + description: the first variable + tags: + - one_tag + +var2: + description: the second variable + tags: + - one_tag + - second_tag +... diff --git a/tests/changelog/13remove_tags/result.adoc b/tests/changelog/13remove_tags/result.adoc new file mode 100644 index 000000000..a6dd2644f --- /dev/null +++ b/tests/changelog/13remove_tags/result.adoc @@ -0,0 +1,22 @@ +== Modified variables + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The first variable. + +**Tag**: +++one_tag+++ +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The second variable. + +**Tags**: + +* +++one_tag+++ +* +++second_tag+++ +|==== + diff --git a/tests/changelog/13remove_tags/result.sh b/tests/changelog/13remove_tags/result.sh new file mode 100644 index 000000000..5d32c965f --- /dev/null +++ b/tests/changelog/13remove_tags/result.sh @@ -0,0 +1,16 @@ + + +Modified variables + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Variable  ┃ Description  ┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ var1 │ The first variable. │ +│  string   basic   mandatory  │ Tag: one_tag │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ var2 │ The second variable. │ +│  string   basic   mandatory  │ Tags: │ +│ │ - one_tag │ +│ │ - second_tag │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test/02_0tags.adoc b/tests/results/test/02_0tags.adoc new file mode 100644 index 000000000..56942d346 --- /dev/null +++ b/tests/results/test/02_0tags.adoc @@ -0,0 +1,20 @@ +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The first variable. + +**Tag**: one_tag +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The second variable. + +**Tags**: + +* one_tag +* second_tag +|==== + diff --git a/tests/results/test/02_0tags.gitlab.md b/tests/results/test/02_0tags.gitlab.md new file mode 100644 index 000000000..80013be9d --- /dev/null +++ b/tests/results/test/02_0tags.gitlab.md @@ -0,0 +1,5 @@ +| Variable | Description | +|---------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------| +| **var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + diff --git a/tests/results/test/02_0tags.html b/tests/results/test/02_0tags.html new file mode 100644 index 000000000..071dab658 --- /dev/null +++ b/tests/results/test/02_0tags.html @@ -0,0 +1,11 @@ + + + + + + + + +
Variable Description
var1
string basic mandatory
The first variable.
Tag: one_tag
var2
string basic mandatory
The second variable.
Tags:
  • one_tag
  • +
  • second_tag
+ diff --git a/tests/results/test/02_0tags.json b/tests/results/test/02_0tags.json new file mode 100644 index 000000000..190bbd0e0 --- /dev/null +++ b/tests/results/test/02_0tags.json @@ -0,0 +1,57 @@ +{ + "var1": { + "type": "variable", + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "basic" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "path": "var1", + "names": [ + "var1" + ], + "description": "The first variable.", + "tags": { + "name": "Tag", + "values": "one_tag" + } + }, + "var2": { + "type": "variable", + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "basic" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "path": "var2", + "names": [ + "var2" + ], + "description": "The second variable.", + "tags": { + "name": "Tags", + "values": [ + "one_tag", + "second_tag" + ] + } + } +} \ No newline at end of file diff --git a/tests/results/test/02_0tags.md b/tests/results/test/02_0tags.md new file mode 100644 index 000000000..6c9ec9898 --- /dev/null +++ b/tests/results/test/02_0tags.md @@ -0,0 +1,5 @@ +| Variable                                                                                                | Description                                                                                             | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + diff --git a/tests/results/test/02_0tags.sh b/tests/results/test/02_0tags.sh new file mode 100644 index 000000000..cf9749432 --- /dev/null +++ b/tests/results/test/02_0tags.sh @@ -0,0 +1,11 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Variable  ┃ Description  ┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ var1 │ The first variable. │ +│  string   basic   mandatory  │ Tag: one_tag │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ var2 │ The second variable. │ +│  string   basic   mandatory  │ Tags: │ +│ │ - one_tag │ +│ │ - second_tag │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test/warnings_02_0tags b/tests/results/test/warnings_02_0tags new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/results/test/warnings_02_0tags @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/results/test_examples/02_0tags.md b/tests/results/test_examples/02_0tags.md new file mode 100644 index 000000000..878b944e1 --- /dev/null +++ b/tests/results/test_examples/02_0tags.md @@ -0,0 +1,14 @@ +# Example with mandatory variables not filled in + +```yaml +--- +var1: example +var2: example +``` +# Example with all variables modifiable + +```yaml +--- +var1: example +var2: example +``` diff --git a/tests/results/test_examples/warnings_02_0tags b/tests/results/test_examples/warnings_02_0tags new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/results/test_examples/warnings_02_0tags @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/results/test_namespace/02_0tags.adoc b/tests/results/test_namespace/02_0tags.adoc new file mode 100644 index 000000000..676809ff2 --- /dev/null +++ b/tests/results/test_namespace/02_0tags.adoc @@ -0,0 +1,26 @@ +== Variables for "Rougail" + +**rougail** + +`basic` + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The first variable. + +**Tag**: one_tag +| + +**rougail.var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The second variable. + +**Tags**: + +* one_tag +* second_tag +|==== + diff --git a/tests/results/test_namespace/02_0tags.changelog.adoc b/tests/results/test_namespace/02_0tags.changelog.adoc new file mode 100644 index 000000000..68b516e40 --- /dev/null +++ b/tests/results/test_namespace/02_0tags.changelog.adoc @@ -0,0 +1,22 @@ +== New variables + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The first variable. + +**Tag**: one_tag +| + +**rougail.var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` | +The second variable. + +**Tags**: + +* one_tag +* second_tag +|==== + diff --git a/tests/results/test_namespace/02_0tags.changelog.gitlab.md b/tests/results/test_namespace/02_0tags.changelog.gitlab.md new file mode 100644 index 000000000..ff24c27dd --- /dev/null +++ b/tests/results/test_namespace/02_0tags.changelog.gitlab.md @@ -0,0 +1,7 @@ +
New variables + +| Variable | Description | +|-----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------| +| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + diff --git a/tests/results/test_namespace/02_0tags.changelog.html b/tests/results/test_namespace/02_0tags.changelog.html new file mode 100644 index 000000000..4e7ed4bc6 --- /dev/null +++ b/tests/results/test_namespace/02_0tags.changelog.html @@ -0,0 +1,13 @@ +

New variables

+ + + + + + + + + +
Variable Description
rougail.var1
string basic mandatory
The first variable.
Tag: one_tag
rougail.var2
string basic mandatory
The second variable.
Tags:
  • one_tag
  • +
  • second_tag
+ diff --git a/tests/results/test_namespace/02_0tags.changelog.md b/tests/results/test_namespace/02_0tags.changelog.md new file mode 100644 index 000000000..870cedf7f --- /dev/null +++ b/tests/results/test_namespace/02_0tags.changelog.md @@ -0,0 +1,7 @@ +# New variables + +| Variable                                                                                                | Description                                                                                             | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + diff --git a/tests/results/test_namespace/02_0tags.changelog.sh b/tests/results/test_namespace/02_0tags.changelog.sh new file mode 100644 index 000000000..c62b71e03 --- /dev/null +++ b/tests/results/test_namespace/02_0tags.changelog.sh @@ -0,0 +1,16 @@ + + +New variables + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Variable  ┃ Description  ┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ rougail.var1 │ The first variable. │ +│  string   basic   mandatory  │ Tag: one_tag │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ rougail.var2 │ The second variable. │ +│  string   basic   mandatory  │ Tags: │ +│ │ - one_tag │ +│ │ - second_tag │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test_namespace/02_0tags.gitlab.md b/tests/results/test_namespace/02_0tags.gitlab.md new file mode 100644 index 000000000..b7ca8623d --- /dev/null +++ b/tests/results/test_namespace/02_0tags.gitlab.md @@ -0,0 +1,14 @@ +
Rougail + +>>> [!note] Informations +**rougail**
`basic` + + +>>> +| Variable | Description | +|-----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------| +| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + +
+ diff --git a/tests/results/test_namespace/02_0tags.html b/tests/results/test_namespace/02_0tags.html new file mode 100644 index 000000000..99f783221 --- /dev/null +++ b/tests/results/test_namespace/02_0tags.html @@ -0,0 +1,17 @@ +

Variables for "Rougail"

+ +rougail + +basic + + + + + + + + + +
Variable Description
rougail.var1
string basic mandatory
The first variable.
Tag: one_tag
rougail.var2
string basic mandatory
The second variable.
Tags:
  • one_tag
  • +
  • second_tag
+ diff --git a/tests/results/test_namespace/02_0tags.json b/tests/results/test_namespace/02_0tags.json new file mode 100644 index 000000000..957b1d90c --- /dev/null +++ b/tests/results/test_namespace/02_0tags.json @@ -0,0 +1,75 @@ +{ + "rougail": { + "type": "namespace", + "informations": { + "path": "rougail", + "names": [ + "rougail" + ], + "description": "Rougail", + "properties": [ + { + "type": "mode", + "name": "basic" + } + ] + }, + "children": { + "var1": { + "type": "variable", + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "basic" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "path": "rougail.var1", + "names": [ + "var1" + ], + "description": "The first variable.", + "tags": { + "name": "Tag", + "values": "one_tag" + } + }, + "var2": { + "type": "variable", + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "basic" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "path": "rougail.var2", + "names": [ + "var2" + ], + "description": "The second variable.", + "tags": { + "name": "Tags", + "values": [ + "one_tag", + "second_tag" + ] + } + } + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/02_0tags.md b/tests/results/test_namespace/02_0tags.md new file mode 100644 index 000000000..8cb13e941 --- /dev/null +++ b/tests/results/test_namespace/02_0tags.md @@ -0,0 +1,11 @@ +# Variables for "Rougail" + +**rougail** + +`basic` + +| Variable                                                                                                | Description                                                                                             | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + diff --git a/tests/results/test_namespace/02_0tags.sh b/tests/results/test_namespace/02_0tags.sh new file mode 100644 index 000000000..7eff2d93b --- /dev/null +++ b/tests/results/test_namespace/02_0tags.sh @@ -0,0 +1,26 @@ + + +Variables for "Rougail" + + + +rougail + + + + basic  + + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Variable  ┃ Description  ┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ rougail.var1 │ The first variable. │ +│  string   basic   mandatory  │ Tag: one_tag │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ rougail.var2 │ The second variable. │ +│  string   basic   mandatory  │ Tags: │ +│ │ - one_tag │ +│ │ - second_tag │ +└───────────────────────────────────────┴──────────────────────────────────────┘ + diff --git a/tests/results/test_namespace/warnings_02_0tags b/tests/results/test_namespace/warnings_02_0tags new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/results/test_namespace/warnings_02_0tags @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/results/test_namespace_examples/02_0tags.md b/tests/results/test_namespace_examples/02_0tags.md new file mode 100644 index 000000000..c32cf7293 --- /dev/null +++ b/tests/results/test_namespace_examples/02_0tags.md @@ -0,0 +1,16 @@ +# Example with mandatory variables not filled in + +```yaml +--- +rougail: + var1: example + var2: example +``` +# Example with all variables modifiable + +```yaml +--- +rougail: + var1: example + var2: example +``` diff --git a/tests/results/test_namespace_examples/warnings_02_0tags b/tests/results/test_namespace_examples/warnings_02_0tags new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/results/test_namespace_examples/warnings_02_0tags @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/results/test_namespace_without_family/02_0tags.md b/tests/results/test_namespace_without_family/02_0tags.md new file mode 100644 index 000000000..bd01820ee --- /dev/null +++ b/tests/results/test_namespace_without_family/02_0tags.md @@ -0,0 +1,5 @@ +| Variable                                                                                                | Description                                                                                             | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.
**Tag**: one_tag | +| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The second variable.
**Tags**:
- one_tag
- second_tag | + diff --git a/tests/results/test_namespace_without_family/warnings_02_0tags b/tests/results/test_namespace_without_family/warnings_02_0tags new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/tests/results/test_namespace_without_family/warnings_02_0tags @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/test_load.py b/tests/test_load.py index b1641f266..8715776af 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -20,7 +20,7 @@ excludes = [ ] test_ok = get_structures_list(excludes) -#test_ok = [HERE.parent.parent / "rougail-tests" / "structures" / "60_0family_dynamic_source_hidden"] +#test_ok = [HERE.parent.parent / "rougail-tests" / "structures" / "02_0tags"] os.environ['COLUMNS'] = '80'