nrv.backend
Description
backend: code for IO, machine and classes handling
the backend sub-package is dedicated to handling the magic behind all NRV computations. The code developed here is not meant to be used directly by the end-user, but internally to develop new functionality or maintain other sub-packages.
Classes
|
A unique class to handle all the configuration |
|
Json encoding class, specific for NRV2 axon prevent from type error due to np.arrays solution taken as this from askpython.com |
|
|
|
Progess bar object compatible with MPI |
|
Class to handle parallel processing (cores, no threads) in NRV2 |
Instanciate a basic NRV class NRV Class are empty shells, defined as abstract classes of which every class in NRV should inherite. |
|
|
Results class for NRV |
|
|
|
Generic class for all NRV simulable classes ( |
Should be used as metaclass to define singleton classes |
|
A class for NRV parameters used to gather parameters |
Functions
|
this function chels wether or not a variable contains an iterrable |
|
return filename without extension |
|
Prevent overwriting existing files. |
|
create a folder with controled access rights. |
|
Add ".json" extension is missing at the end of the file name and check if it exists. |
|
save stuff as a json file |
|
Load stuff from a json file |
|
UNDER DEV |
|
|
|
check that the keys of a dictionnary are arguments of a function and return an updated dictionnary with only valide keys |
|
|
|
|
|
|
|
Rises and error to the log and to the prompt for the master process (process ID 0) in case of parallel computing. |
|
Rises a warning to the log and to the prompt for the master process (process ID 0) in case of parallel computing. |
|
Pass an info to the log and to the prompt for the master process (process ID 0) in case of parallel computing. |
|
Pass an info to the log and to the prompt for the master process (process ID 0) in case of parallel computing. |
|
Displays the progression on prompt, for single process only, nothing saved to the log |
|
outputs for debug, simple redirection to icecream without the installation (see icecream help). |
|
Clear lines of the prompt, to overwrite stuffs. |
synchronize all processes, used to wait saving complete before loading |
|
|
Check if the object x is a |
check if the object x is a list containing only |
|
check if the object x is a dictionary containing only |
|
|
Check if the object x is a dictionary of saved |
Check if the object x is a list of dictionary of saved |
|
Check if the object x is a dictionary containing dictionaries of saved |
|
Check if the object x is_NRV_dict, is_NRV_dict_list or is_NRV_dict_dict. |
|
check if the object x is an empty iterable |
|
|
loads any type of NRV object from a json file or a dictionary generated with NRV_class.save |
|
generate the proper results object depending of the obj simulated |
Check if the object x is a |
|
|
Check if the object x is a |
|
Decorator to restrict the processing on a signel core, always core 0 (master) |