Compare commits
No commits in common. "f65b168c21667935546229cc99699d19607bfa4d" and "406f2121dbfda00834e3fb6b900466ad553322aa" have entirely different histories.
f65b168c21
...
406f2121db
8 changed files with 24 additions and 43 deletions
|
|
@ -1,10 +1,3 @@
|
||||||
## 1.1.0 (2024-11-01)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- black
|
|
||||||
- add changelog_merge_prerelease to commitizen
|
|
||||||
|
|
||||||
## 1.1.0rc0 (2024-11-01)
|
## 1.1.0rc0 (2024-11-01)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.1.0"
|
version = "1.1.0rc0"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [
|
||||||
readme = "README.md"
|
{name = "Emmanuel Garette", email = "gnunux@gnunux.info"},
|
||||||
|
]
|
||||||
description = "A consistency handling system that was initially designed in the configuration management"
|
description = "A consistency handling system that was initially designed in the configuration management"
|
||||||
|
readme = "README.md"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||||
|
|
@ -30,6 +32,9 @@ dependencies = [
|
||||||
"tiramisu ~= 5.0.0"
|
"tiramisu ~= 5.0.0"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Home = "https://forge.cloud.silique.fr/stove/rougail"
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
dev = [
|
dev = [
|
||||||
"pylint ~= 3.0.3",
|
"pylint ~= 3.0.3",
|
||||||
|
|
@ -37,14 +42,9 @@ dev = [
|
||||||
"lxml ~= 5.2.2"
|
"lxml ~= 5.2.2"
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
|
||||||
Home = "https://forge.cloud.silique.fr/stove/rougail"
|
|
||||||
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
|
||||||
|
|
@ -259,9 +259,5 @@ class Annotator(Walk): # pylint: disable=R0903
|
||||||
if value not in choices:
|
if value not in choices:
|
||||||
msg = _(
|
msg = _(
|
||||||
'the variable "{0}" has an unvalid default value "{1}" should be in {2}'
|
'the variable "{0}" has an unvalid default value "{1}" should be in {2}'
|
||||||
).format(
|
).format(variable.path, value, display_list(choices, separator="or", add_quote=True))
|
||||||
variable.path,
|
|
||||||
value,
|
|
||||||
display_list(choices, separator="or", add_quote=True),
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 26, variable.xmlfiles)
|
raise DictConsistencyError(msg, 26, variable.xmlfiles)
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ suffix:
|
||||||
disabled:
|
disabled:
|
||||||
variable: upgrade"""
|
variable: upgrade"""
|
||||||
for process in processes:
|
for process in processes:
|
||||||
if processes[process] or process == "output":
|
if processes[process] or process == 'output':
|
||||||
objects = processes[process]
|
objects = processes[process]
|
||||||
rougail_process += """
|
rougail_process += """
|
||||||
{NAME}:
|
{NAME}:
|
||||||
|
|
@ -435,9 +435,7 @@ suffix:
|
||||||
rougail_process += """ {% if _.output == 'NAME' %}
|
rougail_process += """ {% if _.output == 'NAME' %}
|
||||||
Cannot load user data for NAME output
|
Cannot load user data for NAME output
|
||||||
{% endif %}
|
{% endif %}
|
||||||
""".replace(
|
""".replace("NAME", hidden_output)
|
||||||
"NAME", hidden_output
|
|
||||||
)
|
|
||||||
elif objects:
|
elif objects:
|
||||||
rougail_process += " default: {DEFAULT}".format(
|
rougail_process += " default: {DEFAULT}".format(
|
||||||
DEFAULT=objects[0]["name"]
|
DEFAULT=objects[0]["name"]
|
||||||
|
|
|
||||||
|
|
@ -467,15 +467,11 @@ class ParserVariable:
|
||||||
extra_keys = set(obj) - self.variable_attrs
|
extra_keys = set(obj) - self.variable_attrs
|
||||||
if not extra_keys:
|
if not extra_keys:
|
||||||
for key, value in obj.items():
|
for key, value in obj.items():
|
||||||
if (
|
if isinstance(value, dict) and key != 'params' and not self.is_calculation(
|
||||||
isinstance(value, dict)
|
|
||||||
and key != "params"
|
|
||||||
and not self.is_calculation(
|
|
||||||
key,
|
key,
|
||||||
value,
|
value,
|
||||||
self.variable_calculations,
|
self.variable_calculations,
|
||||||
False,
|
False,
|
||||||
)
|
|
||||||
):
|
):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
from gettext import translation
|
from gettext import translation
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
t = translation("rougail", str(Path(__file__).parent / "locale"), fallback=True)
|
t = translation('rougail', str(Path(__file__).parent / 'locale'), fallback=True)
|
||||||
|
|
||||||
_ = t.gettext
|
_ = t.gettext
|
||||||
|
|
|
||||||
|
|
@ -64,14 +64,12 @@ class Annotator(Walk):
|
||||||
for letter in alternative_name:
|
for letter in alternative_name:
|
||||||
all_letters += letter
|
all_letters += letter
|
||||||
if all_letters == "h":
|
if all_letters == "h":
|
||||||
msg = _('alternative_name "{0}" conflict with "--help"').format(
|
msg = _('alternative_name "{0}" conflict with "--help"').format(alternative_name)
|
||||||
alternative_name
|
|
||||||
)
|
|
||||||
raise DictConsistencyError(msg, 202, variable.xmlfiles)
|
raise DictConsistencyError(msg, 202, variable.xmlfiles)
|
||||||
if all_letters in self.alternative_names:
|
if all_letters in self.alternative_names:
|
||||||
msg = _('conflict alternative_name "{0}": "{1}" and "{2}"').format(
|
msg = _(
|
||||||
alternative_name, variable_path, self.alternative_names[all_letters]
|
'conflict alternative_name "{0}": "{1}" and "{2}"'
|
||||||
)
|
).format(alternative_name, variable_path, self.alternative_names[all_letters])
|
||||||
raise DictConsistencyError(msg, 202, variable.xmlfiles)
|
raise DictConsistencyError(msg, 202, variable.xmlfiles)
|
||||||
|
|
||||||
self.alternative_names[alternative_name] = variable_path
|
self.alternative_names[alternative_name] = variable_path
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,9 @@ def get_jinja_variable_to_param(
|
||||||
for g in parsed_content.find_all(Getattr):
|
for g in parsed_content.find_all(Getattr):
|
||||||
variables.add(recurse_getattr(g))
|
variables.add(recurse_getattr(g))
|
||||||
except TemplateSyntaxError as err:
|
except TemplateSyntaxError as err:
|
||||||
msg = _('error in jinja "{0}" for the variable "{1}": {2}').format(
|
msg = _(
|
||||||
jinja_text, current_path, err
|
'error in jinja "{0}" for the variable "{1}": {2}'
|
||||||
)
|
).format(jinja_text, current_path, err)
|
||||||
raise DictConsistencyError(msg, 39, xmlfiles) from err
|
raise DictConsistencyError(msg, 39, xmlfiles) from err
|
||||||
variables = list(variables)
|
variables = list(variables)
|
||||||
variables.sort(reverse=True)
|
variables.sort(reverse=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue