Compare commits

..

No commits in common. "7cc942675007627c35939c5c0f9527bb4833af17" and "697669bc47fdf3cefb71a59eb8e06eebd578c305" have entirely different histories.

12 changed files with 7 additions and 160 deletions

View file

@ -1,10 +1,3 @@
## 0.1.0a10 (2025-05-02)
### Fix
- do not load use_data with rougail cli
- support {{ suffix }} name in 1.1 format version
## 0.1.0a9 (2025-04-30) ## 0.1.0a9 (2025-04-30)
### Feat ### Feat

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project] [project]
name = "rougail.output_formatter" name = "rougail.output_formatter"
version = "0.1.0a10" version = "0.1.0a9"
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 formatter" description = "Rougail output formatter"

View file

@ -448,10 +448,7 @@ class RougailOutputFormatter:
return y return y
name = subpath.pop(0) name = subpath.pop(0)
if name not in y and name.endswith('{{ identifier }}'): if name not in y and name.endswith('{{ identifier }}'):
search_name = name[:-16] name = name[:-16]
if search_name not in y:
search_name = name.replace("{{ identifier }}", "{{ suffix }}")
name = search_name
return _yaml(y[name]) return _yaml(y[name])
if self.main_namespace: if self.main_namespace:
subpath = path.split('.')[1:] subpath = path.split('.')[1:]

View file

@ -1 +1 @@
__version__ = "0.1.0a10" __version__ = "0.1.0a9"

View file

@ -30,35 +30,20 @@ load_unexist_redefine:
default: default:
jinja: >- jinja: >-
{% if step.output is not propertyerror and step.output == 'formatter' %} {% if step.output is not propertyerror and step.output == 'formatter' %}
true true
{% else %} {% else %}
false false
{% endif %} {% endif %}
hidden: hidden:
jinja: >- jinja: >-
{% if step.output is not propertyerror and step.output == 'formatter' %} {% if step.output is not propertyerror and step.output == 'formatter' %}
load_unexist_redefine is always true with 'formatter' output load_unexist_redefine is always true with 'formatter' output
{% endif %} {% endif %}
cli:
load_config:
exists: true
redefine: true
type: boolean
default:
jinja: >-
{% if step.output is not propertyerror and step.output == 'formatter' %}
false
{% else %}
true
{% endif %}
""" """
return { return {
"name": "formatter", "name": "formatter",
"process": "output", "process": "output",
"options": options, "options": options,
"allow_user_data": False,
"level": 90, "level": 90,
} }

View file

@ -1,23 +0,0 @@
%YAML 1.2
---
version: 1.1
var1:
description: a first variable
default: value
hidden: true
var2:
description: a second variable
disabled:
variable: _.var1
when: value
var3:
description: a third variable
default:
jinja: >-
{% if _.var1 == 'value' or _.var2 == 'blah' %}
value
{% endif %}
...

View file

@ -1,23 +0,0 @@
%YAML 1.2
---
version: 1.1
var1:
description: a first variable
default: value
hidden: true
var2:
description: a second variable
disabled:
variable: _.var1
when_not: value
var3:
description: a third variable
default:
jinja: >-
{% if _.var1 == 'value' or _.var2 == 'blah' %}
value
{% endif %}
...

View file

@ -1,18 +0,0 @@
%YAML 1.2
---
version: 1.1
var1: value # a first variable
var2:
description: a second variable
default:
variable: _.var1
hidden: true
var3:
description: a third variable
disabled:
variable: _.var2
when: value
...

View file

@ -1,18 +0,0 @@
%YAML 1.2
---
version: 1.1
var1: value # a first variable
var2:
description: a second variable
default:
variable: _.var1
hidden: true
var3:
description: a third variable
disabled:
variable: _.var2
when_not: value
...

View file

@ -1,22 +0,0 @@
%YAML 1.2
---
version: 1.1
var1:
description: a second variable
test:
- 0
validators:
- jinja: |-
{% if _.var1 != index %}
value != than index
{% endif %}
description: value must be equal to index
params:
index:
type: index
default:
- 0
- 1
- 2
...

View file

@ -1,24 +0,0 @@
%YAML 1.2
---
version: 1.1
var: # A identifier variable
- val1
- val2
'{{ identifier }}':
description: A dynamic family
dynamic:
variable: _.var
propertyerror: false
allow_none: true
'{{ identifier }}':
description: A dynamic family
dynamic:
variable: __.var
propertyerror: false
allow_none: true
var: # A dynamic variable
...

View file

@ -15,7 +15,7 @@ excludes = [
] ]
test_ok = get_structures_list(excludes) test_ok = get_structures_list(excludes)
# test_ok = [Path('../rougail-tests/structures/60_6family_dynamic_sub_dynamic_1_0_2')] # test_ok = [Path('../rougail-tests/structures/16_3family_empty_at_ends')]
def idfn(fixture_value): def idfn(fixture_value):