From 3a32dd15af8ce754ea3d91e0fdbb1b0b8aa33c47 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 13 Jun 2026 17:43:51 +0200 Subject: [PATCH] doc(practice2) --- docs/tutorial/calculated.rst | 2 +- docs/tutorial/choice.rst | 2 ++ docs/tutorial/dynamic.rst | 4 ++-- docs/tutorial/index.rst | 1 + docs/tutorial/practice1.rst | 29 +++++++++++++++++------------ docs/tutorial/properties.rst | 2 ++ docs/tutorial/types.rst | 2 +- docs/tutorial/webaddress.rst | 2 ++ 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/docs/tutorial/calculated.rst b/docs/tutorial/calculated.rst index 95f6837f8..47fb76dc1 100644 --- a/docs/tutorial/calculated.rst +++ b/docs/tutorial/calculated.rst @@ -46,7 +46,7 @@ the :file:`10-manual.yml` and the :file:`20-manual.yml` structure file: We will continue to complete the :file:`20-manual.yml` structure file, with variables entirely equivalent to those found in the `http_proxy` family from the :file:`10-manual.yml` structure file. -Until now, we only had the `use_for_https` :ref:`boolean variable in this structure file `. +Until now, we only had the `use_for_https` :ref:`boolean variable in this structure file `. Now we are going to define an address and a port in the `https_proxy` family: .. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_040/firefox/20-manual.yml diff --git a/docs/tutorial/choice.rst b/docs/tutorial/choice.rst index 506b8fd6e..459e930a7 100644 --- a/docs/tutorial/choice.rst +++ b/docs/tutorial/choice.rst @@ -1,3 +1,5 @@ +.. _tutorial_choice: + A variable with possible values ================================== diff --git a/docs/tutorial/dynamic.rst b/docs/tutorial/dynamic.rst index 8a7409db1..3809c2a19 100644 --- a/docs/tutorial/dynamic.rst +++ b/docs/tutorial/dynamic.rst @@ -1,4 +1,4 @@ -.. _dynamic: +.. _tutorial_dynamic: A dynamically built family ========================== @@ -140,7 +140,7 @@ that allow us to define dynamically family names. identifier - In the :ref:`dynamically built family creation field ` we call an identifier + In the :ref:`dynamically built family creation field ` we call an identifier an item that defines a family name. An item is a variable on which an iteration on keywords will be carried out. diff --git a/docs/tutorial/index.rst b/docs/tutorial/index.rst index 64c995a8e..e2bdf9d06 100644 --- a/docs/tutorial/index.rst +++ b/docs/tutorial/index.rst @@ -61,6 +61,7 @@ Let's dive into this **configuration options validation** use case. multiple document practice1 + practice2 validators namespace sequence diff --git a/docs/tutorial/practice1.rst b/docs/tutorial/practice1.rst index cfe0202aa..2a455e440 100644 --- a/docs/tutorial/practice1.rst +++ b/docs/tutorial/practice1.rst @@ -17,11 +17,11 @@ Practice The best for you is to do this job on your own and compare your work to our propositions. -Here are the two variables in the firefox configuration's widget: +Here are the two variables in the Firefox configuration's widget: .. image:: images/practice_twovars.png -These two variables are highlighted here in the lower part of the firefox configuration's widget: +These two variables are highlighted here in the lower part of the Firefox configuration's widget: .. image:: images/firefox130.png @@ -57,7 +57,7 @@ What do we want to be implemented - define an appropriate variable name, have a look at our :ref:`variable naming convention ` - the Firefox description is in negative mode, which is not a good practice for us, we rewrite it in positive mode - the variable is a boolean with the default value `true` (the opposite of unchecked option) - - the variable is available for all proxy mode choice by user, so disable it only when the `proxy mode` is "No proxy". + - the variable is available for all proxy mode choice by user, so disable it only when the `proxy mode` is "No proxy" Our solution ''''''''''''''''''''''''''''''' @@ -71,9 +71,9 @@ Please unroll the "Solution" widget to see our solution: :caption: The :file:`firefox/50-prompt_authentication.yml` a conditional disabled boolean variable - Here we choosed to name the new structure file `firefox/50-prompt_authentication.yml`, - the file containing the `prompt_authentication` variable definition, - - this variable is true by default, - - this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"`. + the file containing the `prompt_authentication` variable definition + - this variable is `true` by default + - this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"` .. %YAML 1.2 @@ -100,9 +100,9 @@ What do we want to be implemented - the choice of a file name that respect the :ref:`file naming and organizing convention ` - define an appropriate variable name, have a look at our :ref:`variable naming convention ` - - the `description` parameter will be the Firefox description, - - the variable is a boolean with the default value `false` (unchecked option), - - the variable is only available with the `"Manual proxy configuration"` proxy mode and when the proxy socks version is not v4. + - the `description` parameter will be the Firefox description + - the variable is a boolean with the default value `false` (unchecked option) + - the variable is only available with the `"Manual proxy configuration"` proxy mode and when the proxy socks version is not v4 Our solution @@ -110,18 +110,23 @@ Our solution .. type-along:: For those who follow the tutorial with the help of the git repository - Now you need to checkout the :tutorial:`v1.1_132 ` version:: + Now you need to checkout the :tutorial:`v1.1_131 ` version:: - git switch --detach v1.1_132 + git switch --detach v1.1_131 Please unroll the "Solution" widget to see our solution: .. solution:: Solution - .. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_132/firefox/55-proxy_dns_socks5.yml + .. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_131/firefox/55-proxy_dns_socks5.yml :language: yaml :caption: The :file:`firefox/55-proxy_dns_socks5.yml` a Jinja conditional disabled boolean variable + - Here we choosed to name the new structure file `firefox/55-proxy_dns_socks5.yml`, + the file containing the `proxy_dns_socks5` variable definition + - this variable is `false` by default + - this variable shall be :term:`disabled` if the `proxy_mode` variable is not set to `"Manual proxy configuration"` and Socks version is `v4`. + .. %YAML 1.2 --- diff --git a/docs/tutorial/properties.rst b/docs/tutorial/properties.rst index f1d69f0e0..703614c99 100644 --- a/docs/tutorial/properties.rst +++ b/docs/tutorial/properties.rst @@ -45,6 +45,8 @@ Let's begin with defining what a property is: of a family, a subfamily or a variable. These properties change the usual behavior of a variable or family. +.. _tutorial_disabled: + A disabled family ------------------ diff --git a/docs/tutorial/types.rst b/docs/tutorial/types.rst index cfc6decb7..14250f57d 100644 --- a/docs/tutorial/types.rst +++ b/docs/tutorial/types.rst @@ -374,7 +374,7 @@ And we have this output: We observe that, as with the `domainname` type, a number of validations are performed to ensure that the value assigned to this variable conforms to the `port` type. -.. _boolean_variable: +.. _tutorial_boolean_variable: A variable with type `boolean` ----------------------------------- diff --git a/docs/tutorial/webaddress.rst b/docs/tutorial/webaddress.rst index 8eedc47a9..576e736d1 100644 --- a/docs/tutorial/webaddress.rst +++ b/docs/tutorial/webaddress.rst @@ -1,3 +1,5 @@ +.. _tutorial_web_address: + A `web_address` variable ================================