Feat/user notebooks
-
Review changes -
-
Download -
Patches
-
Plain diff
Description
Adds in support for notebooks in user-defined spaces. Idea is that you can, in xfel_calibrate/notebooks.py
add in a configuration like:
{
...
"REMI": {
"CORRECT": {
"notebook": None,
"user": {
"notebook": "/gpfs/exfel/exp/{instrument}/{cycle}/p{proposal}/usr/calibration/notebooks/correct.ipynb",
"venv": "/gpfs/exfel/sw/software/exfel_environments/sqs-remi-preview"
},
"concurrency": {
"parameter": None,
"use function": None,
"default concurrency": None,
"cluster cores": 1
},
},
},
}
If ["notebook"]
is set to None
then user_notebook
gets parsed and templated by CLI arguments, then the "notebook"
key is set to this string and the rest continues as normal.
How Has This Been Tested?
-
Add in tests -
Deploy and test with REMI CALLAB data on max-exfl17 with mymdc test instance
Manual test setup involved adding a notebook to /gpfs/exfel/exp/CALLAB/202130/p900203/usr/calibration/notebooks/correct.ipynb
(this matches the REMI user notebook path pattern), then running xfel-calibrate REMI CORRECT --instrument CALLAB --cycle 202130 --proposal 900203
.
This will then execute the test notebook.
The test notebook does... nothing really, it just creates an empty file called touch
in the in_folder
directory. If the SLURM job finishes without errors, the PDF renders correctly, and the touch
file is present, then the user notebook with a user venv executed correctly.
Relevant Documents (optional)
Part of SQS Moonshot, see:
Types of changes
- New feature (non-breaking change which adds functionality)
-
Test (additional or refactored tests)
Checklist:
-
My code follows the code style of this project. -
My change requires a change to the documentation. -
I have updated the documentation accordingly. -
I added tests where appropriate.
Reviewers
Notes:
- MR is done onto the https://git.xfel.eu/gitlab/detectors/pycalibration/merge_requests/464 branch as this'll be merged only after that one is merged
Merge request reports
- version 34b0180b71
- version 33716c414d
- version 32e4b20e31
- version 31dd04e54f
- version 30dd04e54f
- version 291ff635bf
- version 281ff635bf
- version 27828a8d50
- version 26828a8d50
- version 25828a8d50
- version 24f571efb5
- version 230e4bf71e
- version 220e4bf71e
- version 21cfb70cb8
- version 20cfb70cb8
- version 194038c6a5
- version 1854507606
- version 1754507606
- version 1654507606
- version 1554507606
- version 1454507606
- version 130829b714
- version 120829b714
- version 115352c57c
- version 10d9bbb032
- version 9d9bbb032
- version 8d9bbb032
- version 7c54734e6
- version 6d9bbb032
- version 5f8d9a299
- version 420141545
- version 320141545
- version 220141545
- version 120141545
- master (base)
- latest version86f5be456 commits,
- version 34b0180b715 commits,
- version 33716c414d3 commits,
- version 32e4b20e313 commits,
- version 31dd04e54f3 commits,
- version 30dd04e54f8 commits,
- version 291ff635bf18 commits,
- version 281ff635bf18 commits,
- version 27828a8d5012 commits,
- version 26828a8d5012 commits,
- version 25828a8d5012 commits,
- version 24f571efb510 commits,
- version 230e4bf71e8 commits,
- version 220e4bf71e8 commits,
- version 21cfb70cb88 commits,
- version 20cfb70cb88 commits,
- version 194038c6a57 commits,
- version 185450760647 commits,
- version 175450760647 commits,
- version 165450760647 commits,
- version 15545076068 commits,
- version 14545076068 commits,
- version 130829b7148 commits,
- version 120829b7148 commits,
- version 115352c57c7 commits,
- version 10d9bbb0327 commits,
- version 9d9bbb0328 commits,
- version 8d9bbb0328 commits,
- version 7c54734e69 commits,
- version 6d9bbb0328 commits,
- version 5f8d9a2994 commits,
- version 4201415453 commits,
- version 3201415453 commits,
- version 2201415453 commits,
- version 12014154531 commits,
- Side-by-side
- Inline