Skip to content
Snippets Groups Projects

Feat: Remove extra information from report

Merged Mikhail Karnevskiy requested to merge feat/report_cleaning into master
All threads resolved!
1 file
+ 19
0
Compare changes
  • Side-by-side
  • Inline
@@ -15,10 +15,29 @@ import time
from uuid import uuid4
def atoi(text):
'''
Convert string to integer is possible
:param text: string to be converted
:return: integer value or input string
'''
return int(text) if text.isdigit() else text
def natural_keys(text):
'''
Decompose string to list of integers and sub-strings
'''
return [ atoi(c) for c in re.split(r'(\d+)', text) ]
def combine_report(run_path, calibration):
sphinx_path = "{}/sphinx_rep".format(os.path.abspath(run_path))
os.makedirs(sphinx_path)
direntries = os.listdir(run_path)
direntries.sort(key=natural_keys)
for entry in direntries:
Loading