fix: rougail separation

This commit is contained in:
egarette@silique.fr 2025-06-18 07:42:33 +03:00
parent 25dc2874b2
commit 706ddd369e
16 changed files with 327 additions and 4 deletions

View file

@ -25,7 +25,7 @@ from rougail.utils import undefined
from rougail.annotator.variable import Walk
from rougail.output_doc.i18n import _
from rougail.object_model import (
from rougail.convert.object_model import (
Calculation,
JinjaCalculation,
VariableCalculation,

View file

@ -23,9 +23,9 @@ from re import compile
from tiramisu import Calculation, groups
from tiramisu.error import ConfigError, display_list, PropertiesOptionError
from rougail.error import display_xmlfiles
from rougail.object_model import PROPERTY_ATTRIBUTE
from rougail.utils import normalize_family, undefined
from rougail.tiramisu import display_xmlfiles, normalize_family
from rougail.convert.object_model import PROPERTY_ATTRIBUTE
from rougail.utils import undefined
from .config import OutPuts
from .i18n import _

View file

@ -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.
|====

View file

@ -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."
]
}
}

View file

@ -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. |

View file

@ -0,0 +1,15 @@
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
var1 │ A first variable. │
 string   basic   mandatory  │ │
├───────────────────────────────────────┼──────────────────────────────────────┤
var2 │ A second variable. │
 string   standard   mandatory  │ Default: value │
│ │ of │
│ │ a │
│ │ variable!. │
├───────────────────────────────────────┼──────────────────────────────────────┤
var3 │ A new variable. │
 string   basic   mandatory  │ │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -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
```

View file

@ -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.
|====

View file

@ -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."
]
}
}
}
}

View file

@ -0,0 +1,11 @@
# 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; | 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; |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **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. |

View file

@ -0,0 +1,20 @@
Variables for "Rougail"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
rougail.var1 │ A first variable. │
 string   basic   mandatory  │ │
├───────────────────────────────────────┼──────────────────────────────────────┤
rougail.var2 │ A second variable. │
 string   standard   mandatory  │ Default: value │
│ │ of │
│ │ a │
│ │ variable!. │
├───────────────────────────────────────┼──────────────────────────────────────┤
rougail.var3 │ A new variable. │
 string   basic   mandatory  │ │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -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
```