Compare commits
No commits in common. "7cc942675007627c35939c5c0f9527bb4833af17" and "697669bc47fdf3cefb71a59eb8e06eebd578c305" have entirely different histories.
7cc9426750
...
697669bc47
12 changed files with 7 additions and 160 deletions
|
|
@ -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)
|
||||
|
||||
### Feat
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
|||
|
||||
[project]
|
||||
name = "rougail.output_formatter"
|
||||
version = "0.1.0a10"
|
||||
version = "0.1.0a9"
|
||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||
readme = "README.md"
|
||||
description = "Rougail output formatter"
|
||||
|
|
|
|||
|
|
@ -448,10 +448,7 @@ class RougailOutputFormatter:
|
|||
return y
|
||||
name = subpath.pop(0)
|
||||
if name not in y and name.endswith('{{ identifier }}'):
|
||||
search_name = name[:-16]
|
||||
if search_name not in y:
|
||||
search_name = name.replace("{{ identifier }}", "{{ suffix }}")
|
||||
name = search_name
|
||||
name = name[:-16]
|
||||
return _yaml(y[name])
|
||||
if self.main_namespace:
|
||||
subpath = path.split('.')[1:]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.0a10"
|
||||
__version__ = "0.1.0a9"
|
||||
|
|
|
|||
|
|
@ -30,35 +30,20 @@ load_unexist_redefine:
|
|||
default:
|
||||
jinja: >-
|
||||
{% if step.output is not propertyerror and step.output == 'formatter' %}
|
||||
true
|
||||
true
|
||||
{% else %}
|
||||
false
|
||||
false
|
||||
{% endif %}
|
||||
hidden:
|
||||
jinja: >-
|
||||
{% 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 %}
|
||||
|
||||
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 {
|
||||
"name": "formatter",
|
||||
"process": "output",
|
||||
"options": options,
|
||||
"allow_user_data": False,
|
||||
"level": 90,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
...
|
||||
|
|
@ -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 %}
|
||||
...
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
@ -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
|
||||
...
|
||||
|
|
@ -15,7 +15,7 @@ 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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue