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
Commits
18bb8eda
Commit
18bb8eda
authored
5 years ago
by
Mikhail Karnevskiy
Browse files
Options
Downloads
Patches
Plain Diff
small refactoring
parent
a4e1e525
No related branches found
No related tags found
1 merge request
!68
Add title page. Modify conf.py.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cal_tools/cal_tools/tools.py
+9
-9
9 additions, 9 deletions
cal_tools/cal_tools/tools.py
with
9 additions
and
9 deletions
cal_tools/cal_tools/tools.py
+
9
−
9
View file @
18bb8eda
from
collections
import
OrderedDict
import
glob
from
importlib.machinery
import
SourceFileLoader
import
os
import
os
from
os.path
import
isfile
,
isdir
,
splitext
from
os.path
import
isfile
,
isdir
,
splitext
from
time
import
sleep
from
subprocess
import
check_output
,
check_call
,
CalledProcessError
from
shutil
import
copy
,
move
,
rmtree
,
copytree
from
queue
import
Queue
from
queue
import
Queue
from
collections
import
OrderedDict
from
shutil
import
copy
,
move
,
rmtree
,
copytree
import
glob
from
subprocess
import
check_output
,
check_call
,
CalledProcessError
from
jinja2
import
Template
import
textwrap
import
textwrap
from
time
import
sleep
from
jinja2
import
Template
import
tabulate
import
tabulate
from
importlib.machinery
import
SourceFileLoader
from
xfel_calibrate
import
settings
from
xfel_calibrate
import
settings
def
atoi
(
text
):
def
atoi
(
text
):
...
@@ -220,7 +222,6 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
...
@@ -220,7 +222,6 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
tmpl
=
'
{} = {}
\n
'
tmpl
=
'
{} = {}
\n
'
v
=
getattr
(
conf
,
var
,
None
)
v
=
getattr
(
conf
,
var
,
None
)
if
isinstance
(
v
,
str
):
if
isinstance
(
v
,
str
):
print
(
var
,
v
)
tmpl
=
'
{} =
"
{}
"
\n
'
tmpl
=
'
{} =
"
{}
"
\n
'
mf
.
write
(
tmpl
.
format
(
var
,
v
))
mf
.
write
(
tmpl
.
format
(
var
,
v
))
...
@@ -262,7 +263,6 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
...
@@ -262,7 +263,6 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
return
return
print
(
"
Moving report to final location: {}
"
.
format
(
out_path
))
print
(
"
Moving report to final location: {}
"
.
format
(
out_path
))
for
f
in
glob
.
glob
(
r
'
{}/_build/latex/*.pdf
'
.
format
(
run_path
)):
for
f
in
glob
.
glob
(
r
'
{}/_build/latex/*.pdf
'
.
format
(
run_path
)):
print
(
f
)
copy
(
f
,
out_path
)
copy
(
f
,
out_path
)
print
(
"
Removing temporary files at: {}
"
.
format
(
tmp_path
))
print
(
"
Removing temporary files at: {}
"
.
format
(
tmp_path
))
rmtree
(
tmp_path
)
rmtree
(
tmp_path
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment