Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ef8636679 | |||
| 4466c7b936 | |||
| e3e78de40c | |||
| e0f8e55d40 | |||
| a7752b5d0d |
7 changed files with 73 additions and 243 deletions
161
CHANGELOG.md
161
CHANGELOG.md
|
|
@ -1,159 +1,46 @@
|
||||||
## 0.2.0a21 (2026-06-15)
|
## 1.0.0 (2026-06-21)
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a20 (2026-06-11)
|
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
||||||
- leadership => sequence
|
- leadership => sequence
|
||||||
|
|
||||||
## 0.2.0a19 (2026-05-04)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- remove mandatory verification
|
- remove mandatory verification
|
||||||
|
|
||||||
## 0.2.0a18 (2026-01-21)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- warnings and errors support
|
|
||||||
|
|
||||||
## 0.2.0a17 (2026-01-14)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- remove json.get which is conflict with cli.root feature
|
|
||||||
|
|
||||||
## 0.2.0a16 (2025-12-30)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add doc
|
- add doc
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a15 (2025-12-22)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- add namespace parameter for ansible
|
|
||||||
- better namespace support
|
|
||||||
|
|
||||||
## 0.2.0a14 (2025-11-21)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- ExtentionError => ExtensionError
|
|
||||||
|
|
||||||
## 0.2.0a13 (2025-11-06)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add some tests
|
- add some tests
|
||||||
|
|
||||||
## 0.2.0a12 (2025-11-03)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- allow extra kwargs
|
- allow extra kwargs
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a11 (2025-10-10)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update test
|
|
||||||
- tests
|
|
||||||
- tests for formatter
|
|
||||||
|
|
||||||
## 0.2.0a10 (2025-09-29)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- remove json.read_write option
|
- remove json.read_write option
|
||||||
- default value for a calculated variable with an unknown optional variable
|
- default value for a calculated variable with an unknown optional variable
|
||||||
- update tests for integer type
|
- update tests for integer type
|
||||||
|
|
||||||
## 0.2.0a9 (2025-09-22)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- dependency
|
|
||||||
|
|
||||||
## 0.2.0a8 (2025-05-12)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- black
|
|
||||||
|
|
||||||
## 0.2.0a7 (2025-04-30)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- remove negative_description support
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a6 (2025-04-09)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- version
|
|
||||||
|
|
||||||
## 0.2.0a5 (2025-04-01)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
- update translation
|
|
||||||
|
|
||||||
## 0.2.0a4 (2025-03-30)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- update tests
|
|
||||||
|
|
||||||
## 0.2.0a3 (2025-03-19)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add json.get to have sub variables
|
- add json.get to have sub variables
|
||||||
|
|
||||||
## 0.2.0a2 (2025-02-17)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- translation
|
|
||||||
|
|
||||||
## 0.2.0a1 (2025-02-10)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- output return status too
|
- output return status too
|
||||||
|
|
||||||
## 0.2.0a0 (2024-12-11)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add error and warnings informations in json
|
- add error and warnings informations in json
|
||||||
- add tests
|
- add tests
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
||||||
|
- rougail dependencies
|
||||||
|
- update translation
|
||||||
|
- black
|
||||||
|
- update tests
|
||||||
|
- warnings and errors support
|
||||||
|
- remove json.get which is conflict with cli.root feature
|
||||||
|
- update tests
|
||||||
|
- add namespace parameter for ansible
|
||||||
|
- better namespace support
|
||||||
|
- ExtentionError => ExtensionError
|
||||||
|
- update tests
|
||||||
|
- update test
|
||||||
|
- tests
|
||||||
|
- tests for formatter
|
||||||
|
- dependency
|
||||||
|
- black
|
||||||
|
- remove negative_description support
|
||||||
|
- update tests
|
||||||
|
- version
|
||||||
|
- update tests
|
||||||
|
- update translation
|
||||||
|
- update tests
|
||||||
|
- translation
|
||||||
- update tests
|
- update tests
|
||||||
|
|
||||||
## 0.1.1a0 (2024-11-28)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- separation between run and print function
|
- separation between run and print function
|
||||||
|
|
||||||
## 0.1.0 (2024-11-28)
|
## 0.1.0 (2024-11-28)
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2025-12-24 09:33+0100\n"
|
"POT-Creation-Date: 2026-06-21 18:26+0200\n"
|
||||||
"PO-Revision-Date: 2025-12-24 09:33+0100\n"
|
"PO-Revision-Date: 2026-06-21 18:27+0200\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
|
@ -14,70 +14,49 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
"X-Generator: Poedit 3.8\n"
|
"X-Generator: Poedit 3.9\n"
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:50
|
#: src/rougail/output_json/__init__.py:51
|
||||||
msgid "the \"step.output\" is not set to \"{0}\""
|
msgid "the \"step.output\" is not set to \"{0}\""
|
||||||
msgstr "\"step.output\" n'est pas mis à \"{0}\""
|
msgstr "\"step.output\" n'est pas mis à \"{0}\""
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:111
|
#: src/rougail/output_json/__init__.py:108
|
||||||
msgid "Error in config: {0}"
|
#: src/rougail/output_json/__init__.py:120
|
||||||
msgstr "Erreur dans la configuration : {0}"
|
msgid "{0}: {1}"
|
||||||
|
msgstr "{0} : {1}"
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:121
|
#~ msgid "Error in config: {0}"
|
||||||
msgid "The following variables are mandatory but have no value:"
|
#~ msgstr "Erreur dans la configuration : {0}"
|
||||||
msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
|
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:131
|
#~ msgid "The following variables are mandatory but have no value:"
|
||||||
msgid "The following variables are inaccessible but are empty and mandatory :"
|
#~ msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
|
||||||
msgstr ""
|
|
||||||
"Les variables suivantes sont inaccessibles mais sont vides et obligatoires :"
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:29
|
#~ msgid "The following variables are inaccessible but are empty and mandatory :"
|
||||||
msgid "Export configuration to JSON format"
|
#~ msgstr "Les variables suivantes sont inaccessibles mais sont vides et obligatoires :"
|
||||||
msgstr "Export de la configuration au format JSON"
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:31
|
#~ msgid "Export configuration to JSON format"
|
||||||
msgid ""
|
#~ msgstr "Export de la configuration au format JSON"
|
||||||
"Exporting the configuration in JSON format makes it easier to process the "
|
|
||||||
"configuration in an external tool, for example."
|
|
||||||
msgstr ""
|
|
||||||
"Exporter la configuration au format JSON permet de traiter plus facilement "
|
|
||||||
"la configuration dans un outil exterieur par exemple."
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:36
|
#~ msgid "Exporting the configuration in JSON format makes it easier to process the configuration in an external tool, for example."
|
||||||
msgid "if json is not set in \"step.output\""
|
#~ msgstr "Exporter la configuration au format JSON permet de traiter plus facilement la configuration dans un outil exterieur par exemple."
|
||||||
msgstr "si json n'est pas présent dans \"step.output\""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:39
|
#~ msgid "if json is not set in \"step.output\""
|
||||||
msgid "test mandatories variables before display in JSON"
|
#~ msgstr "si json n'est pas présent dans \"step.output\""
|
||||||
msgstr "tester les variables obligatoires avant de l'afficher en JSON"
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:41
|
#~ msgid "test mandatories variables before display in JSON"
|
||||||
msgid ""
|
#~ msgstr "tester les variables obligatoires avant de l'afficher en JSON"
|
||||||
"The configuration must be valid before exporting the data to JSON format. "
|
|
||||||
"It's better to validate the values at the beginning of the process."
|
|
||||||
msgstr ""
|
|
||||||
"La configuration doit être valide avant d'exporter les données au format "
|
|
||||||
"JSON. C'est mieux de valider les valeurs en début du processus."
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:46
|
#~ msgid "The configuration must be valid before exporting the data to JSON format. It's better to validate the values at the beginning of the process."
|
||||||
msgid "true if \"cli.read_write\" is false"
|
#~ msgstr "La configuration doit être valide avant d'exporter les données au format JSON. C'est mieux de valider les valeurs en début du processus."
|
||||||
msgstr "true si \"cli.read_write\" est false"
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:49
|
#~ msgid "true if \"cli.read_write\" is false"
|
||||||
msgid "get value for a variable or a family"
|
#~ msgstr "true si \"cli.read_write\" est false"
|
||||||
msgstr "récupère la valeur pour une variable ou une famille"
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:51
|
#~ msgid "get value for a variable or a family"
|
||||||
msgid ""
|
#~ msgstr "récupère la valeur pour une variable ou une famille"
|
||||||
"By default, the entire configuration is exported as JSON. It is possible to "
|
|
||||||
"retrieve variables values from a defined family or directly the value of a "
|
#~ msgid "By default, the entire configuration is exported as JSON. It is possible to retrieve variables values from a defined family or directly the value of a variable."
|
||||||
"variable."
|
#~ msgstr "Par défaut toute la configuration est exporté en JSON. Il est possible de récupérer les valeurs de variables dans une famille défini ou directement la valeur d'une variable."
|
||||||
msgstr ""
|
|
||||||
"Par défaut toute la configuration est exporté en JSON. Il est possible de "
|
|
||||||
"récupérer les valeurs de variables dans une famille défini ou directement "
|
|
||||||
"la valeur d'une variable."
|
|
||||||
|
|
||||||
#~ msgid "configuration rougail-json"
|
#~ msgid "configuration rougail-json"
|
||||||
#~ msgstr "configuration de rougail-json"
|
#~ msgstr "configuration de rougail-json"
|
||||||
|
|
@ -89,8 +68,7 @@ msgstr ""
|
||||||
#~ msgstr "affiche les variables valables en mode lecture seul"
|
#~ msgstr "affiche les variables valables en mode lecture seul"
|
||||||
|
|
||||||
#~ msgid "do not test mandatories variables before display in json"
|
#~ msgid "do not test mandatories variables before display in json"
|
||||||
#~ msgstr ""
|
#~ msgstr "ne pas tester les variables obligatoires avant de l'afficher en json"
|
||||||
#~ "ne pas tester les variables obligatoires avant de l'afficher en json"
|
|
||||||
|
|
||||||
#~ msgid "Undocumented variable"
|
#~ msgid "Undocumented variable"
|
||||||
#~ msgstr "Variable non documentée"
|
#~ msgstr "Variable non documentée"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2025-12-24 09:33+0100\n"
|
"POT-Creation-Date: 2026-06-21 18:28+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"
|
||||||
|
|
@ -15,51 +15,12 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:50
|
#: src/rougail/output_json/__init__.py:51
|
||||||
msgid "the \"step.output\" is not set to \"{0}\""
|
msgid "the \"step.output\" is not set to \"{0}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:111
|
#: src/rougail/output_json/__init__.py:108
|
||||||
msgid "Error in config: {0}"
|
#: src/rougail/output_json/__init__.py:120
|
||||||
msgstr ""
|
msgid "{0}: {1}"
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:121
|
|
||||||
msgid "The following variables are mandatory but have no value:"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/__init__.py:131
|
|
||||||
msgid "The following variables are inaccessible but are empty and mandatory :"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:29
|
|
||||||
msgid "Export configuration to JSON format"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:31
|
|
||||||
msgid "Exporting the configuration in JSON format makes it easier to process the configuration in an external tool, for example."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:36
|
|
||||||
msgid "if json is not set in \"step.output\""
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:39
|
|
||||||
msgid "test mandatories variables before display in JSON"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:41
|
|
||||||
msgid "The configuration must be valid before exporting the data to JSON format. It's better to validate the values at the beginning of the process."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:46
|
|
||||||
msgid "true if \"cli.read_write\" is false"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:49
|
|
||||||
msgid "get value for a variable or a family"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_json/config.py:51
|
|
||||||
msgid "By default, the entire configuration is exported as JSON. It is possible to retrieve variables values from a defined family or directly the value of a variable."
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_json"
|
name = "rougail.output_json"
|
||||||
version = "0.2.0a21"
|
version = "1.0.0"
|
||||||
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 json"
|
description = "Rougail output json"
|
||||||
|
|
@ -23,7 +23,7 @@ classifiers = [
|
||||||
]
|
]
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rougail-base >= 1.1,<2",
|
"rougail-base >= 1.2.0,<2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Silique (https://www.silique.fr)
|
Silique (https://www.silique.fr)
|
||||||
Copyright (C) 2022-2026
|
Copyright (C) 2022-2026
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it
|
This program is free software: you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Lesser General Public License as published by the
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
Free Software Foundation, either version 3 of the License, or (at your
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
|
@ -105,7 +105,7 @@ class RougailOutputJson:
|
||||||
for w in self.warnings:
|
for w in self.warnings:
|
||||||
if isinstance(w, dict):
|
if isinstance(w, dict):
|
||||||
msg, opt = next(iter(w.items()))
|
msg, opt = next(iter(w.items()))
|
||||||
warnings.append(_('{0}: {1}').format(opt.path, msg))
|
warnings.append(_("{0}: {1}").format(opt.path, msg))
|
||||||
else:
|
else:
|
||||||
warnings.append(w)
|
warnings.append(w)
|
||||||
self.dico["_warnings"] = warnings
|
self.dico["_warnings"] = warnings
|
||||||
|
|
@ -117,11 +117,11 @@ class RougailOutputJson:
|
||||||
for e in self.errors:
|
for e in self.errors:
|
||||||
if isinstance(e, dict):
|
if isinstance(e, dict):
|
||||||
msg, opt = next(iter(e.items()))
|
msg, opt = next(iter(e.items()))
|
||||||
errors.append(_('{0}: {1}').format(opt.path, msg))
|
errors.append(_("{0}: {1}").format(opt.path, msg))
|
||||||
else:
|
else:
|
||||||
errors.append(e)
|
errors.append(e)
|
||||||
self.dico["_errors"] = errors
|
self.dico["_errors"] = errors
|
||||||
#self.manage_warnings()
|
# self.manage_warnings()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def parse_family(
|
def parse_family(
|
||||||
|
|
@ -139,7 +139,11 @@ class RougailOutputJson:
|
||||||
parent,
|
parent,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if namespace is None and self.support_namespace and option.group_type() is groups.namespace:
|
if (
|
||||||
|
namespace is None
|
||||||
|
and self.support_namespace
|
||||||
|
and option.group_type() is groups.namespace
|
||||||
|
):
|
||||||
subnamespace = option.name()
|
subnamespace = option.name()
|
||||||
else:
|
else:
|
||||||
subnamespace = namespace
|
subnamespace = namespace
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.0a21"
|
__version__ = "1.0.0"
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in a new issue