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 |
|
ANSI escape sequences used to color terminal messages. |
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 |
|
Results container specialized for simulation outputs. |
|
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
check if the object x is an empty iterable |
|
|
convert an object _i into an 1D array of index |
|
Convert a list of kwargs into a str compatible with pandas.DataFrame.query |
|
convert a |
|
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 |
|
Set existing attributes of an object from a dictionary. |
|
check that the keys of a dictionnary are arguments of a function and return an updated dictionnary with only valide keys |
|
Return the source code corresponding to a callable. |
|
Placeholder converting a serialized function back to a callable. |
Create and configure the shared reporter used by NRV logging helpers. |
|
|
Update the reporter log level. |
|
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. |
|
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. |
|
|
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 |
|
Automatically set the number of cores for nmod, optim and gmsh based on the number of available cores and a threshold. |