Salome HOME
sat #17766 et sat #17848 : traitement des modules par ordre de dépendance, correction...
[tools/sat.git] / doc / src / configuration.rst
1 *************
2 Configuration
3 *************
4
5 *salomeTools* uses files with **.pyconf** extension to store its configuration parameters.
6 These pyconf configuration files are provided by the salomeTool projects that are set by sat init command.
7
8 When executing a command, sat will load several configuration files in a specific order.
9 When all the files are loaded a *config* object is created.
10 Then, this object is passed to all command scripts.
11
12
13 Syntax
14 ======
15 The configuration files use a python-like structure format 
16 (see `config module <http://www.red-dove.com/config-doc/>`_ for a complete description).
17
18 * **{}** define a dictionary,
19 * **[]** define a list,
20 * **@** can be used to include a file,
21 * **$prefix** reference to another parameter (ex: ``$PRODUCT.name``),
22 * **#** comments.
23
24 .. note:: in this documentation a reference to a configuration parameter will be noted ``XXX.YYY``.
25
26 Description
27 ===========
28
29 .. _VARS-Section:
30
31 VARS section
32 -------------
33 | This section is dynamically created by salomeTools at run time.
34 | It contains information about the environment: date, time, OS, architecture etc. 
35
36 ::
37
38     # to get the current setting
39     sat config --value VARS
40
41 APPLICATION section
42 ------------------
43 | This section is defined in the application pyconf file.
44 | It contains instructions on how to build a version of SALOME (list of products and versions, compilation options, etc.)
45
46 :: 
47
48     # to get the current setting
49     sat config SALOME-xx --value APPLICATION
50
51
52 Globals
53
54   * name : the name of the application
55   * workdir : the directory in which the application is produced
56   * tag : the default tag to use for the git bases
57   * dev : activate the dev mode. in dev mode git bases are checked out only one time, to avoid risks of removing developments.
58   * verbose : activate verbosity in the compilation
59   * debug : activate debug mode in the compilation, i.e -g option
60   * python3 : 'yes/no' tell sat that the application uses python3 
61   * no_base : 'yes/no' 
62   * base : 'yes/no/name'
63
64
65 PRODUCTS section
66 ---------------------
67 | This section contains all the information required to build the products contained in the application.
68 | It is build from the products configuration files.
69
70 :: 
71
72     # to get the current setting
73     sat config SALOME-xx --value PRODUCT
74
75
76 .. _USER-Section:
77
78 USER section
79 --------------
80 This section is defined by the user configuration file, 
81 ``~/.salomeTools/SAT.pyconf``.
82
83 The ``USER`` section defines some parameters (not exhaustive):
84
85 * **pdf_viewer** : the pdf viewer used to read pdf documentation 
86
87 * **browser** : The web browser to use (*firefox*). 
88
89 * **editor** : The editor to use (*vi, pluma*). 
90
91 * and other user preferences. 
92
93 :: 
94
95     # to get the current setting
96     sat config SALOME-xx --value USER
97
98     # to edit your personal configuration file
99     sat config -e
100
101
102 Other sections
103 --------------
104
105 * **PROJECTs** : This section contains the configuration of the projects loaded in salomeTool by sat init --add_project command. 
106 * **PATHS** : This section contains paths used by saloeTools.
107 * **LOCAL** : contains information relative to the local installation of salomeTool.
108 * **INTERNAL** : contains internal salomeTool information
109
110 All these sections can be printed with sat config command:
111
112 ::
113
114     # It is possible to use sat completion mode to print available sections.
115     sat config SALOME-xx --value <TAB> <TAB>
116     > APPLICATION.       INTERNAL.          LOCAL.             PATHS. 
117     > PRODUCTS.          PROJECTS.          USER.              VARS.
118
119     # get paths used by sat
120     sat config SALOME-xx --value PATHS
121
122 It is possible to use sat completion mode to print available sections.