write_json.py
Contains a class in order to write a ".json" metadata file.
WriteJson
Write a ".json" file with metadata.
Attributes
self.__json : dict
The grid on which to apply gaussian.
Source code in src/smiffer/utils/class_write_json.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
__init__(yaml_parser, argument, timing)
Initialize a dictionary that will be written as a ".json" file.
Parameters
yaml_parser : ParseYaml
A ParseYaml object already instantiated.
dict
A dictionary with metadata linked to input arguments.
dict
A dictionary with metadata linked to script time execution.
Source code in src/smiffer/utils/class_write_json.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
__str__()
Redefine the print() function behaviour in order to enhance
the object print readability.
Returns
str
The new message to print.
Source code in src/smiffer/utils/class_write_json.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
write(path, date, verbose=False)
Write the ".json".
Parameters
path : str
The path to write the ".json" file.
str
The launching time.
bool, optional
Use verbose mode or not. By default, set to False, so verbose
mode is disabled.
Source code in src/smiffer/utils/class_write_json.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |