From 9bbb60c460911db021b53edd5ed6b388d039e67d Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 26 Oct 2025 15:23:40 +0100 Subject: [PATCH] feat: tags documentation --- locale/fr/LC_MESSAGES/rougail_output_doc.po | 76 ++++++++++-------- locale/rougail_output_doc.pot | 74 +++++++++-------- src/rougail/output_doc/doc.py | 40 ++++++--- .../fr/LC_MESSAGES/rougail_output_doc.mo | Bin 7501 -> 7565 bytes src/rougail/output_doc/utils.py | 5 ++ .../13add_tags/after/rougail/00-base.yml | 15 ++++ .../13add_tags/before/rougail/00-base.yml | 10 +++ tests/changelog/13add_tags/result.adoc | 22 +++++ tests/changelog/13add_tags/result.sh | 16 ++++ .../13mod_tags/after/rougail/00-base.yml | 14 ++++ .../13mod_tags/before/rougail/00-base.yml | 15 ++++ tests/changelog/13mod_tags/result.adoc | 23 ++++++ tests/changelog/13mod_tags/result.sh | 16 ++++ .../13remove_tags/after/rougail/00-base.yml | 10 +++ .../13remove_tags/before/rougail/00-base.yml | 15 ++++ tests/changelog/13remove_tags/result.adoc | 22 +++++ tests/changelog/13remove_tags/result.sh | 16 ++++ tests/results/test/02_0tags.adoc | 20 +++++ tests/results/test/02_0tags.gitlab.md | 5 ++ tests/results/test/02_0tags.html | 11 +++ tests/results/test/02_0tags.json | 57 +++++++++++++ tests/results/test/02_0tags.md | 5 ++ tests/results/test/02_0tags.sh | 11 +++ tests/results/test/warnings_02_0tags | 1 + tests/results/test_examples/02_0tags.md | 14 ++++ tests/results/test_examples/warnings_02_0tags | 1 + tests/results/test_namespace/02_0tags.adoc | 26 ++++++ .../test_namespace/02_0tags.changelog.adoc | 22 +++++ .../02_0tags.changelog.gitlab.md | 7 ++ .../test_namespace/02_0tags.changelog.html | 13 +++ .../test_namespace/02_0tags.changelog.md | 7 ++ .../test_namespace/02_0tags.changelog.sh | 16 ++++ .../results/test_namespace/02_0tags.gitlab.md | 14 ++++ tests/results/test_namespace/02_0tags.html | 17 ++++ tests/results/test_namespace/02_0tags.json | 75 +++++++++++++++++ tests/results/test_namespace/02_0tags.md | 11 +++ tests/results/test_namespace/02_0tags.sh | 26 ++++++ .../results/test_namespace/warnings_02_0tags | 1 + .../test_namespace_examples/02_0tags.md | 16 ++++ .../test_namespace_examples/warnings_02_0tags | 1 + .../test_namespace_without_family/02_0tags.md | 5 ++ .../warnings_02_0tags | 1 + tests/test_load.py | 2 +- 43 files changed, 693 insertions(+), 81 deletions(-) create mode 100644 tests/changelog/13add_tags/after/rougail/00-base.yml create mode 100644 tests/changelog/13add_tags/before/rougail/00-base.yml create mode 100644 tests/changelog/13add_tags/result.adoc create mode 100644 tests/changelog/13add_tags/result.sh create mode 100644 tests/changelog/13mod_tags/after/rougail/00-base.yml create mode 100644 tests/changelog/13mod_tags/before/rougail/00-base.yml create mode 100644 tests/changelog/13mod_tags/result.adoc create mode 100644 tests/changelog/13mod_tags/result.sh create mode 100644 tests/changelog/13remove_tags/after/rougail/00-base.yml create mode 100644 tests/changelog/13remove_tags/before/rougail/00-base.yml create mode 100644 tests/changelog/13remove_tags/result.adoc create mode 100644 tests/changelog/13remove_tags/result.sh create mode 100644 tests/results/test/02_0tags.adoc create mode 100644 tests/results/test/02_0tags.gitlab.md create mode 100644 tests/results/test/02_0tags.html create mode 100644 tests/results/test/02_0tags.json create mode 100644 tests/results/test/02_0tags.md create mode 100644 tests/results/test/02_0tags.sh create mode 100644 tests/results/test/warnings_02_0tags create mode 100644 tests/results/test_examples/02_0tags.md create mode 100644 tests/results/test_examples/warnings_02_0tags create mode 100644 tests/results/test_namespace/02_0tags.adoc create mode 100644 tests/results/test_namespace/02_0tags.changelog.adoc create mode 100644 tests/results/test_namespace/02_0tags.changelog.gitlab.md create mode 100644 tests/results/test_namespace/02_0tags.changelog.html create mode 100644 tests/results/test_namespace/02_0tags.changelog.md create mode 100644 tests/results/test_namespace/02_0tags.changelog.sh create mode 100644 tests/results/test_namespace/02_0tags.gitlab.md create mode 100644 tests/results/test_namespace/02_0tags.html create mode 100644 tests/results/test_namespace/02_0tags.json create mode 100644 tests/results/test_namespace/02_0tags.md create mode 100644 tests/results/test_namespace/02_0tags.sh create mode 100644 tests/results/test_namespace/warnings_02_0tags create mode 100644 tests/results/test_namespace_examples/02_0tags.md create mode 100644 tests/results/test_namespace_examples/warnings_02_0tags create mode 100644 tests/results/test_namespace_without_family/02_0tags.md create mode 100644 tests/results/test_namespace_without_family/warnings_02_0tags 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 9c30ffb85b76bbe96155317f5dea8cb48130293a..80e1d6a47074b6fa232e7d61c432a99e365244f2 100644 GIT binary patch delta 1872 zcmYk+Sx8iI6vy$CjZRu-PBm6qTA7*axXh%Ew%ERBX8982gGgn8X;Dzz7K(Z>hziQG zq7dw%AcP(Sp`9R#b}FJCBBO^ugC2Uw`u@f%_2-`Z`QJM;_rIKT=Sf*>*!k%5oH1Gr zkwV;$GHb%dXil_%*Q^{1Fcx=UD(*oJJIiSzUUsj$aSYdYF%e(lNc@7u*pKO$F(UGN z$5zmp!HsIn!@bC1ot*UGo0yD`Q4jp;-v5Pq@K|Ow3R6*^=b#VgU>K|1&s#B`>o&~B zPRumN>=m7H-1v>d(HCdtK|f|AqEj2XDwwLO9T*OuJphGzI3(=d(-(!{bc4>zK=>?l^?9n=c`pmu0F+wvQ8a6V>H z07_LOMg~OHb31CBt4JN%Z6Euu+&$ukX7~Zwb^C#(IDiFM!k6@et(b#5F@%>;6L^E# znNO&lh-LXo)hyJ2VI&Jy>spUI+IBj0IP3_g1=xoA;YZ|I)`tP~Fgr~oh)PidQcrdW zHQ`n)!gHvJJ#jzxP$>F50X5NNt4r@P+f;me_R_-6W@nQQ74A+J*pV}lPO57MHS^?9ESRju~RkCNlq1=7=qU(^4@9r zYT9?U-3kfqty&tPJn6Min@ubucynwup{CK5^#5BK7b+|jjb@{wQlpxkNa^c>|9+cG zX!+%Y+O$DzC2E<~#Cl>Lp^95fXutKIDKEtYD~#k+6|F5&>8okmlndo^Eul6wGF>{# zf%Z>HUqdVg-WBidjq=tt*!sGL=C1zON^e{!tsq!d7|0G3bX6p#c>MQ{w`^(JRo~K5Z~wZ@ KUA5zXdjA58!lbAG delta 1797 zcmYk+Nk~;u9LMqF_{uc(nL}v~*Hx9H@F$X}xxbo;Q?z z)D-I7U}HM5F^n4}#$}8TV{s`qV;UYnE_0IGN<8EAM=^%}6^z9IF2ivw#z|a@;Y;l2 zE#slFj)5Y~#a84p{oM58K}^P*s25H+<1?rif5k}r>--+cEZy`|u?h=NzaPga>_HFq zW0tX4F^v@rys`(3`GT5Aa>T-l8<5MiaN`@M4dbvK_1tNU$3aZO>zIiTF$?Fg5~G-H z0@kAz)`od}-<(ndZ=gOfgQ@rqwc;SAuLt8$6U#;qwqhdo;YPfK890GT7 zZ*uHHMdTuCf@9IdKb^)~1~ju^c1|wlqC$2AH{md91=FYq{l<9=Aw0DhM8e6MsYCmN zsQuf8`cMzD@5}{M>Mo;F7H|`PqHLZpP=QlefYJPw9;n3}^kXS@qb6`074rM2NW4L% zN@36k-AMFJo}&+WwecgDIn1pNJ1rV|@E-CGGlBUyi<(Fz(^QJ8u?SmH6B$7El^H`V z;00=8v&f@n4wbTBs67(T2GaYzxB+W153LRwTWE}+R`L?{!9Q4vi99WvQ6K0-ZL)L7 zW$tj(bB|Gb;{z&^8Eh#1-67Nmdr>LAib~}q@?Oh)r{QHFhclrM9mK6Ti0L?uT;``^ zEVIj^?{REFO}Lj^2@a!9&vR77KA}RNK{%AMV${TsVxIo(b<@xauGs^|JaYO!P^Tb) zglgtKR7%>h3P(|!ZyK{PX|=NnhdRPCtzC?SQ#lg$*-|W2YN!cRC0X%QVG?$7w9{0y zj2%=?g=wU!R8W=Z|4TU?Z60j|g+xb3h1pp4{#J+o=k^)WnkzLxNw@FDG@xR#hq{+q zP1O<=f1M*8W^Il_Dyy@@p(QJU+TM$W5ZfVYb_UYy0MSw4watpDP1NmFB}Iu|EM-o^ z=ja_84^Q)Nrl%94y|a_*r!JP=PJ;y5r&L{Skq|W~%FZ_G8ftyO>v|s?NQtO%MHHqN Wlvb8hc=8Ja$6`}L10(U@T>k(uRF)V3 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'