Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Report: Add time to the timestamp
[csit.git]
/
resources
/
tools
/
presentation
/
utils.py
diff --git
a/resources/tools/presentation/utils.py
b/resources/tools/presentation/utils.py
index
88baf95
..
95faffd
100644
(file)
--- a/
resources/tools/presentation/utils.py
+++ b/
resources/tools/presentation/utils.py
@@
-21,7
+21,7
@@
import logging
from os import walk, makedirs, environ
from os.path import join, isdir
from os import walk, makedirs, environ
from os.path import join, isdir
-from shutil import
copy
, Error
+from shutil import
move
, Error
from math import sqrt
from errors import PresentationError
from math import sqrt
from errors import PresentationError
@@
-87,7
+87,7
@@
def remove_outliers(input_list, outlier_const=1.5, window=14):
iqr = (upper_quartile - lower_quartile) * outlier_const
quartile_set = (lower_quartile - iqr, upper_quartile + iqr)
result_lst = list()
iqr = (upper_quartile - lower_quartile) * outlier_const
quartile_set = (lower_quartile - iqr, upper_quartile + iqr)
result_lst = list()
- for y in
data.tolist()
:
+ for y in
input_list
:
if quartile_set[0] <= y <= quartile_set[1]:
result_lst.append(y)
return result_lst
if quartile_set[0] <= y <= quartile_set[1]:
result_lst.append(y)
return result_lst
@@
-264,8
+264,8
@@
def archive_input_data(spec):
makedirs(dst)
for data_file in data_files:
makedirs(dst)
for data_file in data_files:
- logging.info("
Copy
ing the file: {0} ...".format(data_file))
-
copy
(data_file, dst)
+ logging.info("
Mov
ing the file: {0} ...".format(data_file))
+
move
(data_file, dst)
except (Error, OSError) as err:
raise PresentationError("Not possible to archive the input data.",
except (Error, OSError) as err:
raise PresentationError("Not possible to archive the input data.",