Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/748.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a human readable name for the ``qualityDataObjectKey`` inventory key, which is displayed as "Quality Data Filename" and can be used as the ``{quality_data_filename}`` path interpolation key.
1 change: 1 addition & 0 deletions dkist/utils/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __missing__(self, key):
"averageDatasetSpatialSampling": "Average Spatial Sampling",
"averageDatasetTemporalSampling": "Average Temporal Sampling",
"qualityReportObjectKey": "Quality Report Filename",
"qualityDataObjectKey": "Quality Data Filename",
"inputDatasetParametersPartId": "Input Dataset Parameters Part ID",
"inputDatasetObserveFramesPartId": "Input Dataset Observe Frames Part ID",
"inputDatasetCalibrationFramesPartId": "Input Dataset Calibration Frames Part ID",
Expand Down
5 changes: 5 additions & 0 deletions dkist/utils/tests/test_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@
def test_humanize_loop():
inv = {
"hasSpectralAxis": True,
"qualityDataObjectKey": "pid_1_123/BDNEK/BDNEK_quality_data.json",
"notAKey": "wibble"
}

new_inv = humanize_inventory(inv)
assert "Has Spectral Axis" in new_inv
assert "hasSpectralAxis" not in new_inv
assert "Quality Data Filename" in new_inv
assert "qualityDataObjectKey" not in new_inv
assert "notAKey" in new_inv

old_inv = dehumanize_inventory(new_inv)

assert "Has Spectral Axis" not in old_inv
assert "hasSpectralAxis" in old_inv
assert "Quality Data Filename" not in old_inv
assert "qualityDataObjectKey" in old_inv
assert "notAKey" in old_inv


Expand Down
Loading