fix: rougail separation
This commit is contained in:
parent
25dc2874b2
commit
706ddd369e
16 changed files with 327 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ from rougail.utils import undefined
|
||||||
from rougail.annotator.variable import Walk
|
from rougail.annotator.variable import Walk
|
||||||
|
|
||||||
from rougail.output_doc.i18n import _
|
from rougail.output_doc.i18n import _
|
||||||
from rougail.object_model import (
|
from rougail.convert.object_model import (
|
||||||
Calculation,
|
Calculation,
|
||||||
JinjaCalculation,
|
JinjaCalculation,
|
||||||
VariableCalculation,
|
VariableCalculation,
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ from re import compile
|
||||||
|
|
||||||
from tiramisu import Calculation, groups
|
from tiramisu import Calculation, groups
|
||||||
from tiramisu.error import ConfigError, display_list, PropertiesOptionError
|
from tiramisu.error import ConfigError, display_list, PropertiesOptionError
|
||||||
from rougail.error import display_xmlfiles
|
from rougail.tiramisu import display_xmlfiles, normalize_family
|
||||||
from rougail.object_model import PROPERTY_ATTRIBUTE
|
from rougail.convert.object_model import PROPERTY_ATTRIBUTE
|
||||||
from rougail.utils import normalize_family, undefined
|
from rougail.utils import undefined
|
||||||
|
|
||||||
from .config import OutPuts
|
from .config import OutPuts
|
||||||
from .i18n import _
|
from .i18n import _
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
[cols="1a,1a"]
|
||||||
|
|====
|
||||||
|
| Variable | Description
|
||||||
|
|
|
||||||
|
|
||||||
|
**var1** +
|
||||||
|
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
|
||||||
|
A first variable.
|
||||||
|
|
|
||||||
|
|
||||||
|
**var2** +
|
||||||
|
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||||
|
A second variable. +
|
||||||
|
**Default**: value
|
||||||
|
of
|
||||||
|
a
|
||||||
|
variable!.
|
||||||
|
|
|
||||||
|
|
||||||
|
**var3** +
|
||||||
|
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
|
||||||
|
A new variable.
|
||||||
|
|====
|
||||||
|
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
{
|
||||||
|
"var1": {
|
||||||
|
"type": "variable",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"type": "type",
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "mode",
|
||||||
|
"name": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "property",
|
||||||
|
"name": "mandatory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"var1"
|
||||||
|
],
|
||||||
|
"names": [
|
||||||
|
"var1"
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"A first variable."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"var2": {
|
||||||
|
"type": "variable",
|
||||||
|
"default": "value\nof\na\nvariable!.",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"type": "type",
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "mode",
|
||||||
|
"name": "standard"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "property",
|
||||||
|
"name": "mandatory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"var2"
|
||||||
|
],
|
||||||
|
"names": [
|
||||||
|
"var2"
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"A second variable."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"var3": {
|
||||||
|
"type": "variable",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"type": "type",
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "mode",
|
||||||
|
"name": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "property",
|
||||||
|
"name": "mandatory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"var3"
|
||||||
|
],
|
||||||
|
"names": [
|
||||||
|
"var3"
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"A new variable."
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
| Variable | Description |
|
||||||
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| **var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A first variable. |
|
||||||
|
| **var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A second variable.<br/>**Default**: value
|
||||||
|
of
|
||||||
|
a
|
||||||
|
variable!. |
|
||||||
|
| **var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A new variable. |
|
||||||
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||||
|
┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃
|
||||||
|
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||||
|
│ [1mvar1[0m │ A first variable. │
|
||||||
|
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m │ │
|
||||||
|
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||||
|
│ [1mvar2[0m │ A second variable. │
|
||||||
|
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
|
||||||
|
│ │ of │
|
||||||
|
│ │ a │
|
||||||
|
│ │ variable!. │
|
||||||
|
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||||
|
│ [1mvar3[0m │ A new variable. │
|
||||||
|
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m │ │
|
||||||
|
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
[]
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Example with mandatory variables not filled in
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
var1: example
|
||||||
|
var3: example
|
||||||
|
```
|
||||||
|
# Example with all variables modifiable
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
var1: example
|
||||||
|
var2: example
|
||||||
|
var3: example
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
[]
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
== Variables for "Rougail"
|
||||||
|
|
||||||
|
[cols="1a,1a"]
|
||||||
|
|====
|
||||||
|
| Variable | Description
|
||||||
|
|
|
||||||
|
|
||||||
|
**rougail.var1** +
|
||||||
|
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
|
||||||
|
A first variable.
|
||||||
|
|
|
||||||
|
|
||||||
|
**rougail.var2** +
|
||||||
|
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
|
||||||
|
A second variable. +
|
||||||
|
**Default**: value
|
||||||
|
of
|
||||||
|
a
|
||||||
|
variable!.
|
||||||
|
|
|
||||||
|
|
||||||
|
**rougail.var3** +
|
||||||
|
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `basic` `mandatory` |
|
||||||
|
A new variable.
|
||||||
|
|====
|
||||||
|
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
{
|
||||||
|
"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": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "property",
|
||||||
|
"name": "mandatory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"rougail.var1"
|
||||||
|
],
|
||||||
|
"names": [
|
||||||
|
"var1"
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"A first variable."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rougail.var2": {
|
||||||
|
"type": "variable",
|
||||||
|
"default": "value\nof\na\nvariable!.",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"type": "type",
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "mode",
|
||||||
|
"name": "standard"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "property",
|
||||||
|
"name": "mandatory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"rougail.var2"
|
||||||
|
],
|
||||||
|
"names": [
|
||||||
|
"var2"
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"A second variable."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rougail.var3": {
|
||||||
|
"type": "variable",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"type": "type",
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "mode",
|
||||||
|
"name": "basic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "property",
|
||||||
|
"name": "mandatory"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": [
|
||||||
|
"rougail.var3"
|
||||||
|
],
|
||||||
|
"names": [
|
||||||
|
"var3"
|
||||||
|
],
|
||||||
|
"descriptions": [
|
||||||
|
"A new variable."
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
# Variables for "Rougail"
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| **rougail.var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A first variable. |
|
||||||
|
| **rougail.var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A second variable.<br/>**Default**: value
|
||||||
|
of
|
||||||
|
a
|
||||||
|
variable!. |
|
||||||
|
| **rougail.var3**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | A new variable. |
|
||||||
|
|
||||||
|
|
@ -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 first variable. │
|
||||||
|
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m │ │
|
||||||
|
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||||
|
│ [1mrougail.var2[0m │ A second variable. │
|
||||||
|
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
|
||||||
|
│ │ of │
|
||||||
|
│ │ a │
|
||||||
|
│ │ variable!. │
|
||||||
|
├───────────────────────────────────────┼──────────────────────────────────────┤
|
||||||
|
│ [1mrougail.var3[0m │ A new variable. │
|
||||||
|
│ [1;7m string [0m [1;7m basic [0m [1;7m mandatory [0m │ │
|
||||||
|
└───────────────────────────────────────┴──────────────────────────────────────┘
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
[]
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Example with mandatory variables not filled in
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
rougail:
|
||||||
|
var1: example
|
||||||
|
var3: example
|
||||||
|
```
|
||||||
|
# Example with all variables modifiable
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
rougail:
|
||||||
|
var1: example
|
||||||
|
var2: example
|
||||||
|
var3: example
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
[]
|
||||||
Loading…
Reference in a new issue