From 833b144c3465e33e05720a87975ab5aaf70d6754 Mon Sep 17 00:00:00 2001 From: Georges Da Costa <dacosta@irit.fr> Date: Wed, 11 May 2022 21:37:43 +0200 Subject: [PATCH] Revert the name for list to host instead of host.cluster... --- expetator/bundle.py | 1 + expetator/monitoring_list.py | 3 ++- expetator/remove_watermark.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/expetator/bundle.py b/expetator/bundle.py index 3cb2b16..e283767 100644 --- a/expetator/bundle.py +++ b/expetator/bundle.py @@ -2,6 +2,7 @@ import pandas as pd import numpy as np import json import os +import zipfile def init_bundle(bundlename): 'Reads an experiment file' diff --git a/expetator/monitoring_list.py b/expetator/monitoring_list.py index 6325dfa..697660b 100644 --- a/expetator/monitoring_list.py +++ b/expetator/monitoring_list.py @@ -17,7 +17,7 @@ def read_run_list(prefix, hostname, startTime, basename, fullname, hostlist=None raw_data = json.loads(file_id.read()) data = {host:(timestamp, values) for (host, timestamp, values) in raw_data} - + for host in hostlist.split(';'): name, _ = host.split('.', maxsplit=1) df = pd.DataFrame(list(data[name])).transpose() @@ -44,6 +44,7 @@ def write_run_list(prefix, hostname, startTime, basename, fullname, hostlist, da res = [] for index, host in enumerate(hosts): + host = host.split('.')[0] tmp = [host, list(data[index]['#timestamp']), list(data[index][prefix])] res.append(tmp) diff --git a/expetator/remove_watermark.py b/expetator/remove_watermark.py index de28e53..3a485ff 100644 --- a/expetator/remove_watermark.py +++ b/expetator/remove_watermark.py @@ -21,6 +21,8 @@ def remove_watermark(target_file, target_dir): power_cleaned = None watermark.remove_wt_name(bundle_data) + if target_file.endswith('.zip'): + target_file = target_file[:-4] bundle.save_bundle(target_file, bundle_data, target_dir) if not moj_cleaned is None: -- GitLab