Compare commits

..

No commits in common. "f911425e1a9d2402fdf12c3caa8066e88f6b7c9d" and "2886cf0348109bb2363da75169d6a74e8a67d6b2" have entirely different histories.

21 changed files with 6 additions and 317 deletions

View file

@ -1,9 +1,3 @@
## 0.2.0a18 (2025-05-05)
### Fix
- doc default value with undocumented variable
## 0.2.0a17 (2025-05-05)
### Fix

View file

@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
[project]
name = "rougail.output_doc"
version = "0.2.0a18"
version = "0.2.0a17"
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
readme = "README.md"
description = "Rougail output doc"

View file

@ -1 +1 @@
__version__ = "0.2.0a18"
__version__ = "0.2.0a17"

View file

@ -670,13 +670,7 @@ class RougailOutputDoc(Examples):
# true_msg = _("depends on an undocumented variable")
else:
if uncalculated and not isinstance(uncalculated, Calculation):
if isinstance(uncalculated, list):
uncalculated = self.formater.list(uncalculated)
true_msg = _('(from an undocumented variable){0}').format(uncalculated)
else:
if not isinstance(uncalculated, str):
uncalculated = dump(uncalculated)
true_msg = _('{0} (from an undocumented variable)').format(uncalculated)
true_msg = _('{0} (from an undocumented variable)').format(uncalculated)
else:
true_msg = _("depends on an undocumented variable")
if true_msg:

View file

@ -93,7 +93,7 @@ class Formater(CommonFormater):
def list(
self,
choices,
) -> str:
):
"""Display a liste of element"""
char = f"{self.enter_table}- "
ret = ""

View file

@ -41,6 +41,3 @@ class Formater:
def to_phrase(self, text: str) -> str:
return to_phrase(text)
def list(self, lst: list) -> list:
return lst

View file

@ -1,22 +0,0 @@
== 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. +
**Default**:
* val1
* val2
|
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[boolean]` `standard` `mandatory` |
A variable calculated. +
**Default**: true (from an undocumented variable).
|====

View file

@ -1,83 +0,0 @@
{
"rougail": {
"type": "namespace",
"informations": {
"paths": [
"rougail"
],
"names": [
"rougail"
],
"description": "Rougail",
"properties": [
{
"type": "mode",
"name": "standard"
}
]
},
"children": {
"rougail.var1": {
"type": "variable",
"default": [
"val1",
"val2"
],
"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."
]
},
"rougail.var2": {
"type": "variable",
"default": "true (from an undocumented variable).",
"properties": [
{
"type": "type",
"name": "boolean"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "mandatory"
}
],
"paths": [
"rougail.var2"
],
"names": [
"var2"
],
"descriptions": [
"A variable calculated."
]
}
}
}
}

View file

@ -1,7 +0,0 @@
# 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/>**Default**: <br/>- val1<br/>- val2 |
| **rougail.var2**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.<br/>**Default**: true (from an undocumented variable). |

View file

@ -1,17 +0,0 @@
Variables for "Rougail"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
rougail.var1 │ A suffix variable. │
 string   standard   unique    │ Default: │
multiple  │ - val1 │
│ │ - val2 │
├───────────────────────────────────────┼──────────────────────────────────────┤
rougail.var2 │ A variable calculated. │
 boolean   standard   mandatory  │ Default: true (from an undocumented │
│ │ variable). │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

@ -1,25 +0,0 @@
== 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. +
**Default**:
* val1
* val2
|
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
A variable calculated. +
**Default**: (from an undocumented variable)
* a value
* a second value.
|====

View file

@ -1,91 +0,0 @@
{
"rougail": {
"type": "namespace",
"informations": {
"paths": [
"rougail"
],
"names": [
"rougail"
],
"description": "Rougail",
"properties": [
{
"type": "mode",
"name": "standard"
}
]
},
"children": {
"rougail.var1": {
"type": "variable",
"default": [
"val1",
"val2"
],
"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."
]
},
"rougail.var2": {
"type": "variable",
"default": "(from an undocumented variable)['a value', 'a second value'].",
"properties": [
{
"type": "type",
"name": "string"
},
{
"type": "mode",
"name": "standard"
},
{
"type": "property",
"name": "mandatory"
},
{
"type": "property",
"name": "unique"
},
{
"type": "multiple",
"name": "multiple"
}
],
"paths": [
"rougail.var2"
],
"names": [
"var2"
],
"descriptions": [
"A variable calculated."
]
}
}
}
}

View file

@ -1,7 +0,0 @@
# 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;&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;&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/>**Default**: <br/>- val1<br/>- val2 |
| **rougail.var2**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A variable calculated.<br/>**Default**: (from an undocumented variable)<br/>- a value<br/>- a second value. |

View file

@ -1,19 +0,0 @@
Variables for "Rougail"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
rougail.var1 │ A suffix variable. │
 string   standard   unique    │ Default: │
multiple  │ - val1 │
│ │ - val2 │
├───────────────────────────────────────┼──────────────────────────────────────┤
rougail.var2 │ A variable calculated. │
 string   standard   mandatory    │ Default: (from an undocumented │
unique   multiple  │ variable)
│ │ - a value │
│ │ - a second value. │
└───────────────────────────────────────┴──────────────────────────────────────┘

View file

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

View file

@ -1,12 +0,0 @@
# Example with all variables modifiable
```yaml
---
rougail:
var1:
- val1
- val2
var2:
- a value
- a second value
```

View file

@ -20,7 +20,8 @@ excludes = [
]
test_ok = get_structures_list(excludes)
# test_ok = [HERE.parent.parent / "rougail-tests" / "structures" / "60_5family_dynamic_calc_suffix_hidden"]
# test_ok = [Path('../rougail-tests/structures/04_5validators')]
os.environ['COLUMNS'] = '80'