fix: error in disabled dynamic variable
This commit is contained in:
parent
b8f3e71314
commit
a2e1d7746e
12 changed files with 262 additions and 2 deletions
src/rougail/output_doc
tests
results
test
60_5family_dynamic_calc_suffix_disabled2.adoc60_5family_dynamic_calc_suffix_disabled2.json60_5family_dynamic_calc_suffix_disabled2.md60_5family_dynamic_calc_suffix_disabled2.sh
test_examples
test_namespace
60_5family_dynamic_calc_suffix_disabled2.adoc60_5family_dynamic_calc_suffix_disabled2.json60_5family_dynamic_calc_suffix_disabled2.md60_5family_dynamic_calc_suffix_disabled2.sh
test_namespace_examples
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|====
|
||||
|
|
@ -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."
|
||||
]
|
||||
}
|
||||
}
|
|
@ -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. |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mvar1[0m │ A suffix variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m unique [0m [1;7m [0m │ [1mExamples[0m: │
|
||||
│ [1;7mmultiple [0m │ - val1 │
|
||||
│ │ - val2 │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mvar2[0m │ A variable calculated. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
|
@ -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
|
||||
```
|
|
@ -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"
|
||||
|====
|
||||
|
|
@ -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."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
# Variables for "Rougail"
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **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" |
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
|
||||
[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m
|
||||
|
||||
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mrougail.var1[0m │ A suffix variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m unique [0m [1;7m [0m │ [1mExamples[0m: │
|
||||
│ [1;7mmultiple [0m │ - val1 │
|
||||
│ │ - val2 │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mrougail.var2[0m │ A variable calculated. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: │
|
||||
│ │ - the value of the variable │
|
||||
│ │ "rougail.dyn[3mval1[0m.var" │
|
||||
│ │ - the value of the variable │
|
||||
│ │ "rougail.dyn[3mval2[0m.var" │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
|
@ -0,0 +1,10 @@
|
|||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var1:
|
||||
- val1
|
||||
- val2
|
||||
var2: example
|
||||
```
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue