Compare commits
No commits in common. "f911425e1a9d2402fdf12c3caa8066e88f6b7c9d" and "2886cf0348109bb2363da75169d6a74e8a67d6b2" have entirely different histories.
f911425e1a
...
2886cf0348
21 changed files with 6 additions and 317 deletions
|
|
@ -1,9 +1,3 @@
|
||||||
## 0.2.0a18 (2025-05-05)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- doc default value with undocumented variable
|
|
||||||
|
|
||||||
## 0.2.0a17 (2025-05-05)
|
## 0.2.0a17 (2025-05-05)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_doc"
|
name = "rougail.output_doc"
|
||||||
version = "0.2.0a18"
|
version = "0.2.0a17"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail output doc"
|
description = "Rougail output doc"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.2.0a18"
|
__version__ = "0.2.0a17"
|
||||||
|
|
|
||||||
|
|
@ -670,13 +670,7 @@ class RougailOutputDoc(Examples):
|
||||||
# true_msg = _("depends on an undocumented variable")
|
# true_msg = _("depends on an undocumented variable")
|
||||||
else:
|
else:
|
||||||
if uncalculated and not isinstance(uncalculated, Calculation):
|
if uncalculated and not isinstance(uncalculated, Calculation):
|
||||||
if isinstance(uncalculated, list):
|
true_msg = _('{0} (from an undocumented variable)').format(uncalculated)
|
||||||
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)
|
|
||||||
else:
|
else:
|
||||||
true_msg = _("depends on an undocumented variable")
|
true_msg = _("depends on an undocumented variable")
|
||||||
if true_msg:
|
if true_msg:
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ class Formater(CommonFormater):
|
||||||
def list(
|
def list(
|
||||||
self,
|
self,
|
||||||
choices,
|
choices,
|
||||||
) -> str:
|
):
|
||||||
"""Display a liste of element"""
|
"""Display a liste of element"""
|
||||||
char = f"{self.enter_table}- "
|
char = f"{self.enter_table}- "
|
||||||
ret = ""
|
ret = ""
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,3 @@ class Formater:
|
||||||
|
|
||||||
def to_phrase(self, text: str) -> str:
|
def to_phrase(self, text: str) -> str:
|
||||||
return to_phrase(text)
|
return to_phrase(text)
|
||||||
|
|
||||||
def list(self, lst: list) -> list:
|
|
||||||
return lst
|
|
||||||
|
|
|
||||||
|
|
@ -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).
|
|
||||||
|====
|
|
||||||
|
|
||||||
|
|
@ -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."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
# 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/>**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). |
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
[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 │ [1mDefault[0m: │
|
|
||||||
│ [1;7mmultiple [0m │ - val1 │
|
|
||||||
│ │ - val2 │
|
|
||||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
|
||||||
│ [1mrougail.var2[0m │ A variable calculated. │
|
|
||||||
│ [1;7m boolean [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: true (from an undocumented │
|
|
||||||
│ │ variable). │
|
|
||||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
|
||||||
|
|
@ -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.
|
|
||||||
|====
|
|
||||||
|
|
||||||
|
|
@ -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."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
# 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/>**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. |
|
|
||||||
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
[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 │ [1mDefault[0m: │
|
|
||||||
│ [1;7mmultiple [0m │ - val1 │
|
|
||||||
│ │ - val2 │
|
|
||||||
├───────────────────────────────────────┼──────────────────────────────────────┤
|
|
||||||
│ [1mrougail.var2[0m │ A variable calculated. │
|
|
||||||
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: (from an undocumented │
|
|
||||||
│ [1;7munique [0m [1;7m multiple [0m │ variable) │
|
|
||||||
│ │ - a value │
|
|
||||||
│ │ - a second value. │
|
|
||||||
└───────────────────────────────────────┴──────────────────────────────────────┘
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
# Example with all variables modifiable
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
rougail:
|
|
||||||
var1:
|
|
||||||
- val1
|
|
||||||
- val2
|
|
||||||
var2: true
|
|
||||||
```
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
# Example with all variables modifiable
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
---
|
|
||||||
rougail:
|
|
||||||
var1:
|
|
||||||
- val1
|
|
||||||
- val2
|
|
||||||
var2:
|
|
||||||
- a value
|
|
||||||
- a second value
|
|
||||||
```
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
[]
|
|
||||||
|
|
@ -20,7 +20,8 @@ excludes = [
|
||||||
]
|
]
|
||||||
|
|
||||||
test_ok = get_structures_list(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'
|
os.environ['COLUMNS'] = '80'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue