feat: rename file to yaml

This commit is contained in:
egarette@silique.fr 2024-12-11 21:29:44 +01:00
parent 412831278d
commit 23eadd9269
691 changed files with 6222 additions and 4578 deletions

View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2024-11-01 12:12+0100\n" "POT-Creation-Date: 2024-12-11 21:26+0100\n"
"PO-Revision-Date: 2024-11-01 12:13+0100\n" "PO-Revision-Date: 2024-12-11 21:27+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: fr\n" "Language: fr\n"
@ -16,20 +16,20 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 3.5\n" "X-Generator: Poedit 3.5\n"
#: src/rougail/user_data_file/__init__.py:40 #: src/rougail/user_data_yaml/__init__.py:42
msgid "file is not set in step.user_data" msgid "yaml is not set in step.user_data"
msgstr "\"file\" n'est pas défini dans step.user_data" msgstr "\"yaml\" n'est pas défini dans step.user_data"
#: src/rougail/user_data_file/__init__.py:58 #: src/rougail/user_data_yaml/__init__.py:61
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\"" msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
msgstr "" msgstr ""
"ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais " "ne peut charger \"{0}\", la valeur racine n'est pas une dictionnaire mais "
"\"{1}\"" "\"{1}\""
#: src/rougail/user_data_file/__init__.py:66 #: src/rougail/user_data_yaml/__init__.py:74
msgid "file ({0})" msgid "yaml ({0})"
msgstr "fichier ({0})" msgstr "fichier yaml ({0})"
#: src/rougail/user_data_file/__init__.py:88 #: src/rougail/user_data_yaml/__init__.py:103
msgid "\"{0}\" in {1} has an unknown value" msgid "\"{0}\" in {1} has an unknown value"
msgstr "\"{0}\" dans {1} a une valeur inconnue" msgstr "\"{0}\" dans {1} a une valeur inconnue"

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-11-01 12:13+0100\n" "POT-Creation-Date: 2024-12-11 21:27+0100\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,19 +15,19 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
#: src/rougail/user_data_file/__init__.py:40 #: src/rougail/user_data_yaml/__init__.py:42
msgid "file is not set in step.user_data" msgid "yaml is not set in step.user_data"
msgstr "" msgstr ""
#: src/rougail/user_data_file/__init__.py:58 #: src/rougail/user_data_yaml/__init__.py:61
msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\"" msgid "cannot load \"{0}\", the root value is not a dict but \"{1}\""
msgstr "" msgstr ""
#: src/rougail/user_data_file/__init__.py:66 #: src/rougail/user_data_yaml/__init__.py:74
msgid "file ({0})" msgid "yaml ({0})"
msgstr "" msgstr ""
#: src/rougail/user_data_file/__init__.py:88 #: src/rougail/user_data_yaml/__init__.py:103
msgid "\"{0}\" in {1} has an unknown value" msgid "\"{0}\" in {1} has an unknown value"
msgstr "" msgstr ""

View file

@ -3,11 +3,11 @@ build-backend = "flit_core.buildapi"
requires = ["flit_core >=3.8.0,<4"] requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail.user_data_file" name = "rougail.user_data_yaml"
version = "0.1.1a0" version = "0.1.1a0"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}] authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md" readme = "README.md"
description = "Rougail user_data file" description = "Rougail user_data yaml"
requires-python = ">=3.8" requires-python = ">=3.8"
license = {file = "LICENSE"} license = {file = "LICENSE"}
classifiers = [ classifiers = [
@ -29,12 +29,12 @@ dependencies = [
] ]
[project.urls] [project.urls]
Home = "https://forge.cloud.silique.fr/stove/rougail-user-data-file" Home = "https://forge.cloud.silique.fr/stove/rougail-user-data-yaml"
[tool.commitizen] [tool.commitizen]
name = "cz_conventional_commits" name = "cz_conventional_commits"
tag_format = "$version" tag_format = "$version"
version_scheme = "pep440" version_scheme = "pep440"
version_provider = "pep621" version_provider = "pep621"
#update_changelog_on_bump = true update_changelog_on_bump = true
changelog_merge_prerelease = true changelog_merge_prerelease = true

View file

@ -15,15 +15,16 @@ details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
""" """
from ruamel.yaml import YAML
from rougail import RougailConfig from rougail import RougailConfig
from ruamel.yaml import YAML from rougail.error import ExtentionError
from tiramisu.error import ValueOptionError, PropertiesOptionError, LeadershipError from tiramisu.error import ValueOptionError, PropertiesOptionError, LeadershipError
from .i18n import _ from .i18n import _
class RougailUserDataFile: class RougailUserDataYaml:
def __init__( def __init__(
self, self,
config, config,
@ -33,14 +34,14 @@ class RougailUserDataFile:
if rougailconfig is None: if rougailconfig is None:
rougailconfig = RougailConfig rougailconfig = RougailConfig
user_data = rougailconfig["step.user_data"] user_data = rougailconfig["step.user_data"]
if "file" not in user_data: if "yaml" not in user_data:
user_data.append("file") user_data.append("yaml")
rougailconfig["step.user_data"] = user_data rougailconfig["step.user_data"] = user_data
user_data = rougailconfig["step.user_data"] user_data = rougailconfig["step.user_data"]
if "file" not in user_data: if "yaml" not in user_data:
raise Exception(_("file is not set in step.user_data")) raise ExtentionError(_("yaml is not set in step.user_data"))
self.rougailconfig = rougailconfig self.rougailconfig = rougailconfig
self.filenames = self.rougailconfig["file.filename"] self.filenames = self.rougailconfig["yaml.filename"]
self.config = config self.config = config
self.errors = [] self.errors = []
self.warnings = [] self.warnings = []
@ -70,7 +71,7 @@ class RougailUserDataFile:
) )
user_datas.append( user_datas.append(
{ {
"source": _("file ({0})").format(filename), "source": _("yaml ({0})").format(filename),
"errors": self.errors, "errors": self.errors,
"warnings": self.warnings, "warnings": self.warnings,
"values": values, "values": values,
@ -116,7 +117,7 @@ class RougailUserDataFile:
values[path] = value values[path] = value
RougailUserData = RougailUserDataFile RougailUserData = RougailUserDataYaml
__all__ = ("RougailUserDataFile",) __all__ = ("RougailUserDataYaml",)

View file

@ -1,5 +1,5 @@
""" """
Config file for Rougail-user-data Config yaml for Rougail-user-data
Silique (https://www.silique.fr) Silique (https://www.silique.fr)
Copyright (C) 2024 Copyright (C) 2024
@ -24,12 +24,12 @@ def get_rougail_config(
backward_compatibility=True, backward_compatibility=True,
) -> dict: ) -> dict:
options = """ options = """
file: yaml:
description: Configuration rougail-user-data-file description: Configuration rougail-user-data-yaml
disabled: disabled:
type: jinja type: jinja
jinja: | jinja: |
{% if 'file' not in step.user_data %} {% if 'yaml' not in step.user_data %}
disabled disabled
{% endif %} {% endif %}
filename: filename:
@ -44,7 +44,7 @@ file:
- file - file
""" """
return { return {
"name": "file", "name": "yaml",
"process": "user data", "process": "user data",
"options": options, "options": options,
"level": 50, "level": 50,

View file

@ -20,7 +20,7 @@ from gettext import translation
from pathlib import Path from pathlib import Path
t = translation( t = translation(
"rougail_user_data_file", str(Path(__file__).parent / "locale"), fallback=True "rougail_user_data_yaml", str(Path(__file__).parent / "locale"), fallback=True
) )
_ = t.gettext _ = t.gettext

View file

@ -1 +0,0 @@
{}

View file

@ -1 +1 @@
{} {}

View file

@ -1 +1 @@
{} {}

View file

@ -1,2 +1,5 @@
rougail: {
version: string1 "rougail": {
"version": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
version: string1 "rougail": {
"version": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
version: string1 "rougail": {
"version": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
empty: string1 "rougail": {
"empty": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
empty: string1 "rougail": {
"empty": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
empty: string1 "rougail": {
"empty": "string1"
}
}

View file

@ -1,6 +1,10 @@
rougail: {
var1: string1 "rougail": {
var2: "var1": "string1",
- string1 "var2": [
- string2 "string1",
- string3 "string2",
"string3"
]
}
}

View file

@ -1,6 +1,10 @@
rougail: {
var1: string1 "rougail": {
var2: "var1": "string1",
- string1 "var2": [
- string2 "string1",
- string3 "string2",
"string3"
]
}
}

View file

@ -1,9 +1,14 @@
rougail: {
var1: "rougail": {
- string1 "var1": [
- string2 "string1",
- string3 "string2",
var2: "string3"
- string1 ],
- string2 "var2": [
- string3 "string1",
"string2",
"string3"
]
}
}

View file

@ -1,9 +1,14 @@
rougail: {
var1: "rougail": {
- string1 "var1": [
- string2 "string1",
- string3 "string2",
var2: "string3"
- string1 ],
- string2 "var2": [
- string3 "string1",
"string2",
"string3"
]
}
}

View file

@ -1,7 +1,12 @@
rougail: {
var1: "rougail": {
- domain1.lan "var1": [
- domain2.lan "domain1.lan",
var2: "domain2.lan"
- domain1.lan ],
- domain2.lan "var2": [
"domain1.lan",
"domain2.lan"
]
}
}

View file

@ -1,7 +1,12 @@
rougail: {
var1: "rougail": {
- domain1.lan "var1": [
- domain2.lan "domain1.lan",
var2: "domain2.lan"
- domain1.lan ],
- domain2.lan "var2": [
"domain1.lan",
"domain2.lan"
]
}
}

View file

@ -1,4 +1,8 @@
rougail: {
var1: "rougail": {
- domain1.lan "var1": [
- domain2.lan "domain1.lan",
"domain2.lan"
]
}
}

View file

@ -1,2 +1,6 @@
rougail: {
var1: string1 "rougail": {
"var1": "string1",
"var2": "string1"
}
}

View file

@ -1,2 +1,6 @@
rougail: {
var1: string1 "rougail": {
"var1": "string1",
"var2": "string1"
}
}

View file

@ -1,2 +1,6 @@
rougail: {
var1: string1 "rougail": {
"var1": "string1",
"var2": "string1"
}
}

View file

@ -1,3 +1,4 @@
{ {
"rougail.var1": "string1" "rougail.var1": "string1",
"rougail.var2": "string1"
} }

View file

@ -1,3 +1,4 @@
{ {
"rougail.var1": "string1" "rougail.var1": "string1",
"rougail.var2": "string1"
} }

View file

@ -1,2 +1,5 @@
rougail: {
without_type: string1 "rougail": {
"without_type": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
without_type: string1 "rougail": {
"without_type": "string1"
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: true "rougail": {
var2: true "var1": true,
var3: true "var2": true,
var4: true "var3": true,
var5: true "var4": true,
var6: true "var5": true,
"var6": true
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: true "rougail": {
var2: true "var1": true,
var3: true "var2": true,
var4: true "var3": true,
var5: true "var4": true,
var6: true "var5": true,
"var6": true
}
}

View file

@ -1 +1 @@
{} {}

View file

@ -1,2 +1,5 @@
rougail: {
variable: true "rougail": {
"variable": true
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: true "rougail": {
"variable": true
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: a "rougail": {
var2: a "var1": "a",
var3: a "var2": "a",
var4: "var3": "a",
var5: a "var4": null,
var6: 1 "var5": "a",
"var6": 1
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: a "rougail": {
var2: a "var1": "a",
var3: a "var2": "a",
var4: "var3": "a",
var5: a "var4": null,
var6: 1 "var5": "a",
"var6": 1
}
}

View file

@ -1,3 +1,6 @@
rougail: {
var1: a "rougail": {
var2: a "var1": "a",
"var2": "a"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
var: 0 "rougail": {
"var": 0
}
}

View file

@ -1,2 +1,5 @@
rougail: {
var: 0 "rougail": {
"var": 0
}
}

View file

@ -1,6 +1,10 @@
rougail: {
var1: "rougail": {
- string1 "var1": [
- string2 "string1",
- string3 "string2",
var2: string1 "string3"
],
"var2": "string1"
}
}

View file

@ -1,6 +1,10 @@
rougail: {
var1: "rougail": {
- string1 "var1": [
- string2 "string1",
- string3 "string2",
var2: string1 "string3"
],
"var2": "string1"
}
}

View file

@ -1,3 +1,6 @@
rougail: {
custom1: string1 "rougail": {
custom2: string1 "custom1": "string1",
"custom2": "string1"
}
}

View file

@ -1,3 +1,6 @@
rougail: {
custom1: string1 "rougail": {
custom2: string1 "custom1": "string1",
"custom2": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
custom1: string1 "rougail": {
"custom1": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: domain1.lan "rougail": {
"variable": "domain1.lan"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: domain1.lan "rougail": {
"variable": "domain1.lan"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: domain1.lan "rougail": {
"variable": "domain1.lan"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: domain1.lan "rougail": {
"variable": "domain1.lan"
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: 1.1 "rougail": {
var2: 1.1 "var1": 1.1,
var3: 1.1 "var2": 1.1,
var4: 1.1 "var3": 1.1,
var5: 1.1 "var4": 1.1,
var6: 1.1 "var5": 1.1,
"var6": 1.1
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: 1.1 "rougail": {
var2: 1.1 "var1": 1.1,
var3: 1.1 "var2": 1.1,
var4: 1.1 "var3": 1.1,
var5: 1.1 "var4": 1.1,
var6: 1.1 "var5": 1.1,
"var6": 1.1
}
}

View file

@ -1 +1 @@
{} {}

View file

@ -1,7 +1,10 @@
rougail: {
var1: 1 "rougail": {
var2: 1 "var1": 1,
var3: 1 "var2": 1,
var4: 1 "var3": 1,
var5: 1 "var4": 1,
var6: 1 "var5": 1,
"var6": 1
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: 1 "rougail": {
var2: 1 "var1": 1,
var3: 1 "var2": 1,
var4: 1 "var3": 1,
var5: 1 "var4": 1,
var6: 1 "var5": 1,
"var6": 1
}
}

View file

@ -1 +1 @@
{} {}

View file

@ -1,4 +1,7 @@
rougail: {
variable1: '80' "rougail": {
variable2: '80' "variable1": "80",
variable3: '80' "variable2": "80",
"variable3": "80"
}
}

View file

@ -1,4 +1,7 @@
rougail: {
variable1: '80' "rougail": {
variable2: '80' "variable1": "80",
variable3: '80' "variable2": "80",
"variable3": "80"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable1: '80' "rougail": {
"variable1": "80"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
var: '#b1b1b1' "rougail": {
"var": "#b1b1b1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
var: '#b1b1b1' "rougail": {
"var": "#b1b1b1"
}
}

View file

@ -1 +1 @@
{} {}

View file

@ -1,7 +1,10 @@
rougail: {
var1: string1 "rougail": {
var2: string1 "var1": "string1",
var3: string1 "var2": "string1",
var4: string1 "var3": "string1",
var5: string1 "var4": "string1",
var6: string1 "var5": "string1",
"var6": "string1"
}
}

View file

@ -1,7 +1,10 @@
rougail: {
var1: string1 "rougail": {
var2: string1 "var1": "string1",
var3: string1 "var2": "string1",
var4: string1 "var3": "string1",
var5: string1 "var4": "string1",
var6: string1 "var5": "string1",
"var6": "string1"
}
}

View file

@ -1,4 +1,7 @@
rougail: {
var1: string1 "rougail": {
var2: string1 "var1": "string1",
var3: string1 "var2": "string1",
"var3": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
var: quote' "rougail": {
"var": "quote'"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
var: quote' "rougail": {
"var": "quote'"
}
}

View file

@ -1,3 +1,6 @@
rougail: {
var1: string1 "rougail": {
var2: string1 "var1": "string1",
"var2": "string1"
}
}

View file

@ -1,3 +1,6 @@
rougail: {
var1: string1 "rougail": {
var2: string1 "var1": "string1",
"var2": "string1"
}
}

View file

@ -1,3 +1,6 @@
rougail: {
var1: string1 "rougail": {
var2: string1 "var1": "string1",
"var2": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,2 +1,5 @@
rougail: {
variable: string1 "rougail": {
"variable": "string1"
}
}

View file

@ -1,9 +1,13 @@
rougail: {
var1: test "rougail": {
var2: test "var1": "test",
var3: test1 "var2": "test",
var4: "var3": "test1",
var5: false "var4": null,
var6: "var5": false,
- test1 "var6": [
- test2 "test1",
"test2"
]
}
}

View file

@ -1,9 +1,13 @@
rougail: {
var1: test "rougail": {
var2: test "var1": "test",
var3: test1 "var2": "test",
var4: "var3": "test1",
var5: false "var4": null,
var6: "var5": false,
- test1 "var6": [
- test2 "test1",
"test2"
]
}
}

View file

@ -1,6 +1,10 @@
rougail: {
var1: test "rougail": {
var3: test1 "var1": "test",
var6: "var3": "test1",
- test1 "var6": [
- test2 "test1",
"test2"
]
}
}

View file

@ -1,7 +1,12 @@
rougail: {
variable1: "rougail": {
- val1 "variable1": [
- val2 "val1",
variable2: "val2"
- val1 ],
- val2 "variable2": [
"val1",
"val2"
]
}
}

View file

@ -1,7 +1,12 @@
rougail: {
variable1: "rougail": {
- val1 "variable1": [
- val2 "val1",
variable2: "val2"
- val1 ],
- val2 "variable2": [
"val1",
"val2"
]
}
}

View file

@ -1,4 +1,8 @@
rougail: {
variable1: "rougail": {
- val1 "variable1": [
- val2 "val1",
"val2"
]
}
}

Some files were not shown because too many files have changed in this diff Show more