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
99b7000c
Commit
99b7000c
authored
2 years ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
add some documentations
parent
fe3916a3
No related branches found
No related tags found
1 merge request
!610
Add a pytest to run a dict of CALLAB test runs before releases
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_reference_runs/test_pre_deployment.py
+22
-4
22 additions, 4 deletions
tests/test_reference_runs/test_pre_deployment.py
with
22 additions
and
4 deletions
tests/test_reference_runs/test_pre_deployment.py
+
22
−
4
View file @
99b7000c
...
...
@@ -48,7 +48,7 @@ def validate_h5files(
Args:
f: file to validate
ref_folder
(_type_)
: Reference folder which has the same filename
ref_folder: Reference folder which has the same filename
as of the file to validate.
Returns:
...
...
@@ -96,13 +96,13 @@ def validate_constant_file(
h5_copy_except
.
h5_copy_except_paths
(
sfile
,
hp1
,
[
"
report
"
,
"
creation_time
"
],
[
"
report
"
],
)
with
h5py
.
File
(
ref_folder
/
test_file
.
name
,
"
r
"
)
as
sfile
:
h5_copy_except
.
h5_copy_except_paths
(
sfile
,
hp2
,
[
"
report
"
,
"
creation_time
"
],
[
"
report
"
],
)
hp1
.
close
()
hp2
.
close
()
...
...
@@ -152,7 +152,25 @@ def test_xfel_calibrate(
test_key
:
str
,
val_dict
:
dict
,
release_test_config
:
Tuple
[
bool
,
bool
,
bool
,
bool
]
):
"""
Test xfel calibrate detectors and calibrations written
in the given callab_test YAML file.
in the given callab_test.py file.
xfel-calibrate CL is ran over each test_key. Expected a val_dict of
1. out-folder, 2. in-folder, 3. run numbers, 4.karabo-id, 5. detector type
6. calibration type, and 7. reference folder to compare the data with.
The val_dict can/should acquire the needed custom configurations for each test.
e.g. AGIPD notebooks needs to differentiate between the different `karabo-id-control`
which differ across instruments.
Each calibration test is ran sequentially. Each calibration test consists of multiple tests.
1. Testing if all SLURM jobs were successfull.
2. Testing if there is an available report.
3. Validate number of H5 files against files in reference folder.
4. Validate numberical values for the H5 files against reference files.
a. CORRECTED files are compared using MD5 checksum.
b. CONSTANTS local files saved using cal_tools are the one being tested.
Unfortunately they can
'
t be compared using MD5 checksum. As the metadata in files
consists of the report path. which differ between each test. So the metadata is cleaned
from the report path first before comparing the H5 constant files numerically.
Args:
test_key : Key for the xfel-calibrate test.
val_dict: Dictionary of the configurations for the running test.
...
...
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