dkist-processing-common 10.8.3__py3-none-any.whl → 10.8.4rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- changelog/235.feature.rst +3 -0
- changelog/235.misc.1.rst +2 -0
- changelog/235.misc.rst +1 -0
- dkist_processing_common/codecs/array.py +19 -0
- dkist_processing_common/codecs/basemodel.py +21 -0
- dkist_processing_common/codecs/fits.py +12 -6
- dkist_processing_common/manual.py +3 -5
- dkist_processing_common/models/graphql.py +13 -3
- dkist_processing_common/models/input_dataset.py +113 -0
- dkist_processing_common/models/parameters.py +65 -28
- dkist_processing_common/tasks/mixin/metadata_store.py +7 -4
- dkist_processing_common/tasks/transfer_input_data.py +61 -70
- dkist_processing_common/tests/conftest.py +24 -7
- dkist_processing_common/tests/test_codecs.py +38 -0
- dkist_processing_common/tests/test_input_dataset.py +79 -308
- dkist_processing_common/tests/test_parameters.py +71 -22
- dkist_processing_common/tests/test_transfer_input_data.py +131 -45
- dkist_processing_common/tests/test_write_l1.py +2 -2
- {dkist_processing_common-10.8.3.dist-info → dkist_processing_common-10.8.4rc1.dist-info}/METADATA +1 -1
- {dkist_processing_common-10.8.3.dist-info → dkist_processing_common-10.8.4rc1.dist-info}/RECORD +22 -17
- dkist_processing_common/tasks/mixin/input_dataset.py +0 -166
- {dkist_processing_common-10.8.3.dist-info → dkist_processing_common-10.8.4rc1.dist-info}/WHEEL +0 -0
- {dkist_processing_common-10.8.3.dist-info → dkist_processing_common-10.8.4rc1.dist-info}/top_level.txt +0 -0
|
@@ -18,22 +18,22 @@ import numpy as np
|
|
|
18
18
|
import pytest
|
|
19
19
|
from astropy.io import fits
|
|
20
20
|
|
|
21
|
+
from dkist_processing_common.codecs.array import array_encoder
|
|
22
|
+
from dkist_processing_common.codecs.fits import fits_hdulist_encoder
|
|
21
23
|
from dkist_processing_common.models.parameters import ParameterArmIdMixin
|
|
22
24
|
from dkist_processing_common.models.parameters import ParameterBase
|
|
23
25
|
from dkist_processing_common.models.parameters import ParameterWavelengthMixin
|
|
24
26
|
from dkist_processing_common.models.tags import Tag
|
|
25
27
|
from dkist_processing_common.tasks import WorkflowTaskBase
|
|
26
|
-
from dkist_processing_common.
|
|
28
|
+
from dkist_processing_common.tests.test_input_dataset import input_dataset_frames_part_factory
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
FITS_FILE = "fits.dat"
|
|
32
|
+
NP_FILE = "np.npy"
|
|
27
33
|
|
|
28
34
|
|
|
29
35
|
@pytest.fixture
|
|
30
|
-
def input_dataset_parameters(
|
|
31
|
-
fits_file_path = tmp_path / "fits.dat"
|
|
32
|
-
phdu = fits.PrimaryHDU(np.ones((3, 3)) * 3)
|
|
33
|
-
ihdu = fits.ImageHDU(np.ones((4, 4)) * 4)
|
|
34
|
-
fits.HDUList([phdu, ihdu]).writeto(fits_file_path)
|
|
35
|
-
np_file_path = tmp_path / "np.npy"
|
|
36
|
-
np.save(np_file_path, np.ones((3, 3)) * 4)
|
|
36
|
+
def input_dataset_parameters():
|
|
37
37
|
return [
|
|
38
38
|
{
|
|
39
39
|
"parameterName": "basic_param",
|
|
@@ -106,7 +106,15 @@ def input_dataset_parameters(tmp_path):
|
|
|
106
106
|
"parameterValues": [
|
|
107
107
|
{
|
|
108
108
|
"parameterValueId": 1,
|
|
109
|
-
"parameterValue": json.dumps(
|
|
109
|
+
"parameterValue": json.dumps(
|
|
110
|
+
{
|
|
111
|
+
"__file__": {
|
|
112
|
+
"bucket": "not_used",
|
|
113
|
+
"objectKey": "not_used",
|
|
114
|
+
"tag": Tag.parameter(FITS_FILE),
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
),
|
|
110
118
|
}
|
|
111
119
|
],
|
|
112
120
|
},
|
|
@@ -115,7 +123,15 @@ def input_dataset_parameters(tmp_path):
|
|
|
115
123
|
"parameterValues": [
|
|
116
124
|
{
|
|
117
125
|
"parameterValueId": 1,
|
|
118
|
-
"parameterValue": json.dumps(
|
|
126
|
+
"parameterValue": json.dumps(
|
|
127
|
+
{
|
|
128
|
+
"__file__": {
|
|
129
|
+
"bucket": "not_used",
|
|
130
|
+
"objectKey": "not_used",
|
|
131
|
+
"tag": Tag.parameter(NP_FILE),
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
),
|
|
119
135
|
}
|
|
120
136
|
],
|
|
121
137
|
},
|
|
@@ -129,16 +145,14 @@ def input_dataset_parts(input_dataset_parameters) -> tuple[Any, str]:
|
|
|
129
145
|
|
|
130
146
|
@pytest.fixture()
|
|
131
147
|
def task_class_with_parameters(parameter_class) -> Type[WorkflowTaskBase]:
|
|
132
|
-
class TaskWithParameters(WorkflowTaskBase
|
|
148
|
+
class TaskWithParameters(WorkflowTaskBase):
|
|
133
149
|
def __init__(self, recipe_run_id: int, workflow_name: str, workflow_version: str):
|
|
134
150
|
super().__init__(
|
|
135
151
|
recipe_run_id=recipe_run_id,
|
|
136
152
|
workflow_name=workflow_name,
|
|
137
153
|
workflow_version=workflow_version,
|
|
138
154
|
)
|
|
139
|
-
self.parameters = parameter_class(
|
|
140
|
-
input_dataset_parameters=self.input_dataset_parameters
|
|
141
|
-
)
|
|
155
|
+
self.parameters = parameter_class(scratch=self.scratch)
|
|
142
156
|
|
|
143
157
|
def run(self) -> None:
|
|
144
158
|
pass
|
|
@@ -149,11 +163,21 @@ def task_class_with_parameters(parameter_class) -> Type[WorkflowTaskBase]:
|
|
|
149
163
|
@pytest.fixture()
|
|
150
164
|
def task_with_parameters(task_with_input_dataset, task_class_with_parameters):
|
|
151
165
|
task_class = task_class_with_parameters
|
|
152
|
-
|
|
166
|
+
with task_class(
|
|
153
167
|
recipe_run_id=task_with_input_dataset.recipe_run_id,
|
|
154
168
|
workflow_name=task_with_input_dataset.workflow_name,
|
|
155
169
|
workflow_version=task_with_input_dataset.workflow_version,
|
|
156
|
-
)
|
|
170
|
+
) as task:
|
|
171
|
+
phdu = fits.PrimaryHDU(np.ones((3, 3)) * 3)
|
|
172
|
+
ihdu = fits.ImageHDU(np.ones((4, 4)) * 4)
|
|
173
|
+
task.write(
|
|
174
|
+
data=fits.HDUList([phdu, ihdu]),
|
|
175
|
+
tags=Tag.parameter(FITS_FILE),
|
|
176
|
+
encoder=fits_hdulist_encoder,
|
|
177
|
+
)
|
|
178
|
+
task.write(data=np.ones((3, 3)) * 4, tags=Tag.parameter(NP_FILE), encoder=array_encoder)
|
|
179
|
+
yield task
|
|
180
|
+
task._purge()
|
|
157
181
|
|
|
158
182
|
|
|
159
183
|
class FilledParametersNoObsTime(ParameterBase):
|
|
@@ -182,18 +206,18 @@ class FilledParametersWithObsTime(ParameterBase):
|
|
|
182
206
|
|
|
183
207
|
@property
|
|
184
208
|
def fits_file_parameter(self):
|
|
185
|
-
|
|
186
|
-
return self._load_param_value_from_fits(
|
|
209
|
+
param_obj = self._find_most_recent_past_value("fits_file_parameter")
|
|
210
|
+
return self._load_param_value_from_fits(param_obj=param_obj)
|
|
187
211
|
|
|
188
212
|
@property
|
|
189
213
|
def non_primary_fits_file_parameter(self):
|
|
190
|
-
|
|
191
|
-
return self._load_param_value_from_fits(
|
|
214
|
+
param_obj = self._find_most_recent_past_value("fits_file_parameter")
|
|
215
|
+
return self._load_param_value_from_fits(param_obj=param_obj, hdu=1)
|
|
192
216
|
|
|
193
217
|
@property
|
|
194
218
|
def numpy_file_parameter(self):
|
|
195
|
-
|
|
196
|
-
return self._load_param_value_from_numpy_save(
|
|
219
|
+
param_obj = self._find_most_recent_past_value("numpy_file_parameter")
|
|
220
|
+
return self._load_param_value_from_numpy_save(param_obj=param_obj)
|
|
197
221
|
|
|
198
222
|
|
|
199
223
|
def parameter_class_with_obs_ip_start_time():
|
|
@@ -343,3 +367,28 @@ def test_mixins_error_with_no_arg():
|
|
|
343
367
|
"""
|
|
344
368
|
with pytest.raises(TypeError):
|
|
345
369
|
parameters = FilledWavelengthParameters(input_dataset_parameters={"foo": []})
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
@pytest.mark.parametrize(
|
|
373
|
+
("input_dataset_parts", "parameter_class"),
|
|
374
|
+
[
|
|
375
|
+
pytest.param(
|
|
376
|
+
[
|
|
377
|
+
(input_dataset_frames_part_factory(), Tag.input_dataset_parameters()),
|
|
378
|
+
(input_dataset_frames_part_factory(), Tag.input_dataset_parameters()),
|
|
379
|
+
],
|
|
380
|
+
parameter_class_with_obs_ip_start_time(),
|
|
381
|
+
id="two_param_docs",
|
|
382
|
+
),
|
|
383
|
+
],
|
|
384
|
+
)
|
|
385
|
+
def test_multiple_input_dataset_parameter_parts(
|
|
386
|
+
request, input_dataset_parts: list[tuple[Any, str]], parameter_class
|
|
387
|
+
):
|
|
388
|
+
"""
|
|
389
|
+
Given: a task with multiple tagged input dataset parameter docs
|
|
390
|
+
When: initializing the parameter base
|
|
391
|
+
Then: an error is raised
|
|
392
|
+
"""
|
|
393
|
+
with pytest.raises(ValueError, match="more than one parameter file"):
|
|
394
|
+
request.getfixturevalue("task_with_parameters")
|
|
@@ -5,10 +5,12 @@ from pathlib import Path
|
|
|
5
5
|
import pytest
|
|
6
6
|
|
|
7
7
|
from dkist_processing_common._util.scratch import WorkflowFileSystem
|
|
8
|
-
from dkist_processing_common.codecs.
|
|
8
|
+
from dkist_processing_common.codecs.basemodel import basemodel_decoder
|
|
9
9
|
from dkist_processing_common.models.graphql import InputDatasetRecipeRunResponse
|
|
10
|
+
from dkist_processing_common.models.input_dataset import InputDatasetPartDocumentList
|
|
10
11
|
from dkist_processing_common.models.tags import Tag
|
|
11
12
|
from dkist_processing_common.tasks.transfer_input_data import TransferL0Data
|
|
13
|
+
from dkist_processing_common.tests.conftest import create_input_frames
|
|
12
14
|
from dkist_processing_common.tests.conftest import create_parameter_files
|
|
13
15
|
from dkist_processing_common.tests.conftest import FakeGQLClient
|
|
14
16
|
|
|
@@ -18,7 +20,7 @@ class TransferL0DataTask(TransferL0Data):
|
|
|
18
20
|
...
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
class
|
|
23
|
+
class FakeGQLClientMissingInputDatasetCalibrationPart(FakeGQLClient):
|
|
22
24
|
"""Same metadata mocker with calibration input dataset part missing."""
|
|
23
25
|
|
|
24
26
|
def execute_gql_query(self, **kwargs):
|
|
@@ -53,103 +55,152 @@ def transfer_l0_data_task(recipe_run_id, tmp_path, mocker):
|
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
@pytest.fixture
|
|
56
|
-
def
|
|
58
|
+
def transfer_l0_data_task_missing_calibration_part(recipe_run_id, tmp_path, mocker):
|
|
57
59
|
yield from _transfer_l0_data_task_with_client(
|
|
58
|
-
recipe_run_id, tmp_path, mocker,
|
|
60
|
+
recipe_run_id, tmp_path, mocker, FakeGQLClientMissingInputDatasetCalibrationPart
|
|
59
61
|
)
|
|
60
62
|
|
|
61
63
|
|
|
62
|
-
|
|
64
|
+
@pytest.mark.parametrize(
|
|
65
|
+
"expected_doc, tag",
|
|
66
|
+
[
|
|
67
|
+
pytest.param(
|
|
68
|
+
FakeGQLClient.observe_frames_doc_object,
|
|
69
|
+
Tag.input_dataset_observe_frames(),
|
|
70
|
+
id="observe_frames",
|
|
71
|
+
),
|
|
72
|
+
pytest.param(
|
|
73
|
+
FakeGQLClient.calibration_frames_doc_object,
|
|
74
|
+
Tag.input_dataset_calibration_frames(),
|
|
75
|
+
id="calibration_frames",
|
|
76
|
+
),
|
|
77
|
+
pytest.param(
|
|
78
|
+
FakeGQLClient.parameters_doc_object,
|
|
79
|
+
Tag.input_dataset_parameters(),
|
|
80
|
+
id="parameters",
|
|
81
|
+
),
|
|
82
|
+
],
|
|
83
|
+
)
|
|
84
|
+
def test_download_dataset(transfer_l0_data_task, expected_doc, tag):
|
|
63
85
|
"""
|
|
64
86
|
:Given: a TransferL0Data task with a valid input dataset
|
|
65
87
|
:When: downloading the dataset documents from the metadata store
|
|
66
|
-
:Then: the correct documents are written to disk
|
|
88
|
+
:Then: the correct documents are written to disk, along with tags for file parameters
|
|
67
89
|
"""
|
|
68
90
|
# Given
|
|
69
91
|
task = transfer_l0_data_task
|
|
70
92
|
# When
|
|
71
93
|
task.download_input_dataset()
|
|
72
94
|
# Then
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
task.read(tags=Tag.input_dataset_observe_frames(), decoder=json_decoder)
|
|
76
|
-
)
|
|
77
|
-
assert observe_doc_from_file == expected_observe_doc
|
|
78
|
-
expected_calibration_doc = FakeGQLClient.calibration_frames_doc_object
|
|
79
|
-
calibration_doc_from_file = next(
|
|
80
|
-
task.read(tags=Tag.input_dataset_calibration_frames(), decoder=json_decoder)
|
|
81
|
-
)
|
|
82
|
-
assert calibration_doc_from_file == expected_calibration_doc
|
|
83
|
-
expected_parameters_doc = FakeGQLClient.parameters_doc_object
|
|
84
|
-
parameters_doc_from_file = next(
|
|
85
|
-
task.read(tags=Tag.input_dataset_parameters(), decoder=json_decoder)
|
|
95
|
+
doc_from_file = next(
|
|
96
|
+
task.read(tags=tag, decoder=basemodel_decoder, model=InputDatasetPartDocumentList)
|
|
86
97
|
)
|
|
87
|
-
|
|
98
|
+
doc_list_from_file = doc_from_file.model_dump()["doc_list"]
|
|
99
|
+
if (
|
|
100
|
+
tag == Tag.input_dataset_parameters()
|
|
101
|
+
): # parameter doc gets written with tags for file objects
|
|
102
|
+
for item in expected_doc:
|
|
103
|
+
for val in item["parameterValues"]:
|
|
104
|
+
if "__file__" in val["parameterValue"]:
|
|
105
|
+
file_dict = json.loads(val["parameterValue"])["__file__"]
|
|
106
|
+
file_dict["tag"] = Tag.parameter(Path(file_dict["objectKey"]).name)
|
|
107
|
+
val["parameterValue"] = json.dumps({"__file__": file_dict})
|
|
108
|
+
assert doc_list_from_file == expected_doc
|
|
88
109
|
|
|
89
110
|
|
|
90
|
-
def test_download_dataset_missing_part(
|
|
111
|
+
def test_download_dataset_missing_part(transfer_l0_data_task_missing_calibration_part):
|
|
91
112
|
"""
|
|
92
113
|
:Given: a TransferL0Data task with a valid input dataset without calibration frames
|
|
93
114
|
:When: downloading the dataset documents from the metadata store
|
|
94
115
|
:Then: the correct number of documents are written to disk
|
|
95
116
|
"""
|
|
96
117
|
# Given
|
|
97
|
-
task =
|
|
118
|
+
task = transfer_l0_data_task_missing_calibration_part
|
|
98
119
|
# When
|
|
99
120
|
task.download_input_dataset()
|
|
100
121
|
# Then
|
|
101
122
|
observe_doc_from_file = next(
|
|
102
|
-
task.read(
|
|
123
|
+
task.read(
|
|
124
|
+
tags=Tag.input_dataset_observe_frames(),
|
|
125
|
+
decoder=basemodel_decoder,
|
|
126
|
+
model=InputDatasetPartDocumentList,
|
|
127
|
+
)
|
|
103
128
|
)
|
|
104
129
|
parameters_doc_from_file = next(
|
|
105
|
-
task.read(
|
|
130
|
+
task.read(
|
|
131
|
+
tags=Tag.input_dataset_parameters(),
|
|
132
|
+
decoder=basemodel_decoder,
|
|
133
|
+
model=InputDatasetPartDocumentList,
|
|
134
|
+
)
|
|
106
135
|
)
|
|
107
136
|
with pytest.raises(StopIteration):
|
|
108
137
|
calibration_doc_from_file = next(
|
|
109
|
-
task.read(
|
|
138
|
+
task.read(
|
|
139
|
+
tags=Tag.input_dataset_calibration_frames(),
|
|
140
|
+
decoder=basemodel_decoder,
|
|
141
|
+
model=InputDatasetPartDocumentList,
|
|
142
|
+
)
|
|
110
143
|
)
|
|
111
144
|
|
|
112
145
|
|
|
113
|
-
|
|
146
|
+
@pytest.mark.parametrize(
|
|
147
|
+
"task_name",
|
|
148
|
+
[
|
|
149
|
+
pytest.param(
|
|
150
|
+
"transfer_l0_data_task",
|
|
151
|
+
id="observe_and_calibration_frames",
|
|
152
|
+
),
|
|
153
|
+
pytest.param(
|
|
154
|
+
"transfer_l0_data_task_missing_calibration_part",
|
|
155
|
+
id="calibration_frames_missing",
|
|
156
|
+
),
|
|
157
|
+
],
|
|
158
|
+
)
|
|
159
|
+
def test_build_frame_transfer_list_formatted(request, task_name):
|
|
114
160
|
"""
|
|
115
|
-
:Given: a TransferL0Data task with
|
|
116
|
-
:When:
|
|
117
|
-
:Then: the items are correctly loaded into GlobusTransferItem objects
|
|
161
|
+
:Given: a TransferL0Data task with downloaded input dataset docs
|
|
162
|
+
:When: building a list of frames in the input dataset formatted for transfer
|
|
163
|
+
:Then: the correct items are correctly loaded into GlobusTransferItem objects
|
|
118
164
|
"""
|
|
119
165
|
# Given
|
|
120
|
-
task =
|
|
166
|
+
task = request.getfixturevalue(task_name)
|
|
121
167
|
task.download_input_dataset()
|
|
122
168
|
# When
|
|
123
|
-
|
|
169
|
+
observe_transfer_objects = task.build_transfer_list(doc_tag=Tag.input_dataset_observe_frames())
|
|
170
|
+
calibration_transfer_objects = task.build_transfer_list(
|
|
171
|
+
doc_tag=Tag.input_dataset_calibration_frames()
|
|
172
|
+
)
|
|
173
|
+
transfer_objects = observe_transfer_objects + calibration_transfer_objects
|
|
174
|
+
formatted_transfer_items = task.format_transfer_items(input_dataset_objects=transfer_objects)
|
|
124
175
|
# Then
|
|
125
176
|
source_filenames = []
|
|
126
177
|
destination_filenames = []
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
for frame_set in
|
|
178
|
+
expected_frames = list(FakeGQLClient.observe_frames_doc_object)
|
|
179
|
+
if "missing_calibration_part" not in task_name:
|
|
180
|
+
expected_frames += FakeGQLClient.calibration_frames_doc_object
|
|
181
|
+
for frame_set in expected_frames:
|
|
131
182
|
for key in frame_set["object_keys"]:
|
|
132
183
|
source_filenames.append(os.path.join("/", frame_set["bucket"], key))
|
|
133
184
|
destination_filenames.append(Path(key).name)
|
|
134
|
-
assert len(
|
|
135
|
-
for item in
|
|
185
|
+
assert len(formatted_transfer_items) == len(source_filenames)
|
|
186
|
+
for item in formatted_transfer_items:
|
|
136
187
|
assert item.source_path.as_posix() in source_filenames
|
|
137
188
|
assert item.destination_path.name in destination_filenames
|
|
138
189
|
assert not item.recursive
|
|
139
190
|
|
|
140
191
|
|
|
141
|
-
def
|
|
192
|
+
def test_build_parameter_file_transfer_items(transfer_l0_data_task):
|
|
142
193
|
"""
|
|
143
|
-
:Given: a TransferL0Data task with
|
|
144
|
-
:When:
|
|
145
|
-
:Then: the items are correctly loaded into GlobusTransferItem objects
|
|
194
|
+
:Given: a TransferL0Data task with downloaded input dataset docs
|
|
195
|
+
:When: building a list of parameter files formatted for transfer
|
|
196
|
+
:Then: the correct items are correctly loaded into GlobusTransferItem objects
|
|
146
197
|
"""
|
|
147
198
|
# Given
|
|
148
199
|
task = transfer_l0_data_task
|
|
149
200
|
task.download_input_dataset()
|
|
150
|
-
create_parameter_files(task)
|
|
151
201
|
# When
|
|
152
|
-
|
|
202
|
+
transfer_objects = task.build_transfer_list(doc_tag=Tag.input_dataset_parameters())
|
|
203
|
+
formatted_transfer_items = task.format_transfer_items(input_dataset_objects=transfer_objects)
|
|
153
204
|
# Then
|
|
154
205
|
source_filenames = []
|
|
155
206
|
destination_filenames = []
|
|
@@ -162,9 +213,44 @@ def test_format_parameter_file_transfer_items(transfer_l0_data_task):
|
|
|
162
213
|
object_key = value_dict["__file__"]["objectKey"]
|
|
163
214
|
source_filenames.append(os.path.join("/", bucket, object_key))
|
|
164
215
|
destination_filenames.append(Path(object_key).name)
|
|
165
|
-
assert len(
|
|
166
|
-
for transfer_item in
|
|
216
|
+
assert len(formatted_transfer_items) == len(source_filenames)
|
|
217
|
+
for transfer_item in formatted_transfer_items:
|
|
167
218
|
assert transfer_item.source_path.as_posix() in source_filenames
|
|
168
219
|
assert transfer_item.destination_path.name in destination_filenames
|
|
169
220
|
assert str(transfer_item.destination_path).startswith(str(task.scratch.workflow_base_path))
|
|
170
221
|
assert not transfer_item.recursive
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def test_tag_transfer_items(transfer_l0_data_task):
|
|
225
|
+
"""
|
|
226
|
+
:Given: a TransferL0Data task with downloaded input dataset frames and parameter files
|
|
227
|
+
:When: tagging the downloaded files
|
|
228
|
+
:Then: the downloaded items are correctly tagged
|
|
229
|
+
"""
|
|
230
|
+
# Given
|
|
231
|
+
task = transfer_l0_data_task
|
|
232
|
+
task.download_input_dataset()
|
|
233
|
+
observe_transfer_objects = task.build_transfer_list(doc_tag=Tag.input_dataset_observe_frames())
|
|
234
|
+
calibration_transfer_objects = task.build_transfer_list(
|
|
235
|
+
doc_tag=Tag.input_dataset_calibration_frames()
|
|
236
|
+
)
|
|
237
|
+
frame_transfer_objects = observe_transfer_objects + calibration_transfer_objects
|
|
238
|
+
create_input_frames(task)
|
|
239
|
+
parameter_transfer_objects = task.build_transfer_list(doc_tag=Tag.input_dataset_parameters())
|
|
240
|
+
create_parameter_files(task)
|
|
241
|
+
# When
|
|
242
|
+
transfer_objects = frame_transfer_objects + parameter_transfer_objects
|
|
243
|
+
task.tag_transfer_objects(input_dataset_objects=transfer_objects)
|
|
244
|
+
# Then
|
|
245
|
+
input_tags = [Tag.input(), Tag.frame()]
|
|
246
|
+
input_frames_on_disk = list(task.scratch.find_all(tags=input_tags))
|
|
247
|
+
for obj in frame_transfer_objects:
|
|
248
|
+
destination_path = task.scratch.absolute_path(obj.object_key)
|
|
249
|
+
assert destination_path in input_frames_on_disk
|
|
250
|
+
assert len(input_frames_on_disk) == len(frame_transfer_objects)
|
|
251
|
+
for obj in parameter_transfer_objects:
|
|
252
|
+
destination_path = task.scratch.absolute_path(obj.object_key)
|
|
253
|
+
param_tag = Tag.parameter(Path(obj.object_key))
|
|
254
|
+
param_file_on_disk = list(task.scratch.find_all(tags=param_tag))
|
|
255
|
+
assert destination_path in param_file_on_disk
|
|
256
|
+
assert len(param_file_on_disk) == 1
|
|
@@ -25,7 +25,7 @@ from dkist_processing_common.tasks.write_l1 import WriteL1Frame
|
|
|
25
25
|
from dkist_processing_common.tests.conftest import FakeGQLClient
|
|
26
26
|
from dkist_processing_common.tests.conftest import TILE_SIZE
|
|
27
27
|
from dkist_processing_common.tests.test_transfer_input_data import (
|
|
28
|
-
|
|
28
|
+
FakeGQLClientMissingInputDatasetCalibrationPart,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -572,7 +572,7 @@ def test_missing_input_dataset_part(write_l1_task, mocker):
|
|
|
572
572
|
"""
|
|
573
573
|
mocker.patch(
|
|
574
574
|
"dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
|
|
575
|
-
new=
|
|
575
|
+
new=FakeGQLClientMissingInputDatasetCalibrationPart,
|
|
576
576
|
)
|
|
577
577
|
task, _, _ = write_l1_task
|
|
578
578
|
task()
|
{dkist_processing_common-10.8.3.dist-info → dkist_processing_common-10.8.4rc1.dist-info}/RECORD
RENAMED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
changelog/.gitempty,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
changelog/235.feature.rst,sha256=F27MUnNkqjcmlmRQ6NQUi2wd5M9dOjN2jZ70TV95Y20,365
|
|
3
|
+
changelog/235.misc.1.rst,sha256=kQujVYRa_axHQSRFxW3SNPNMgEL-YgtnyLud-aJljL8,234
|
|
4
|
+
changelog/235.misc.rst,sha256=ooK2tbA5EEFyYNZLLvgYiMZ-Eza5UzPHN9MvpuX-cu4,92
|
|
2
5
|
dkist_processing_common/__init__.py,sha256=490Fwm_GgqpwriQlsYfKcLUZNhZ6GkINtJqcYSIEKoU,319
|
|
3
6
|
dkist_processing_common/config.py,sha256=IcpaD_NvHZU-aLlUNOTdRC4V7ADIvVQwrZ2dHhIr4NY,4247
|
|
4
|
-
dkist_processing_common/manual.py,sha256=
|
|
7
|
+
dkist_processing_common/manual.py,sha256=M7FW1viESaTfK1jLqHLp7JMGTGeoTxHtgCXRjZpDR8g,6990
|
|
5
8
|
dkist_processing_common/_util/__init__.py,sha256=xf6JNpMKQgbhE2Jivymt-WO0WF6PpGt9rl604YpuTWk,92
|
|
6
9
|
dkist_processing_common/_util/constants.py,sha256=b0zlRaT09aGj2RU72OQ5J-8u6Z_RevPXtcyx5tlnf-Y,3244
|
|
7
10
|
dkist_processing_common/_util/graphql.py,sha256=qjsvLWDHqb1X7hDLA8uqbpOIDjZZ2mjsSIL0Wkt1TJc,3420
|
|
8
11
|
dkist_processing_common/_util/scratch.py,sha256=4X5K260ffBHWvyVfP0SCk_-QTWEcTougB7qu9TdF7LM,10364
|
|
9
12
|
dkist_processing_common/_util/tags.py,sha256=8r62_-x3xpbCoCu5dd09Q2u-OYzYiML6SlPUf9LXCEw,6220
|
|
10
13
|
dkist_processing_common/codecs/__init__.py,sha256=du1iitvsudSSOMENSywXmXSLOlvIocJsPbvfEcyqFNc,159
|
|
14
|
+
dkist_processing_common/codecs/array.py,sha256=GeIB6mTMZuQK4Jxn2tGmMmYgA-bLik2SAlWopRZhEO8,575
|
|
11
15
|
dkist_processing_common/codecs/asdf.py,sha256=2GHCFOZk1j-ml4EolXac_sUzk7aPYJUGqKYxZk4mG_c,1046
|
|
16
|
+
dkist_processing_common/codecs/basemodel.py,sha256=6w7OjsPLdsmY_tiwveBmDthYW3WLtAWqM3hjrQa5UhA,814
|
|
12
17
|
dkist_processing_common/codecs/bytes.py,sha256=tiVEUu_Gzc5NfW1_qsJtHDlYAZzgIqA7f4cfAwN734k,495
|
|
13
|
-
dkist_processing_common/codecs/fits.py,sha256=
|
|
18
|
+
dkist_processing_common/codecs/fits.py,sha256=AxS3AKjB22JZl9sSk2A5JI7-Yyb9dOXw84bTpYqbPoQ,2585
|
|
14
19
|
dkist_processing_common/codecs/iobase.py,sha256=r0ImN0CxfjAnfMflNv7w2pGDp2i6EQg0p2OaEkE82pk,977
|
|
15
20
|
dkist_processing_common/codecs/json.py,sha256=OWXzoFWccJiojkiKSeDrMdL9f7EpdNIOMvO9YBBg-Yg,939
|
|
16
21
|
dkist_processing_common/codecs/path.py,sha256=LU5Kh1ew2PQI9hcpzbnZkE47k-zAMZDDV4cgqHRcDkY,197
|
|
@@ -23,11 +28,12 @@ dkist_processing_common/models/constants.py,sha256=1Eb8RDeuCr6brl237iGKxYLWCH49I
|
|
|
23
28
|
dkist_processing_common/models/fits_access.py,sha256=Au9JROwhVla9zb_u0dN8mIWiSJd_Pca0oOr4N1hN0HY,4113
|
|
24
29
|
dkist_processing_common/models/flower_pot.py,sha256=59C5uGYKyMyncqQYxhzDZWl8k1DRZFB6s9RF-HFp9mY,5128
|
|
25
30
|
dkist_processing_common/models/fried_parameter.py,sha256=ro_H2Eo3I88lRf1wJjZfTc_XOjhgLt4whIQR_sjAFbM,1609
|
|
26
|
-
dkist_processing_common/models/graphql.py,sha256=
|
|
31
|
+
dkist_processing_common/models/graphql.py,sha256=BBJBIBADAPQAskqS8Qh58DYEyFjY9GY9ZN8nrJ1EKHs,5364
|
|
32
|
+
dkist_processing_common/models/input_dataset.py,sha256=OZDxyjHZfFrksFGpas1gsB14Q77CeNsk_nI-EYo3ZRI,4121
|
|
27
33
|
dkist_processing_common/models/message.py,sha256=DRW7Qhl01dF5KagcqLta5U-uzdOMewrsHvMatDT6jnk,1684
|
|
28
34
|
dkist_processing_common/models/message_queue_binding.py,sha256=ROQ2ZQE3TCr4gVbz4WggvUSExAiWP8SD_GjjQl482M8,1012
|
|
29
35
|
dkist_processing_common/models/metric_code.py,sha256=McXAEF1Sa0_YlR1niXYLJWLFHhdLQhmYw9Xtpr5FGws,815
|
|
30
|
-
dkist_processing_common/models/parameters.py,sha256=
|
|
36
|
+
dkist_processing_common/models/parameters.py,sha256=dTup7mPTEmySXP0O3j4sPPY8Jqe2zf-3sr2hjeMatEY,9649
|
|
31
37
|
dkist_processing_common/models/quality.py,sha256=ONz1A6_qyEoZhQkVp9LChAgm93aGt1O5WSRneE3XCCA,2319
|
|
32
38
|
dkist_processing_common/models/tags.py,sha256=ykOYqWMU7_ffvRCv84-avjXyty9pHBo7EXwsjIjStjs,12058
|
|
33
39
|
dkist_processing_common/models/task_name.py,sha256=NL0n92A9vVYBV-yvh8d-qFOCxVy0X2GECDmLgIzrmOY,565
|
|
@@ -56,36 +62,35 @@ dkist_processing_common/tasks/output_data_base.py,sha256=CC1TnCrChi8_iuMymr425CJ
|
|
|
56
62
|
dkist_processing_common/tasks/parse_l0_input_data.py,sha256=iRMGdvhxBobNsTDQ0IEl0myDfB4P_xpxA00guuBWDj8,7986
|
|
57
63
|
dkist_processing_common/tasks/quality_metrics.py,sha256=dWuPKBD5elRCZEs4ZC91tyXxkuPUwMuvy9OoGU9Zs04,12489
|
|
58
64
|
dkist_processing_common/tasks/teardown.py,sha256=e4LKnphJDYDVDAez2tH7MxpZgCmxYsKrq9Zk0qAkzzM,2355
|
|
59
|
-
dkist_processing_common/tasks/transfer_input_data.py,sha256=
|
|
65
|
+
dkist_processing_common/tasks/transfer_input_data.py,sha256=8dDOfnT46qavGW-6fy-FT9LVb0TXANSpk1WpACpWK70,5787
|
|
60
66
|
dkist_processing_common/tasks/trial_catalog.py,sha256=Y3DKstRfMS8nWWtJFMB0MUVPlZ1jWS_2jhJGMWwxy50,8748
|
|
61
67
|
dkist_processing_common/tasks/trial_output_data.py,sha256=aI_aRuu0qVO8zFGrr_9baxx9i3jUEHZSmsmbO6ytlkE,6960
|
|
62
68
|
dkist_processing_common/tasks/write_l1.py,sha256=EBQEViaLG2MzWsXOvNi8tsVsgzVJXBrLSGmYtsVgSlo,23781
|
|
63
69
|
dkist_processing_common/tasks/mixin/__init__.py,sha256=-g-DQbU7m1bclJYuFe3Yh757V-35GIDTbstardKQ7nU,68
|
|
64
70
|
dkist_processing_common/tasks/mixin/globus.py,sha256=QAV8VElxMAqxJ2KSB_bJaraceovYfjHXjOdocrTCkIA,6592
|
|
65
|
-
dkist_processing_common/tasks/mixin/input_dataset.py,sha256=dkW5vf_QPgWedHO_Lf9GjBxr1QrUCKs6gIXufUTi7GE,6813
|
|
66
71
|
dkist_processing_common/tasks/mixin/interservice_bus.py,sha256=I7BUh0o8AEX-FZv7gxCts6is0uq9lycWjtTB2KqwBrU,1080
|
|
67
|
-
dkist_processing_common/tasks/mixin/metadata_store.py,sha256=
|
|
72
|
+
dkist_processing_common/tasks/mixin/metadata_store.py,sha256=yTKijpQ-tNx_H2V_9HsZjMzkrzBDSQaSKkySV6VnnOM,11618
|
|
68
73
|
dkist_processing_common/tasks/mixin/object_store.py,sha256=Vn4l2XuCimii9Fc3gM-pQGIkTKMv_ldqljlxkLesZLU,3236
|
|
69
74
|
dkist_processing_common/tasks/mixin/quality/__init__.py,sha256=Bgu-DHW7yXLiehglldOCWluEkAP5qh0Hp1F30rh5NFw,383
|
|
70
75
|
dkist_processing_common/tasks/mixin/quality/_base.py,sha256=nZ9IC-O-hsLXa5-tk29B13CZyQIdhJCv0eO9cdkAhWc,8303
|
|
71
76
|
dkist_processing_common/tasks/mixin/quality/_metrics.py,sha256=lkHU6SeWeMfzf0QPM28_K9znllKx6rK91v1TiQ7vYfw,54556
|
|
72
77
|
dkist_processing_common/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
|
-
dkist_processing_common/tests/conftest.py,sha256=
|
|
78
|
+
dkist_processing_common/tests/conftest.py,sha256=Rz1r2_by8aRZslSkS4AduEtpu3cpPxsAonZQyUCBPSQ,30867
|
|
74
79
|
dkist_processing_common/tests/test_assemble_movie.py,sha256=XY_ruXSYP5k6s2gUAwlFdnhJ81eyWLSd2O9IkX4RXeo,4165
|
|
75
80
|
dkist_processing_common/tests/test_assemble_quality.py,sha256=fWSHK4UdVqgNjvxQuD40NBUnXrtmthUP7PUbISPV4MQ,16897
|
|
76
81
|
dkist_processing_common/tests/test_base.py,sha256=4ST3__jEHitEQaQs9-0OcqtyEJfIjZsk_6PRYZFV2-U,7124
|
|
77
|
-
dkist_processing_common/tests/test_codecs.py,sha256=
|
|
82
|
+
dkist_processing_common/tests/test_codecs.py,sha256=FGhldrTdc28YD9FKrsW3lZ34LtvzecGP1qNi9fGHVGQ,22173
|
|
78
83
|
dkist_processing_common/tests/test_constants.py,sha256=Kc9k5TdYy5QkRRlGav6kfI2dy5HHKqtpf9qOuaAfDZU,5903
|
|
79
84
|
dkist_processing_common/tests/test_cs_step.py,sha256=RA0QD3D8eaL3YSOL_gIJ9wkngy14RQ2jbD-05KAziW4,2408
|
|
80
85
|
dkist_processing_common/tests/test_fits_access.py,sha256=tyUPNbUqoTPhQgzua_doWP9l9ee4ir_LLV-I9rHktcs,11393
|
|
81
86
|
dkist_processing_common/tests/test_flower_pot.py,sha256=X9_UI3maa3ZQncV3jYHgovWnawDsdEkEB5vw6EAB96o,3151
|
|
82
87
|
dkist_processing_common/tests/test_fried_parameter.py,sha256=iXtlQIifZ6cDOkEi-YDgP3oAlss2loq08Uohgvy1byQ,1295
|
|
83
|
-
dkist_processing_common/tests/test_input_dataset.py,sha256=
|
|
88
|
+
dkist_processing_common/tests/test_input_dataset.py,sha256=pQ01rWAkQ2XQojyHWzAqeOdrMXshNcgEVL5I_9bBTdo,9610
|
|
84
89
|
dkist_processing_common/tests/test_interservice_bus.py,sha256=M_iv2CLmx5TnCB1VUN4YjkQ2LEUjfCKk7-ZlkV62XEQ,3000
|
|
85
90
|
dkist_processing_common/tests/test_interservice_bus_mixin.py,sha256=8TTl0aypkq5gBPeyqSaQHbz_jmt5RmSD2oI8kT4Q1ZA,4195
|
|
86
91
|
dkist_processing_common/tests/test_manual_processing.py,sha256=wAZJztsF33jzJE3m3vJ6cJT0ujgIkMg01jGq-Ys_a4c,1045
|
|
87
92
|
dkist_processing_common/tests/test_output_data_base.py,sha256=Y9MFz5xw11tAnKjpHH7qrzsRYP1rZM_Trt4AylY0S6k,3120
|
|
88
|
-
dkist_processing_common/tests/test_parameters.py,sha256=
|
|
93
|
+
dkist_processing_common/tests/test_parameters.py,sha256=kNzX89vfrNRJ8d9rusMVv4DM9rPD3l-7HIstZsLoYBE,14033
|
|
89
94
|
dkist_processing_common/tests/test_parse_l0_input_data.py,sha256=SMNV1qyQTvnMx94MCNsiA-RyS9uxaxIABEDDxsuVzqY,10629
|
|
90
95
|
dkist_processing_common/tests/test_publish_catalog_messages.py,sha256=wB2lcAnT77yVnqO0cFWOPxGf-tZ8U62kvvpiB5roBwQ,3268
|
|
91
96
|
dkist_processing_common/tests/test_quality.py,sha256=vomy2YSPadKqJj2tG8sCs-UkQVvfKus7Cum7_Hpee4I,10257
|
|
@@ -97,12 +102,12 @@ dkist_processing_common/tests/test_tags.py,sha256=UwlOJ45rkvbfbd5L5m5YltvOxQc8kG
|
|
|
97
102
|
dkist_processing_common/tests/test_task_name.py,sha256=kqFr59XX2K87xzfTlClzDV4-Je1dx72LvdaJ22UE8UU,1233
|
|
98
103
|
dkist_processing_common/tests/test_task_parsing.py,sha256=QXt1X6DTO3_liBD2c-t84DToLeEn7B3J-eteIyN4HEM,4027
|
|
99
104
|
dkist_processing_common/tests/test_teardown.py,sha256=w2sATQHkg2lMLvm6VFZF1mNGFYHwWj_SxvF9RQu-tuY,5362
|
|
100
|
-
dkist_processing_common/tests/test_transfer_input_data.py,sha256=
|
|
105
|
+
dkist_processing_common/tests/test_transfer_input_data.py,sha256=B-kDsGJTUxxnamN4xjn69TFiY_TEN8MmhHNndP6bKac,10301
|
|
101
106
|
dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=27PifkyH3RZg0nsM-AjmrFJ-hbYuCk5Tt_0Zx8PJBfM,2109
|
|
102
107
|
dkist_processing_common/tests/test_trial_catalog.py,sha256=SZ-nyn0MXU9Lkg_94FbKER_cwiGoi06GYlzF_3AmvKg,6802
|
|
103
108
|
dkist_processing_common/tests/test_trial_output_data.py,sha256=cBCj0kXyF5NEMzKh6zPVksdoXyE8ju1opJgWgjdcJWA,12790
|
|
104
109
|
dkist_processing_common/tests/test_workflow_task_base.py,sha256=Z5aPW5LQtS0UWJiYho4X0r-2gPLfzpkmMwfmaoFLjMg,10517
|
|
105
|
-
dkist_processing_common/tests/test_write_l1.py,sha256=
|
|
110
|
+
dkist_processing_common/tests/test_write_l1.py,sha256=TKRSx1qX9shFlafP5H0tHy5ouIVzFLU0AMJOjViNygQ,27077
|
|
106
111
|
docs/Makefile,sha256=qnlVz6PuBqE39NfHWuUnHhNEA-EFgT2-WJNNNy9ttfk,4598
|
|
107
112
|
docs/changelog.rst,sha256=S2jPASsWlQxSlAPqdvNrYvhk9k3FcFWNXFNDYXBSjl4,120
|
|
108
113
|
docs/conf.py,sha256=FkX575cqTqZGCcLAjg2MlvE8Buj1Vt3CpHNgZxG256E,1890
|
|
@@ -111,7 +116,7 @@ docs/landing_page.rst,sha256=aPAuXFhBx73lEZ59B6E6JXxkK0LlxzD0n-HXqHrfumQ,746
|
|
|
111
116
|
docs/make.bat,sha256=mBAhtURwhQ7yc95pqwJzlhqBSvRknr1aqZ5s8NKvdKs,4513
|
|
112
117
|
docs/requirements.txt,sha256=Kbl_X4c7RQZw035YTeNB63We6I7pvXFU4T0Uflp2yDY,29
|
|
113
118
|
licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
|
|
114
|
-
dkist_processing_common-10.8.
|
|
115
|
-
dkist_processing_common-10.8.
|
|
116
|
-
dkist_processing_common-10.8.
|
|
117
|
-
dkist_processing_common-10.8.
|
|
119
|
+
dkist_processing_common-10.8.4rc1.dist-info/METADATA,sha256=mvmjsxz0nAMy1AaYE1etUD0u3QXFz4R2D3zaZca8csY,7150
|
|
120
|
+
dkist_processing_common-10.8.4rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
121
|
+
dkist_processing_common-10.8.4rc1.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
|
|
122
|
+
dkist_processing_common-10.8.4rc1.dist-info/RECORD,,
|