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
f503a51e
Commit
f503a51e
authored
5 years ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
testing del unrelated folders
parent
b06d2d82
No related branches found
No related tags found
2 merge requests
!298
Feat/dss cimprove master rebasing
,
!265
keep, rename and move temp folder with report
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xfel_calibrate/finalize.py
+9
-2
9 additions, 2 deletions
xfel_calibrate/finalize.py
with
9 additions
and
2 deletions
xfel_calibrate/finalize.py
+
9
−
2
View file @
f503a51e
...
...
@@ -3,7 +3,7 @@ from importlib.machinery import SourceFileLoader
from
os
import
chdir
,
listdir
,
makedirs
,
path
,
remove
,
stat
from
os.path
import
isdir
,
isfile
,
splitext
import
re
from
shutil
import
copy
,
copytree
,
move
from
shutil
import
copy
,
copytree
,
move
,
rmtree
from
subprocess
import
CalledProcessError
,
check_call
,
check_output
from
textwrap
import
dedent
from
time
import
sleep
...
...
@@ -273,10 +273,17 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
return
print
(
"
Moving report to final location: {}
"
.
format
(
out_path
))
copy
(
'
{}/_build/latex/{}.pdf
'
.
format
(
run_path
,
report_name
),
out_path
)
temp_dirs
=
glob
(
f
'
{
tmp_path
}
/*/
'
)
# Remove folders with figures and sphinx files.
print
(
f
"
Removing directories [
{
temp_dirs
}
] in temp folder:
{
tmp_path
}
"
)
[
rmtree
(
f
'
{
dtmp
}
/
'
)
for
dtmp
in
temp_dirs
]
# Moving temporary files to out-folder after successful execution
# This helps in keeping elements needed for reproducability.
print
(
f
"
Moving temporary files to final location
"
f
"
:
{
out_path
}
/
temp_
{
time_now
}
"
)
f
"
:
{
out_path
}
/
{
os
.
path
.
basename
(
tmp_path
)
}
"
)
move
(
tmp_path
,
f
"
{
out_path
}
/
{
os
.
path
.
basename
(
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