fix: error in disabled dynamic variable

This commit is contained in:
egarette@silique.fr 2025-04-02 21:15:27 +02:00
parent b8f3e71314
commit a2e1d7746e
12 changed files with 262 additions and 2 deletions

View file

@ -588,7 +588,7 @@ class RougailOutputDoc(Examples):
all_is_undocumented = None
for idx, path in enumerate(informations["paths"]):
if self._is_inaccessible_user_data(self.conf.option(path)):
msg = true_msg.format(get_display_path(informations, index))
msg = true_msg.format(get_display_path(informations, idx))
all_is_undocumented = False
else:
if all_is_undocumented is None:

View file

@ -0,0 +1,19 @@
[cols="1a,1a"]
|====
| Variable | Description
|
**var1** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `unique` `multiple` |
A suffix variable. +
**Examples**:
* val1
* val2
|
**var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated.
|====

View file

@ -0,0 +1,62 @@
{
"var1": {
"type": "variable",
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "unique"
},
{
"type": "multiple",
"name": "multiple"
}
],
"paths": [
"var1"
],
"names": [
"var1"
],
"descriptions": [
"A suffix variable."
],
"examples": [
"val1",
"val2"
]
},
"var2": {
"type": "variable",
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "mandatory"
}
],
"paths": [
"var2"
],
"names": [
"var2"
],
"descriptions": [
"A variable calculated."
]
}
}

View file

@ -0,0 +1,5 @@
| Variable                                                                                                           | Description                                                                                                        |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A suffix variable.<br/>**Examples**: <br/>- val1<br/>- val2 |
| **var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated. |

View file

@ -0,0 +1,11 @@
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
var1 │ A suffix variable. │
 string   standard   unique    │ Examples: │
multiple  │ - val1 │
│ │ - val2 │
├───────────────────────────────────────┼──────────────────────────────────────┤
var2 │ A variable calculated. │
 string   standard   mandatory  │ │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -0,0 +1,15 @@
# Example with mandatory variables not filled in
```yaml
---
var2: example
```
# Example with all variables modifiable
```yaml
---
var1:
- val1
- val2
var2: example
```

View file

@ -0,0 +1,25 @@
== Variables for "Rougail"
[cols="1a,1a"]
|====
| Variable | Description
|
**rougail.var1** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `unique` `multiple` |
A suffix variable. +
**Examples**:
* val1
* val2
|
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated. +
**Default**:
* the value of the variable "rougail.dyn__val1__.var"
* the value of the variable "rougail.dyn__val2__.var"
|====

View file

@ -0,0 +1,86 @@
{
"rougail": {
"type": "namespace",
"informations": {
"paths": [
"rougail"
],
"names": [
"rougail"
],
"description": "Rougail",
"properties": [
{
"type": "mode",
"name": "basic"
}
]
},
"children": {
"rougail.var1": {
"type": "variable",
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "unique"
},
{
"type": "multiple",
"name": "multiple"
}
],
"paths": [
"rougail.var1"
],
"names": [
"var1"
],
"descriptions": [
"A suffix variable."
],
"examples": [
"val1",
"val2"
]
},
"rougail.var2": {
"type": "variable",
"default": [
"the value of the variable \"rougail.dynval1.var\"",
"the value of the variable \"rougail.dynval2.var\""
],
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "mandatory"
}
],
"paths": [
"rougail.var2"
],
"names": [
"var2"
],
"descriptions": [
"A variable calculated."
]
}
}
}
}

View file

@ -0,0 +1,7 @@
# Variables for "Rougail"
| Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A suffix variable.<br/>**Examples**: <br/>- val1<br/>- val2 |
| **rougail.var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.<br/>**Default**: <br/>- the value of the variable "rougail.dyn*val1*.var"<br/>- the value of the variable "rougail.dyn*val2*.var" |

View file

@ -0,0 +1,20 @@
Variables for "Rougail"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
rougail.var1 │ A suffix variable. │
 string   standard   unique    │ Examples: │
multiple  │ - val1 │
│ │ - val2 │
├───────────────────────────────────────┼──────────────────────────────────────┤
rougail.var2 │ A variable calculated. │
 string   standard   mandatory  │ Default: │
│ │ - the value of the variable │
│ │ "rougail.dynval1.var"
│ │ - the value of the variable │
│ │ "rougail.dynval2.var"
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -0,0 +1,10 @@
# Example with all variables modifiable
```yaml
---
rougail:
var1:
- val1
- val2
var2: example
```

View file

@ -14,7 +14,7 @@ excludes = [
]
test_ok = get_structures_list(excludes)
# test_ok = [Path('../rougail-tests/structures/60_9family_dynamic_calc_both')]
# test_ok = [Path('../rougail-tests/structures/60_5family_dynamic_calc_suffix_disabled2')]
os.environ['COLUMNS'] = '80'