Skip to content
Snippets Groups Projects
Commit c0bfaa5b authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Use calparrot 'wrapper' around running notebook

parent 668273e2
No related branches found
No related tags found
1 merge request!767Store CalCat requests/responses for reproducibility
......@@ -43,23 +43,13 @@ then
sleep 15
fi
# Launch CalParrot to repeat calibration constant queries
if [ "$caltype" == "CORRECT" ]
then
port_file=$(mktemp)
${python_path} -m calparrot --port-file $port_file
calparrot_port=$(cat $port_file)
rm $port_file
export CAL_CAL_TOOLS_CALCAT="{base-api-url='http://127.0.0.1:${calparrot_port}/api', use-oauth2=false}"
fi
echo "Running notebook"
${python_path} -m princess ${nb_path} --save
# Stop CalParrot
if [ "$caltype" == "CORRECT" ]
then
${python_path} -m calparrot.stop $calparrot_port
# calparrot stores and repeats calcat queries
${python_path} -m calparrot -- ${python_path} -m princess ${nb_path} --save
else
${python_path} -m princess ${nb_path} --save
fi
# stop the cluster if requested
......
......@@ -116,7 +116,7 @@ if "readthedocs.org" not in sys.executable:
install_requires += [
"iCalibrationDB @ git+ssh://git@git.xfel.eu:10022/detectors/cal_db_interactive.git@2.3.0", # noqa
"XFELDetectorAnalysis @ git+ssh://git@git.xfel.eu:10022/karaboDevices/pyDetLib.git@2.7.0", # noqa
"CalParrot @ git+ssh://git@git.xfel.eu:10022/calibration/calparrot.git@fdcdd52fdf8bedc0db1de46aaeb389e48275fdcc", # noqa
"CalParrot @ git+ssh://git@git.xfel.eu:10022/calibration/calparrot.git@b0cfc58ff0f231685630b2a12f566faf243b1035", # noqa
]
setup(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment