Bases: NamedResultsCollectionModel
Model for handling results of monitors in TAR GZ and CSV formats.
Inherits from NamedResultsCollectionModel.
Attributes
-
remote_file_name: str
- Default:
'monitors.tar.gz'
-
local_file_name: str
- Default:
None
-
do_download: bool, optional
- Default:
None
-
local_storage: str, optional
- Default:
None
-
get_download_file_list_method: Callable, optional
- Default:
<function NamedResultsCollectionModel.<lambda> at 0x700d041027a0>
Properties
-
monitor_names
Get the list of monitor names.
- Returns:
List of monitor names.
- Return type:
list of str
-
names: List[str]
Get the list of result names.
- Returns:
List of result names.
- Return type:
list of str
Methods
-
download(to_file=None, to_folder='.', overwrite=False)[source]
Download the monitors TAR GZ file to the specified location.
- Parameters:
to_file (str, optional) – The name of the file after downloading.
to_folder (str, optional) – The folder where the file will be downloaded.
overwrite (bool, optional) – Flag indicating whether to overwrite existing files.
-
to_file(filename, overwrite=False)[source]
Save the TAR GZ file.
- Parameters:
filename (str) – The name of the file to save the TAR GZ data.
overwrite (bool, optional) – Flag indicating whether to overwrite existing files.
-
get_monitor_by_name(name)[source]
Get a monitor by name.
- Parameters:
name (str) – The name of the monitor.
- Returns:
The MonitorCSVModel corresponding to the given name.
- Return type:
MonitorCSVModel
- Raises:
Flow360ValueError – If the monitor with the provided name is not found.
-
get_result_by_name(name)
Get a result by name.
- Parameters:
name (str) – The name of the result.
- Returns:
The result model corresponding to the given name.
- Return type:
ResultCSVModel
- Raises:
Flow360ValueError – If the result with the provided name is not found.