Getting started

Installation

You can use the python installer and type the install command in your preferred terminal:

pip install rougail

a better way to install the Rougail library in to do this in a virtual environment:

python -m"venv' .venv

And, under linux or Mac:

./.venv/bin/activate

or, under windows:

.venv\Scripts\activate.exe

What is a consistency handling system ?

Question

Question: OK, I have understood that the Rougail library enables me to take advantage of the Tiramisu library. But what is all this for? What is exactly a consistency handling system? And again, what is this Tiramisu library homepage used for?

Answer: Well, now we explain what this Tiramisu library is, and how we are using it.

Tiramisu

Tiramisu is a consistency handling system that has initially been designed in the configuration management scope. To put it more simply, this library is generally used to handle configuration options.

It manages variables and group of variables. In the Tiramisu scope we call it options and option descriptions.

Here is the tiramisu documentation.

In the Rougail scope, we call it variables and families. In Rougail, the families and variables are located in the structure files.

The structure files

structure file

A structure file in the Rougail meaning is a YAML file that describes variables and their dependencies / consistencies. There can be a lot of structure files located in many different folders.

Rougail reads all the dictionaries and loads them into a single object that handles the variables consistency.

_images/schema.png

The main advantage is that declaring variables and writing consistency is as simple as writing YAML. With Rougail it is not necessary to write Tiramisu code any more. It simplifies a lot of things.

And rather than writing Tiramisu code, we can declare variables and describe the relationships between variables in a declarative style (that is, in a YAML file).

Once the structure files are loaded by Rougail, the Tiramisu configuration management tool can check the consistency of the variables between them.

The variables

Here is a structure file example with only a variable variable named proxy_mode A variable can be defined with no default value at all.

A Rougail dictionnary file with a variable named proxy_mode, with a description.
---
proxy_mode:
  description: Configure Proxy Access to the Internet

The same with a default value:

A Rougail dictionnary file with a variable named proxy_mode, with a default value.
---
proxy_mode:
  description: Configure Proxy Access to the Internet
  default: No proxy

variable

A variable is a declaration unit that represents a business domain metaphor, the most common example is that a variable that represents a configuration option in a application, but a variable represents something more that a configuration option. It provides a business domain specific representation unit.

Families of variables

family

A family is simply a container of variables and/ore some subfamilies.

Here how a YAML structure file with a family looks like:

A hello.yml structure sample file
 ---
 version: '1.1'
 world:
   description: Hello world family container
   name:
     description: Somebody to say hello
     default: rougail

Here, we have a family named world. This family contains a variable named name