Compare commits
No commits in common. "80ba78a9efe9533414671ad5ef0c4c5c59bdc58e" and "7dfdf5376b7b8bd24a45d783a477aab30923ac1e" have entirely different histories.
80ba78a9ef
...
7dfdf5376b
15 changed files with 8 additions and 87 deletions
|
|
@ -1,9 +1,3 @@
|
||||||
## 1.2.0rc0 (2026-06-16)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- we can redefine type of a types child
|
|
||||||
|
|
||||||
## 1.2.0a77 (2026-06-15)
|
## 1.2.0a77 (2026-06-15)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0rc0"
|
version = "1.2.0a77"
|
||||||
|
|
||||||
[tool.commitizen]
|
[tool.commitizen]
|
||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail-base"
|
name = "rougail-base"
|
||||||
version = "1.2.0rc0"
|
version = "1.2.0a77"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
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"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail"
|
name = "rougail"
|
||||||
version = "1.2.0rc0"
|
version = "1.2.0a77"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
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"
|
||||||
|
|
@ -27,7 +27,7 @@ classifiers = [
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ruamel.yaml ~= 0.18.6",
|
"ruamel.yaml ~= 0.18.6",
|
||||||
"pydantic ~= 2.9.2",
|
"pydantic ~= 2.9.2",
|
||||||
"rougail-base == 1.2.0rc0",
|
"rougail-base == 1.2.0a77",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.flit.sdist]
|
[tool.flit.sdist]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.2.0rc0"
|
__version__ = "1.2.0a77"
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ class CollectType:
|
||||||
raise DictConsistencyError(msg, 43, self.sources)
|
raise DictConsistencyError(msg, 43, self.sources)
|
||||||
break
|
break
|
||||||
|
|
||||||
def set_custom_type(self, custom: dict, from_parent: bool=False) -> None:
|
def set_custom_type(self, custom: dict) -> None:
|
||||||
if self.raises and self.test_exists and self.path in self.objectspace.paths:
|
if self.raises and self.test_exists and self.path in self.objectspace.paths:
|
||||||
msg = f'cannot redefine "{self.path}" object to a custom type'
|
msg = f'cannot redefine "{self.path}" object to a custom type'
|
||||||
raise DictConsistencyError(msg, 64, self.sources)
|
raise DictConsistencyError(msg, 64, self.sources)
|
||||||
|
|
@ -298,7 +298,7 @@ class CollectType:
|
||||||
self.user_type = self.types.user_type
|
self.user_type = self.types.user_type
|
||||||
self.sources = self.types.sources + self.sources
|
self.sources = self.types.sources + self.sources
|
||||||
self.object = self.types.object
|
self.object = self.types.object
|
||||||
if not from_parent and self.option_type == "variable" and "type" in self.parameters:
|
if self.option_type == "variable" and "type" in self.parameters:
|
||||||
self.parameters.pop("type")
|
self.parameters.pop("type")
|
||||||
|
|
||||||
def set_object_user_type_family(self):
|
def set_object_user_type_family(self):
|
||||||
|
|
@ -461,7 +461,7 @@ class Collect(CollectType, CollectFamily, CollectVariable):
|
||||||
self.user_type = None
|
self.user_type = None
|
||||||
self.option_type = None
|
self.option_type = None
|
||||||
if parent_option is not None and parent_option.types is not None and self.name in parent_option.types.children:
|
if parent_option is not None and parent_option.types is not None and self.name in parent_option.types.children:
|
||||||
self.set_custom_type(parent_option.types.children[self.name], from_parent=True)
|
self.set_custom_type(parent_option.types.children[self.name])
|
||||||
self.check_no_extra_keys = False
|
self.check_no_extra_keys = False
|
||||||
if self.test_exists and path in objectspace.paths:
|
if self.test_exists and path in objectspace.paths:
|
||||||
for source in reversed(self.objectspace.paths[path].xmlfiles):
|
for source in reversed(self.objectspace.paths[path].xmlfiles):
|
||||||
|
|
|
||||||
|
|
@ -173,11 +173,3 @@ def test_type_family_secret():
|
||||||
|
|
||||||
def test_type_family_secret_namespace():
|
def test_type_family_secret_namespace():
|
||||||
type_variable("family_secret_manager", namespace=True)
|
type_variable("family_secret_manager", namespace=True)
|
||||||
|
|
||||||
|
|
||||||
def test_type_family_redefine_type():
|
|
||||||
type_variable("family_redefine_type")
|
|
||||||
|
|
||||||
|
|
||||||
def test_type_family_redefine_type_namespace():
|
|
||||||
type_variable("family_redefine_type", namespace=True)
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_2 = PasswordOption(name="my_type", doc="My type", default="a value", properties=frozenset({"mandatory", "one_tag", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine_type/00_type.yml', 'tests/types/structures/family_redefine_type/00_structure.yml'], 'type': 'secret', 'tags': ('one_tag',)})
|
|
||||||
optiondescription_1 = OptionDescription(name="my_family", doc="My family type", children=[option_2], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine_type/00_type.yml', 'tests/types/structures/family_redefine_type/00_structure.yml']})
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"my_family.my_type": "a value"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"my_family.my_type": "a value"
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
from tiramisu import *
|
|
||||||
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
|
||||||
from re import compile as re_compile
|
|
||||||
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
|
||||||
try:
|
|
||||||
groups.namespace
|
|
||||||
except:
|
|
||||||
groups.addgroup('namespace')
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("basic")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("standard")
|
|
||||||
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
|
||||||
option_4 = PasswordOption(name="my_type", doc="My type", default="a value", properties=frozenset({"mandatory", "one_tag", "standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine_type/00_type.yml', 'tests/types/structures/family_redefine_type/00_structure.yml'], 'type': 'secret', 'tags': ('one_tag',)})
|
|
||||||
optiondescription_3 = OptionDescription(name="my_family", doc="My family type", children=[option_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_redefine_type/00_type.yml', 'tests/types/structures/family_redefine_type/00_structure.yml']})
|
|
||||||
optiondescription_2 = OptionDescription(name="ns2", doc="NS2", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"}))
|
|
||||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_2])
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"ns2.my_family.my_type": "a value"
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"ns2.my_family.my_type": "a value"
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
my_family:
|
|
||||||
type: my_family_type
|
|
||||||
|
|
||||||
my_type:
|
|
||||||
redefine: true
|
|
||||||
type: secret
|
|
||||||
...
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
%YAML 1.2
|
|
||||||
---
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
my_family_type:
|
|
||||||
description: My family type
|
|
||||||
|
|
||||||
my_type:
|
|
||||||
description: My type
|
|
||||||
default: a value
|
|
||||||
tags:
|
|
||||||
- one_tag
|
|
||||||
...
|
|
||||||
Loading…
Reference in a new issue