Compare commits

..

No commits in common. "80ba78a9efe9533414671ad5ef0c4c5c59bdc58e" and "7dfdf5376b7b8bd24a45d783a477aab30923ac1e" have entirely different histories.

15 changed files with 8 additions and 87 deletions

View file

@ -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)
### Fix

View file

@ -1,6 +1,6 @@
[project]
name = "rougail"
version = "1.2.0rc0"
version = "1.2.0a77"
[tool.commitizen]
name = "cz_conventional_commits"

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail-base"
version = "1.2.0rc0"
version = "1.2.0a77"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "A consistency handling system that was initially designed in the configuration management"

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail"
version = "1.2.0rc0"
version = "1.2.0a77"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "A consistency handling system that was initially designed in the configuration management"
@ -27,7 +27,7 @@ classifiers = [
dependencies = [
"ruamel.yaml ~= 0.18.6",
"pydantic ~= 2.9.2",
"rougail-base == 1.2.0rc0",
"rougail-base == 1.2.0a77",
]
[tool.flit.sdist]

View file

@ -1 +1 @@
__version__ = "1.2.0rc0"
__version__ = "1.2.0a77"

View file

@ -286,7 +286,7 @@ class CollectType:
raise DictConsistencyError(msg, 43, self.sources)
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:
msg = f'cannot redefine "{self.path}" object to a custom type'
raise DictConsistencyError(msg, 64, self.sources)
@ -298,7 +298,7 @@ class CollectType:
self.user_type = self.types.user_type
self.sources = self.types.sources + self.sources
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")
def set_object_user_type_family(self):
@ -461,7 +461,7 @@ class Collect(CollectType, CollectFamily, CollectVariable):
self.user_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:
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
if self.test_exists and path in objectspace.paths:
for source in reversed(self.objectspace.paths[path].xmlfiles):

View file

@ -173,11 +173,3 @@ def test_type_family_secret():
def test_type_family_secret_namespace():
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)

View file

@ -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])

View file

@ -1,3 +0,0 @@
{
"my_family.my_type": "a value"
}

View file

@ -1,3 +0,0 @@
{
"my_family.my_type": "a value"
}

View file

@ -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])

View file

@ -1,3 +0,0 @@
{
"ns2.my_family.my_type": "a value"
}

View file

@ -1,3 +0,0 @@
{
"ns2.my_family.my_type": "a value"
}

View file

@ -1,11 +0,0 @@
%YAML 1.2
---
version: 1.1
my_family:
type: my_family_type
my_type:
redefine: true
type: secret
...

View file

@ -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
...