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
d546505c
Commit
d546505c
authored
5 years ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
MR comments
parent
3c023ba1
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xfel_calibrate/calibrate.py
+5
-5
5 additions, 5 deletions
xfel_calibrate/calibrate.py
xfel_calibrate/finalize.py
+2
-2
2 additions, 2 deletions
xfel_calibrate/finalize.py
with
7 additions
and
7 deletions
xfel_calibrate/calibrate.py
+
5
−
5
View file @
d546505c
...
@@ -682,12 +682,12 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
...
@@ -682,12 +682,12 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
return
jobid
return
jobid
def
make_par_table
(
parms
,
run_t
e
mp_path
):
def
make_par_table
(
parms
,
run_tmp_path
):
"""
"""
Create a table with input parameters
i
f the notebook
Create a table with input parameters
o
f the notebook
:param parms: parameters of the notebook
:param parms: parameters of the notebook
:param run_t
e
mp_path: path to temporary directory for running job outputs
:param run_tmp_path: path to temporary directory for running job outputs
"""
"""
# Add space in long strings without line breakers ` ,-/` to
# Add space in long strings without line breakers ` ,-/` to
...
@@ -743,7 +743,7 @@ def make_par_table(parms, run_temp_path):
...
@@ -743,7 +743,7 @@ def make_par_table(parms, run_temp_path):
\end{longtable}
\end{longtable}
'''
)
'''
)
f_name
=
"
{}/InputParameters.rst
"
.
format
(
run_t
e
mp_path
)
f_name
=
"
{}/InputParameters.rst
"
.
format
(
run_tmp_path
)
with
open
(
f_name
,
"
w
"
)
as
finfile
:
with
open
(
f_name
,
"
w
"
)
as
finfile
:
finfile
.
write
(
textwrap
.
dedent
(
tmpl
.
render
(
p
=
col_type
,
lines
=
l_parms
)))
finfile
.
write
(
textwrap
.
dedent
(
tmpl
.
render
(
p
=
col_type
,
lines
=
l_parms
)))
...
@@ -835,7 +835,7 @@ def run():
...
@@ -835,7 +835,7 @@ def run():
# Write all input parameters to rst file to be included to final report
# Write all input parameters to rst file to be included to final report
parms
=
parameter_values
(
parms
,
**
args
)
parms
=
parameter_values
(
parms
,
**
args
)
make_par_table
(
parms
,
t
e
mp_path
,
run_uuid
)
make_par_table
(
parms
,
run_
tmp_path
)
save_executed_command
(
run_tmp_path
,
version
)
save_executed_command
(
run_tmp_path
,
version
)
# wait on all jobs to run and then finalize the run by creating a report from the notebooks
# wait on all jobs to run and then finalize the run by creating a report from the notebooks
...
...
This diff is collapsed.
Click to expand it.
xfel_calibrate/finalize.py
+
2
−
2
View file @
d546505c
...
@@ -277,8 +277,8 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
...
@@ -277,8 +277,8 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
temp_dirs
=
glob
(
f
'
{
tmp_path
}
/*/
'
)
temp_dirs
=
glob
(
f
'
{
tmp_path
}
/*/
'
)
# Remove folders with figures and sphinx files.
# Remove folders with figures and sphinx files.
print
(
f
"
Removing directories [
{
temp_dirs
}
] in temp folder:
{
tmp_path
}
"
)
print
(
f
"
Removing directories [
{
temp_dirs
}
] in temp folder:
{
tmp_path
}
"
)
for
dtmp
in
temp_dirs
:
[
rmtree
(
f
'
{
dtmp
}
/
'
)
for
dtmp
in
temp_dirs
]
rmtree
(
f
'
{
dtmp
}
/
'
)
# Moving temporary files to out-folder after successful execution
# Moving temporary files to out-folder after successful execution
# This helps in keeping elements needed for re-producibility.
# This helps in keeping elements needed for re-producibility.
...
...
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