fix: better documentation with hidden variable in property calculation
This commit is contained in:
parent
abbeb78dbb
commit
726c64e23d
42 changed files with 901 additions and 17 deletions
|
|
@ -38,7 +38,6 @@ from rougail.object_model import (
|
|||
CONVERT_OPTION,
|
||||
PROPERTY_ATTRIBUTE,
|
||||
)
|
||||
from rougail.output_doc.utils import dump
|
||||
|
||||
|
||||
class Annotator(Walk):
|
||||
|
|
@ -289,18 +288,16 @@ class Annotator(Walk):
|
|||
# get comparative value
|
||||
if values.when_not is not undefined:
|
||||
value = values.when_not
|
||||
msg = _('when the variable "{0}" hasn\'t the value "{1}"')
|
||||
condition = "when_not"
|
||||
elif values.when is not undefined:
|
||||
value = values.when
|
||||
condition = "when"
|
||||
else:
|
||||
if values.when is not undefined:
|
||||
value = values.when
|
||||
else:
|
||||
value = True
|
||||
msg = _('when the variable "{0}" has the value "{1}"')
|
||||
if not isinstance(value, str):
|
||||
value = dump(value)
|
||||
value = True
|
||||
condition = "when"
|
||||
|
||||
# set message
|
||||
values_calculation = msg.format(variable_path, value)
|
||||
values_calculation = (variable_path, value, condition)
|
||||
else:
|
||||
values_calculation = variable_path
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
"""
|
||||
Silique (https://www.silique.fr)
|
||||
Copyright (C) 2024-2025
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
|
|
@ -28,7 +28,7 @@ from rougail.object_model import PROPERTY_ATTRIBUTE
|
|||
|
||||
from .config import OutPuts
|
||||
from .i18n import _
|
||||
from .utils import DocTypes, get_display_path
|
||||
from .utils import DocTypes, get_display_path, dump
|
||||
from .example import Examples
|
||||
|
||||
|
||||
|
|
@ -168,6 +168,20 @@ class RougailOutputDoc(Examples):
|
|||
]: # chain(["hidden", "disabled"], self.disabled_modes):
|
||||
if hidden_property in properties:
|
||||
return True
|
||||
|
||||
calculation = child.information.get(f"{hidden_property}_calculation", None)
|
||||
if calculation and calculation['type'] == 'variable':
|
||||
variable_path, value, condition = calculation["value"]
|
||||
variable = self.conf.forcepermissive.option(variable_path)
|
||||
try:
|
||||
variable_value = variable.value.get()
|
||||
except AttributeError as err:
|
||||
pass
|
||||
else:
|
||||
uncalculated = variable.value.get(uncalculated=True)
|
||||
if not isinstance(uncalculated, Calculation) and self._is_inaccessible_user_data(variable) and (condition == 'when' and value == variable_value or
|
||||
condition == 'when_not' and value != variable_value):
|
||||
return True
|
||||
if not child.isoptiondescription():
|
||||
for hidden_property in self.disabled_modes:
|
||||
if hidden_property in properties:
|
||||
|
|
@ -498,10 +512,13 @@ class RougailOutputDoc(Examples):
|
|||
"name": msg,
|
||||
}
|
||||
elif variable.information.get(f"{prop}_calculation", False):
|
||||
annotation = self._to_string(variable, prop)
|
||||
if not annotation:
|
||||
continue
|
||||
prop_obj = {
|
||||
"type": "property",
|
||||
"name": msg,
|
||||
"annotation": self._to_string(variable, prop),
|
||||
"annotation": annotation,
|
||||
}
|
||||
else:
|
||||
continue
|
||||
|
|
@ -547,7 +564,7 @@ class RougailOutputDoc(Examples):
|
|||
return values
|
||||
return self._calculation_to_string(variable, calculation, prop)
|
||||
|
||||
def _calculation_to_string(self, variable, calculation, prop):
|
||||
def _calculation_to_string(self, child, calculation, prop):
|
||||
if "type" not in calculation:
|
||||
return calculation["value"]
|
||||
if calculation["type"] == "jinja":
|
||||
|
|
@ -559,13 +576,32 @@ class RougailOutputDoc(Examples):
|
|||
'"{0}" is a calculation for {1} but has no description in {2}'
|
||||
).format(
|
||||
prop,
|
||||
variable.path(),
|
||||
display_xmlfiles(variable.information.get("ymlfiles")),
|
||||
child.path(),
|
||||
display_xmlfiles(child.information.get("ymlfiles")),
|
||||
)
|
||||
warn(warning)
|
||||
elif calculation["type"] == "variable":
|
||||
if prop in PROPERTY_ATTRIBUTE:
|
||||
values = calculation["value"]
|
||||
variable_path, value, condition = calculation["value"]
|
||||
variable = self.conf.forcepermissive.option(variable_path)
|
||||
try:
|
||||
variable.value.get()
|
||||
except AttributeError as err:
|
||||
pass
|
||||
variable = None
|
||||
else:
|
||||
uncalculated = variable.value.get(uncalculated=True)
|
||||
if not isinstance(uncalculated, Calculation) and self._is_inaccessible_user_data(variable):
|
||||
return None
|
||||
if variable and self._is_inaccessible_user_data(variable):
|
||||
msg = _("depends on an undocumented variable")
|
||||
elif condition == "when_not":
|
||||
msg = _('when the variable "{0}" hasn\'t the value "{1}"')
|
||||
else:
|
||||
msg = _('when the variable "{0}" has the value "{1}"')
|
||||
if not isinstance(value, str):
|
||||
value = dump(value)
|
||||
values = msg.format(variable_path, value)
|
||||
else:
|
||||
if calculation.get("optional", False):
|
||||
path = calculation["value"]
|
||||
|
|
|
|||
11
tests/results/test/04_1default_calculation_hidden_3.adoc
Normal file
11
tests/results/test/04_1default_calculation_hidden_3.adoc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A third variable. +
|
||||
**Default**: depends on a calculation.
|
||||
|====
|
||||
|
||||
29
tests/results/test/04_1default_calculation_hidden_3.json
Normal file
29
tests/results/test/04_1default_calculation_hidden_3.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"var3": {
|
||||
"type": "variable",
|
||||
"default": "depends on a calculation.",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
4
tests/results/test/04_1default_calculation_hidden_3.md
Normal file
4
tests/results/test/04_1default_calculation_hidden_3.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Default**: depends on a calculation. |
|
||||
|
||||
6
tests/results/test/04_1default_calculation_hidden_3.sh
Normal file
6
tests/results/test/04_1default_calculation_hidden_3.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mvar3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: depends on a calculation. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
16
tests/results/test/04_1default_calculation_hidden_4.adoc
Normal file
16
tests/results/test/04_1default_calculation_hidden_4.adoc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**var2** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
|
||||
A second variable.
|
||||
|
|
||||
|
||||
**var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A third variable. +
|
||||
**Default**: depends on a calculation.
|
||||
|====
|
||||
|
||||
55
tests/results/test/04_1default_calculation_hidden_4.json
Normal file
55
tests/results/test/04_1default_calculation_hidden_4.json
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"var2": {
|
||||
"type": "variable",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var2"
|
||||
],
|
||||
"names": [
|
||||
"var2"
|
||||
],
|
||||
"descriptions": [
|
||||
"A second variable."
|
||||
]
|
||||
},
|
||||
"var3": {
|
||||
"type": "variable",
|
||||
"default": "depends on a calculation.",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
5
tests/results/test/04_1default_calculation_hidden_4.md
Normal file
5
tests/results/test/04_1default_calculation_hidden_4.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A second variable. |
|
||||
| **var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Default**: depends on a calculation. |
|
||||
|
||||
9
tests/results/test/04_1default_calculation_hidden_4.sh
Normal file
9
tests/results/test/04_1default_calculation_hidden_4.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mvar2[0m │ A second variable. │
|
||||
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m │ │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mvar3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: depends on a calculation. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
17
tests/results/test/04_1default_calculation_hidden_5.adoc
Normal file
17
tests/results/test/04_1default_calculation_hidden_5.adoc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**var1** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A first variable. +
|
||||
**Default**: value
|
||||
|
|
||||
|
||||
**var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` `__disabled__` |
|
||||
A third variable. +
|
||||
**Disabled**: depends on an undocumented variable.
|
||||
|====
|
||||
|
||||
60
tests/results/test/04_1default_calculation_hidden_5.json
Normal file
60
tests/results/test/04_1default_calculation_hidden_5.json
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"var1": {
|
||||
"type": "variable",
|
||||
"default": "value",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var1"
|
||||
],
|
||||
"names": [
|
||||
"var1"
|
||||
],
|
||||
"descriptions": [
|
||||
"A first variable."
|
||||
]
|
||||
},
|
||||
"var3": {
|
||||
"type": "variable",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "disabled",
|
||||
"annotation": "depends on an undocumented variable."
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
5
tests/results/test/04_1default_calculation_hidden_5.md
Normal file
5
tests/results/test/04_1default_calculation_hidden_5.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Default**: value |
|
||||
| **var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | A third variable.<br/>**Disabled**: depends on an undocumented variable. |
|
||||
|
||||
10
tests/results/test/04_1default_calculation_hidden_5.sh
Normal file
10
tests/results/test/04_1default_calculation_hidden_5.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mvar1[0m │ A first variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mvar3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m [1;3;7m [0m │ [1mDisabled[0m: depends on an undocumented │
|
||||
│ [1;3;7mdisabled [0m │ variable. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
17
tests/results/test/04_1default_calculation_hidden_6.adoc
Normal file
17
tests/results/test/04_1default_calculation_hidden_6.adoc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**var1** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A first variable. +
|
||||
**Default**: value
|
||||
|
|
||||
|
||||
**var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` `__disabled__` |
|
||||
A third variable. +
|
||||
**Disabled**: depends on an undocumented variable.
|
||||
|====
|
||||
|
||||
60
tests/results/test/04_1default_calculation_hidden_6.json
Normal file
60
tests/results/test/04_1default_calculation_hidden_6.json
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"var1": {
|
||||
"type": "variable",
|
||||
"default": "value",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var1"
|
||||
],
|
||||
"names": [
|
||||
"var1"
|
||||
],
|
||||
"descriptions": [
|
||||
"A first variable."
|
||||
]
|
||||
},
|
||||
"var3": {
|
||||
"type": "variable",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "disabled",
|
||||
"annotation": "depends on an undocumented variable."
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
5
tests/results/test/04_1default_calculation_hidden_6.md
Normal file
5
tests/results/test/04_1default_calculation_hidden_6.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Default**: value |
|
||||
| **var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | A third variable.<br/>**Disabled**: depends on an undocumented variable. |
|
||||
|
||||
10
tests/results/test/04_1default_calculation_hidden_6.sh
Normal file
10
tests/results/test/04_1default_calculation_hidden_6.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mvar1[0m │ A first variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mvar3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m [1;3;7m [0m │ [1mDisabled[0m: depends on an undocumented │
|
||||
│ [1;3;7mdisabled [0m │ variable. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
var3: value
|
||||
```
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Example with mandatory variables not filled in
|
||||
|
||||
```yaml
|
||||
---
|
||||
var2: example
|
||||
```
|
||||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
var2: example
|
||||
var3: value
|
||||
```
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Example with mandatory variables not filled in
|
||||
|
||||
```yaml
|
||||
---
|
||||
var3: example
|
||||
```
|
||||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
var1: value
|
||||
var3: example
|
||||
```
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Example with mandatory variables not filled in
|
||||
|
||||
```yaml
|
||||
---
|
||||
var3: example
|
||||
```
|
||||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
var1: value
|
||||
var3: example
|
||||
```
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
== Variables for "Rougail"
|
||||
|
||||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**rougail.var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A third variable. +
|
||||
**Default**: depends on a calculation.
|
||||
|====
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"rougail": {
|
||||
"type": "namespace",
|
||||
"informations": {
|
||||
"paths": [
|
||||
"rougail"
|
||||
],
|
||||
"names": [
|
||||
"rougail"
|
||||
],
|
||||
"description": "Rougail",
|
||||
"properties": [
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"children": {
|
||||
"rougail.var3": {
|
||||
"type": "variable",
|
||||
"default": "depends on a calculation.",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Variables for "Rougail"
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **rougail.var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Default**: depends on a calculation. |
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
|
||||
[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m
|
||||
|
||||
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mrougail.var3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: depends on a calculation. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
== Variables for "Rougail"
|
||||
|
||||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**rougail.var2** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
|
||||
A second variable.
|
||||
|
|
||||
|
||||
**rougail.var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A third variable. +
|
||||
**Default**: depends on a calculation.
|
||||
|====
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"rougail": {
|
||||
"type": "namespace",
|
||||
"informations": {
|
||||
"paths": [
|
||||
"rougail"
|
||||
],
|
||||
"names": [
|
||||
"rougail"
|
||||
],
|
||||
"description": "Rougail",
|
||||
"properties": [
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"children": {
|
||||
"rougail.var2": {
|
||||
"type": "variable",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var2"
|
||||
],
|
||||
"names": [
|
||||
"var2"
|
||||
],
|
||||
"descriptions": [
|
||||
"A second variable."
|
||||
]
|
||||
},
|
||||
"rougail.var3": {
|
||||
"type": "variable",
|
||||
"default": "depends on a calculation.",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Variables for "Rougail"
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **rougail.var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A second variable. |
|
||||
| **rougail.var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Default**: depends on a calculation. |
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
|
||||
[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m
|
||||
|
||||
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ [1mrougail.var2[0m │ A second variable. │
|
||||
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m │ │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mrougail.var3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: depends on a calculation. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
== Variables for "Rougail"
|
||||
|
||||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**rougail.var1** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A first variable. +
|
||||
**Default**: value
|
||||
|
|
||||
|
||||
**rougail.var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` `__disabled__` |
|
||||
A third variable. +
|
||||
**Disabled**: depends on an undocumented variable.
|
||||
|====
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"rougail": {
|
||||
"type": "namespace",
|
||||
"informations": {
|
||||
"paths": [
|
||||
"rougail"
|
||||
],
|
||||
"names": [
|
||||
"rougail"
|
||||
],
|
||||
"description": "Rougail",
|
||||
"properties": [
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"children": {
|
||||
"rougail.var1": {
|
||||
"type": "variable",
|
||||
"default": "value",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var1"
|
||||
],
|
||||
"names": [
|
||||
"var1"
|
||||
],
|
||||
"descriptions": [
|
||||
"A first variable."
|
||||
]
|
||||
},
|
||||
"rougail.var3": {
|
||||
"type": "variable",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "disabled",
|
||||
"annotation": "depends on an undocumented variable."
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Variables for "Rougail"
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **rougail.var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Default**: value |
|
||||
| **rougail.var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | A third variable.<br/>**Disabled**: depends on an undocumented variable. |
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
|
||||
[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 first variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mrougail.var3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m [1;3;7m [0m │ [1mDisabled[0m: depends on an undocumented │
|
||||
│ [1;3;7mdisabled [0m │ variable. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
== Variables for "Rougail"
|
||||
|
||||
[cols="1a,1a"]
|
||||
|====
|
||||
| Variable | Description
|
||||
|
|
||||
|
||||
**rougail.var1** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||
A first variable. +
|
||||
**Default**: value
|
||||
|
|
||||
|
||||
**rougail.var3** +
|
||||
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` `__disabled__` |
|
||||
A third variable. +
|
||||
**Disabled**: depends on an undocumented variable.
|
||||
|====
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"rougail": {
|
||||
"type": "namespace",
|
||||
"informations": {
|
||||
"paths": [
|
||||
"rougail"
|
||||
],
|
||||
"names": [
|
||||
"rougail"
|
||||
],
|
||||
"description": "Rougail",
|
||||
"properties": [
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
}
|
||||
]
|
||||
},
|
||||
"children": {
|
||||
"rougail.var1": {
|
||||
"type": "variable",
|
||||
"default": "value",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "standard"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var1"
|
||||
],
|
||||
"names": [
|
||||
"var1"
|
||||
],
|
||||
"descriptions": [
|
||||
"A first variable."
|
||||
]
|
||||
},
|
||||
"rougail.var3": {
|
||||
"type": "variable",
|
||||
"properties": [
|
||||
{
|
||||
"type": "type",
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"type": "mode",
|
||||
"name": "basic"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "mandatory"
|
||||
},
|
||||
{
|
||||
"type": "property",
|
||||
"name": "disabled",
|
||||
"annotation": "depends on an undocumented variable."
|
||||
}
|
||||
],
|
||||
"paths": [
|
||||
"rougail.var3"
|
||||
],
|
||||
"names": [
|
||||
"var3"
|
||||
],
|
||||
"descriptions": [
|
||||
"A third variable."
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Variables for "Rougail"
|
||||
|
||||
| Variable | Description |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **rougail.var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Default**: value |
|
||||
| **rougail.var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` *`disabled`* | A third variable.<br/>**Disabled**: depends on an undocumented variable. |
|
||||
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
|
||||
[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 first variable. │
|
||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
|
||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||
│ [1mrougail.var3[0m │ A third variable. │
|
||||
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m [1;3;7m [0m │ [1mDisabled[0m: depends on an undocumented │
|
||||
│ [1;3;7mdisabled [0m │ variable. │
|
||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var3: value
|
||||
```
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Example with mandatory variables not filled in
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var2: example
|
||||
```
|
||||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var2: example
|
||||
var3: value
|
||||
```
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Example with mandatory variables not filled in
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var3: example
|
||||
```
|
||||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var1: value
|
||||
var3: example
|
||||
```
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Example with mandatory variables not filled in
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var3: example
|
||||
```
|
||||
# Example with all variables modifiable
|
||||
|
||||
```yaml
|
||||
---
|
||||
rougail:
|
||||
var1: value
|
||||
var3: example
|
||||
```
|
||||
Loading…
Reference in a new issue