diff --git a/expetator/bundle.py b/expetator/bundle.py index 3cb2b1605b9c263a471f0e189a5e54eec30bef03..e28376757a446aa43a2b02b3b86e4242a82b7f3f 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 6325dfaffba872ac8da3c6a4f2f2cd6189d39312..697660b447ae92c433311171157d2c688b3ade56 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 de28e5305b842424ee84f05ada97b5b0a5a8fce7..3a485fff7921e6b57b3cdfb7492e9971a15135e3 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: