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
a0d6507d
Commit
a0d6507d
authored
6 years ago
by
Mikhail Karnevskiy
Browse files
Options
Downloads
Patches
Plain Diff
Add input parameters as a chapter to report
parent
2bea8aca
No related branches found
No related tags found
1 merge request
!21
Beautify report
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xfel_calibrate/calibrate.py
+14
-1
14 additions, 1 deletion
xfel_calibrate/calibrate.py
with
14 additions
and
1 deletion
xfel_calibrate/calibrate.py
+
14
−
1
View file @
a0d6507d
...
...
@@ -467,7 +467,20 @@ def run():
# create a temporary output directory to work in
run_tmp_path
=
"
{}/slurm_tmp_{}
"
.
format
(
temp_path
,
run_uuid
)
os
.
makedirs
(
run_tmp_path
)
# Write all input parameters to rst file to be included to final report
parms
=
parameter_values
(
parms
,
**
args
)
with
open
(
"
{}/slurm_tmp_{}/InputParameters.rst
"
.
format
(
temp_path
,
run_uuid
),
"
w
"
)
as
finfile
:
finfile
.
write
(
"
Input Parameters
\n
"
)
finfile
.
write
(
"
================
\n
"
)
for
p
in
parms
:
finfile
.
write
(
"
{}
\n\n
"
.
format
(
p
.
comment
))
finfile
.
write
(
"
.. parsed-literal::
\n
"
)
if
p
.
type
is
str
:
finfile
.
write
(
"
{} =
'
{}
'
\n\n
"
.
format
(
p
.
name
,
p
.
value
))
else
:
finfile
.
write
(
"
{} = {}
\n\n
"
.
format
(
p
.
name
,
p
.
value
))
# wait on all jobs to run and then finalize the run by creating a report from the notebooks
out_path
=
"
{}/{}/{}/{}
"
.
format
(
report_path
,
detector
.
upper
(),
caltype
.
upper
(),
datetime
.
now
().
isoformat
())
if
try_report_to_output
:
...
...
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