Compare commits
2 commits
c733743048
...
215827f288
| Author | SHA1 | Date | |
|---|---|---|---|
| 215827f288 | |||
| 335e971aea |
4 changed files with 46 additions and 19 deletions
|
|
@ -18,7 +18,7 @@ The values of the variables must be individually of good quality.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:titlesonly:
|
||||||
|
|
||||||
typing
|
typing
|
||||||
variable_validation
|
variable_validation
|
||||||
|
|
||||||
|
|
@ -27,13 +27,24 @@ Access control
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:titlesonly:
|
||||||
|
|
||||||
mode
|
mode
|
||||||
variable_properties
|
variable_properties
|
||||||
|
|
||||||
Overall coherence
|
Overall coherence
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
.. glossary::
|
||||||
|
|
||||||
|
conherence
|
||||||
|
|
||||||
|
An isolated variable can be considered to be of quality
|
||||||
|
but become inconsistent depending on the context.
|
||||||
|
|
||||||
|
Overall coherence is initially managed by personalized validators
|
||||||
|
which will validate the value of a variable in relation to others.
|
||||||
|
But it also depends on the availability of the variable depending on the context.
|
||||||
|
|
||||||
|
|
||||||
Consistency
|
Consistency
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
@ -42,20 +53,12 @@ Consistency
|
||||||
|
|
||||||
consistency
|
consistency
|
||||||
|
|
||||||
Consistency corresponds to what current market tools offer;
|
Consistency corresponds to what current market tools offer;
|
||||||
first it is a typed base validation, and then it is a schema-based validation.
|
first it is a typed base validation, and then it is a schema-based validation.
|
||||||
|
|
||||||
For example, if a minimum value and then a maximum value are requested,
|
For example, if a minimum value and then a maximum value are requested,
|
||||||
the minimum must be lesser than the maximum.
|
the minimum must be lesser than the maximum.
|
||||||
|
|
||||||
conherence
|
|
||||||
|
|
||||||
An isolated variable can be considered to be of quality
|
|
||||||
but become inconsistent depending on the context.
|
|
||||||
|
|
||||||
Overall coherence is initially managed by personalized validators
|
|
||||||
which will validate the value of a variable in relation to others.
|
|
||||||
|
|
||||||
Context access control
|
Context access control
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ Variable with multiple values
|
||||||
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git
|
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git
|
||||||
git switch --detach v1.1_110
|
git switch --detach v1.1_110
|
||||||
|
|
||||||
|
.. _tutorial_not_mandatory_list:
|
||||||
|
|
||||||
A conditional disabled non mandatory variable with type domainname and parameters
|
A conditional disabled non mandatory variable with type domainname and parameters
|
||||||
-----------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -101,6 +103,14 @@ We then have this output:
|
||||||
|
|
||||||
We can see the address for which proxy will be desactivated in the output.
|
We can see the address for which proxy will be desactivated in the output.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
We had said that a variable with a mandatory parameter set to false was a :ref:`nullable variable <tutorial_nullable>`.
|
||||||
|
This is true only for a non :term:`multi` variable.
|
||||||
|
|
||||||
|
The value of a :term:`multi` variable which is not :term:`mandatory` will allow the empty list `[]`.
|
||||||
|
The :term:`mandatory` properties does not means that the `null` value is acceptable (that is the `empty` properties).
|
||||||
|
|
||||||
A variable with multiple values
|
A variable with multiple values
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
|
@ -218,10 +228,6 @@ Now we have this output:
|
||||||
|
|
||||||
A multi is a multiple variable, that is a variable that can have multiple values.
|
A multi is a multiple variable, that is a variable that can have multiple values.
|
||||||
|
|
||||||
.. note:: Note that the value of a :term:`multi` variable which has no default value set and which is not :term:`mandatory`
|
|
||||||
will be the empty list `[]`
|
|
||||||
The :term:`mandatory` properties does not means that the `null` value is acceptable (that is the `empty` properties).
|
|
||||||
|
|
||||||
.. keypoints:: Key points
|
.. keypoints:: Key points
|
||||||
|
|
||||||
We have now some kind of a container facility named `multi`, that can be applied
|
We have now some kind of a container facility named `multi`, that can be applied
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _tutorial_nullable:
|
||||||
|
|
||||||
Nullable variable
|
Nullable variable
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,24 @@ Here is the structure file associated with this use case:
|
||||||
Unsurprisingly, the way to assign the `sequence` type is done with the help of the `type` parameter.
|
Unsurprisingly, the way to assign the `sequence` type is done with the help of the `type` parameter.
|
||||||
We see here that `proxies` is a family because it contains the variables `title` and `color`.
|
We see here that `proxies` is a family because it contains the variables `title` and `color`.
|
||||||
|
|
||||||
The :term:`sequence` type ensures that in the `proxies` family, if a proxy type is specified, then an associated color will also be specified.
|
There is nothing new to say to this two variable:
|
||||||
Let's launch the Rougail CLI on this structured data:
|
|
||||||
|
- `title` is not mandatory string
|
||||||
|
- `color` is just a string
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The first variable of the :term:`sequence` is not mandatory.
|
||||||
|
This does not mean that the variable is :ref:`tutorial_nullable` or that the :ref:`list is empty <tutorial_not_mandatory_list>`.
|
||||||
|
In this case, that means that the sequence is empty.
|
||||||
|
|
||||||
|
Which we could write in JSON like this:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
[]
|
||||||
|
|
||||||
|
Now configure the sequence:
|
||||||
|
|
||||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/02/config.yml
|
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/02/config.yml
|
||||||
:language: yaml
|
:language: yaml
|
||||||
|
|
@ -214,7 +230,7 @@ and which contain the same number of elements:
|
||||||
Sequence.
|
Sequence.
|
||||||
We saw a :term:`sequence` type family, which full name is :ref:`Sequence of homogeneous elements <sequence_family>`.
|
We saw a :term:`sequence` type family, which full name is :ref:`Sequence of homogeneous elements <sequence_family>`.
|
||||||
|
|
||||||
**comments**
|
**Comments**
|
||||||
|
|
||||||
What is remarkable here is that we are dealing with a new form of :term:`consistency`
|
What is remarkable here is that we are dealing with a new form of :term:`consistency`
|
||||||
which focuses on variables that are similar within a family,
|
which focuses on variables that are similar within a family,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue