From 0e6e008b234c8bfcc3cf0b8b23cdd0c7d8c93cd0 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Fri, 5 Jun 2015 09:50:24 +0200 Subject: [PATCH] Add doc --- doc/code_architecture/Script.md | 42 +++++++++++++++++++ scripts/module/module_handler.py | 3 +- ..._create_module.py => qp_install_module.py} | 8 +++- 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 doc/code_architecture/Script.md rename scripts/module/{qp_create_module.py => qp_install_module.py} (92%) diff --git a/doc/code_architecture/Script.md b/doc/code_architecture/Script.md new file mode 100644 index 00000000..b5c19dcd --- /dev/null +++ b/doc/code_architecture/Script.md @@ -0,0 +1,42 @@ +# `ei_handler.py` + +This script in located in `$QPACKAGE_ROOT/scripts/ezfio_interface/`. +It provide all the resource need to deal with the `EZFIO.cfg` files : + - The creation of `$MODULE_LOWER_ezfio_config` in `$QPACKAGE_ROOT/ezfio/config` + - The `ezfio_interface.irp.f` who containt all the provider associate (in `$MODULE/`) + - The `$MODULE_LOWER_ezfio_defaults` in `$QPACKAGE_ROOT/data/` + - The `Input_$MODULE_LOWER.ml` for the *qp_edit* + +For more information you can type `ei_handler.py -h` + +# `module_handler.py` + +This script in located in `$QPACKAGE_ROOT/scripts/module/`. +It provide all the resource related to the tree dependancy of the modules. +If more useful as a librairy than a cli. + +It have some usefull property: + - The list of module + - The dict of the descendant + - The dict of the parent + - The dict of the child + - The dict of the root + - The list reduced tree (For a list of module in input return only the root) + +In the cli mode: + - From a `NEEDED_CHILDREN_MODULE` file you can have all the descendant, and a png + representation who correspond. + + +# `qp_install_module.py` +This script is located in `$QPACKAGE_ROOT/scripts/module/`. + +It is usefull when you need to install a new module. (From the soon to come repo or from scratch). + +# `qp_create_ninja.py` + +This script is located in `$QPACKAGE_ROOT/scripts/compilation/`. +It will create the `build.ninja` file. It will use intersifly the `module_handler.py` module. + +To read all the flag for the compilation the module `read_compilation_cfg.py` is used. +You only need to know, that all flag are appending. diff --git a/scripts/module/module_handler.py b/scripts/module/module_handler.py index f4ff006e..6e9f0ba7 100755 --- a/scripts/module/module_handler.py +++ b/scripts/module/module_handler.py @@ -8,7 +8,6 @@ of a NEEDED_CHILDREN_MODULES file Usage: module_handler.py print_descendant [] module_handler.py create_png [] - module_handler.py head_module Options: print_descendant Print the genealogy of the NEEDED_CHILDREN_MODULES @@ -140,7 +139,7 @@ class ModuleHandler: @classmethod def l_reduce_tree(cls, l_module): - + """For a list of module in input return only the root""" l_d_u = cls.l_descendant_unique(l_module) l_module_reduce = [] for module in l_module: diff --git a/scripts/module/qp_create_module.py b/scripts/module/qp_install_module.py similarity index 92% rename from scripts/module/qp_create_module.py rename to scripts/module/qp_install_module.py index 923d88cd..11e8d7ea 100755 --- a/scripts/module/qp_create_module.py +++ b/scripts/module/qp_install_module.py @@ -1,8 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- """ -Usage: qp_create_module.py list - qp_create_module.py create -n [...] +Usage: qp_install_module.py list + qp_install_module.py create -n [...] + +Options: + list: List all the module avalaible + create: Create a new module """ import sys