Skip to content
Snippets Groups Projects
Commit f0aeec49 authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Order modules in the report

parent ae731083
No related branches found
No related tags found
1 merge request!67Feat: Remove extra information from report
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment