Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Merge requests
!67
Feat: Remove extra information from report
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat: Remove extra information from report
feat/report_cleaning
into
master
Overview
10
Commits
5
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Merged
Mikhail Karnevskiy
requested to merge
feat/report_cleaning
into
master
5 years ago
Overview
10
Commits
5
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Expand
@amunnich
@haufs
Remove extra page and extra information from report.
0
0
Merge request reports
Viewing commit
f0aeec49
Prev
Next
Show latest version
1 file
+
19
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
f0aeec49
Order modules in the report
· f0aeec49
Mikhail Karnevskiy
authored
5 years ago
cal_tools/cal_tools/tools.py
+
19
−
0
Options
@@ -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