dkist-processing-common 10.6.2__tar.gz → 10.6.4__tar.gz
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.
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/CHANGELOG.rst +18 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/PKG-INFO +2 -2
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/wavelength.py +1 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/transfer_input_data.py +11 -6
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/write_l1.py +6 -5
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_transfer_input_data.py +50 -3
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_write_l1.py +26 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common.egg-info/PKG-INFO +2 -2
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/.gitignore +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/.pre-commit-config.yaml +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/.readthedocs.yml +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/.snyk +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/README.rst +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/bitbucket-pipelines.yml +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/changelog/.gitempty +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/_util/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/_util/constants.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/_util/graphql.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/_util/scratch.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/_util/tags.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/asdf.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/bytes.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/fits.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/iobase.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/json.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/path.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/quality.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/codecs/str.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/config.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/fonts/Lato-Regular.ttf +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/fonts/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/manual.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/constants.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/fits_access.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/flower_pot.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/graphql.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/message.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/message_queue_binding.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/metric_code.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/parameters.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/quality.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/tags.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/models/task_name.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/cs_step.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/dsps_repeat.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/experiment_id_bud.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/id_bud.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/l0_fits_access.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/l1_fits_access.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/near_bud.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/proposal_id_bud.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/quality.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/retarder.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/single_value_single_key_flower.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/task.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/time.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/unique_bud.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/parsers/wavelength.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/assemble_movie.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/base.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/l1_output_data.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/globus.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/input_dataset.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/interservice_bus.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/metadata_store.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/object_store.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/quality/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/quality/_base.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/mixin/quality/_metrics.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/output_data_base.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/parse_l0_input_data.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/quality_metrics.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/teardown.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/trial_catalog.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tasks/trial_output_data.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/__init__.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/conftest.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_assemble_movie.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_assemble_quality.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_base.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_codecs.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_constants.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_cs_step.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_fits_access.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_flower_pot.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_input_dataset.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_interservice_bus.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_manual_processing.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_output_data_base.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_parameters.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_parse_l0_input_data.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_publish_catalog_messages.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_quality.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_quality_mixin.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_scratch.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_stems.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_submit_dataset_metadata.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_tags.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_task_name.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_task_parsing.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_teardown.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_transfer_l1_output_data.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_trial_catalog.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_trial_output_data.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/tests/test_workflow_task_base.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common.egg-info/SOURCES.txt +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common.egg-info/dependency_links.txt +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common.egg-info/requires.txt +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common.egg-info/top_level.txt +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/Makefile +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/changelog.rst +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/conf.py +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/index.rst +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/landing_page.rst +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/make.bat +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/docs/requirements.txt +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/licenses/LICENSE.rst +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/pyproject.toml +0 -0
- {dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/setup.cfg +0 -0
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
v10.6.4 (2025-03-31)
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
Bugfixes
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
- Allow input dataset IDs to be conditionally written into the L1 data headers. (`#243 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/243>`__)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
v10.6.3 (2025-03-27)
|
|
11
|
+
====================
|
|
12
|
+
|
|
13
|
+
Bugfixes
|
|
14
|
+
--------
|
|
15
|
+
|
|
16
|
+
- Fix a bug where transfer input dataset fails if any of the input dataset part documents are missing. (`#241 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/241>`__)
|
|
17
|
+
- Pydantic model validator now returns the validated instance. (`#240 <https://bitbucket.org/dkistdc/dkist-processing-common/pull-requests/240>`__)
|
|
18
|
+
|
|
1
19
|
v10.6.2 (2025-03-19)
|
|
2
20
|
====================
|
|
3
21
|
|
|
@@ -20,12 +20,17 @@ class TransferL0Data(WorkflowTaskBase, GlobusMixin, InputDatasetMixin):
|
|
|
20
20
|
|
|
21
21
|
def download_input_dataset(self):
|
|
22
22
|
"""Get the input dataset document parts and save it to scratch with the appropriate tags."""
|
|
23
|
-
if
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
self.write(
|
|
23
|
+
if observe_frames := self.metadata_store_input_dataset_observe_frames:
|
|
24
|
+
observe_doc = observe_frames.inputDatasetPartDocument
|
|
25
|
+
self.write(observe_doc, tags=Tag.input_dataset_observe_frames(), encoder=json_encoder)
|
|
26
|
+
if calibration_frames := self.metadata_store_input_dataset_calibration_frames:
|
|
27
|
+
calibration_doc = calibration_frames.inputDatasetPartDocument
|
|
28
|
+
self.write(
|
|
29
|
+
calibration_doc, tags=Tag.input_dataset_calibration_frames(), encoder=json_encoder
|
|
30
|
+
)
|
|
31
|
+
if parameters := self.metadata_store_input_dataset_parameters:
|
|
32
|
+
parameters_doc = parameters.inputDatasetPartDocument
|
|
33
|
+
self.write(parameters_doc, tags=Tag.input_dataset_parameters(), encoder=json_encoder)
|
|
29
34
|
|
|
30
35
|
def format_transfer_items(
|
|
31
36
|
self, input_dataset_objects: list[InputDatasetObject]
|
|
@@ -214,11 +214,12 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
|
|
|
214
214
|
header["CADMAX"] = self.constants.maximum_cadence
|
|
215
215
|
header["CADVAR"] = self.constants.variance_cadence
|
|
216
216
|
# Keywords to support reprocessing
|
|
217
|
-
if
|
|
218
|
-
header["IDSPARID"] =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
if parameters := self.metadata_store_input_dataset_parameters:
|
|
218
|
+
header["IDSPARID"] = parameters.inputDatasetPartId
|
|
219
|
+
if observe_frames := self.metadata_store_input_dataset_observe_frames:
|
|
220
|
+
header["IDSOBSID"] = observe_frames.inputDatasetPartId
|
|
221
|
+
if calibration_frames := self.metadata_store_input_dataset_calibration_frames:
|
|
222
|
+
header["IDSCALID"] = calibration_frames.inputDatasetPartId
|
|
222
223
|
header["WKFLNAME"] = self.workflow_name
|
|
223
224
|
header["WKFLVERS"] = self.workflow_version
|
|
224
225
|
header = self.add_contributing_id_headers(header=header)
|
|
@@ -6,6 +6,7 @@ import pytest
|
|
|
6
6
|
|
|
7
7
|
from dkist_processing_common._util.scratch import WorkflowFileSystem
|
|
8
8
|
from dkist_processing_common.codecs.json import json_decoder
|
|
9
|
+
from dkist_processing_common.models.graphql import InputDatasetRecipeRunResponse
|
|
9
10
|
from dkist_processing_common.models.tags import Tag
|
|
10
11
|
from dkist_processing_common.tasks.transfer_input_data import TransferL0Data
|
|
11
12
|
from dkist_processing_common.tests.conftest import create_parameter_files
|
|
@@ -17,10 +18,21 @@ class TransferL0DataTask(TransferL0Data):
|
|
|
17
18
|
...
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
class FakeGQLClientMissingInputDatasetPart(FakeGQLClient):
|
|
22
|
+
"""Same metadata mocker with calibration input dataset part missing."""
|
|
23
|
+
|
|
24
|
+
def execute_gql_query(self, **kwargs):
|
|
25
|
+
original_response = super().execute_gql_query(**kwargs)
|
|
26
|
+
# Remove calibration frames part if getting InputDatasetRecipeRunResponse:
|
|
27
|
+
if kwargs.get("query_response_cls") == InputDatasetRecipeRunResponse:
|
|
28
|
+
del original_response[0].recipeInstance.inputDataset.inputDatasetInputDatasetParts[2]
|
|
29
|
+
return original_response
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _transfer_l0_data_task_with_client(recipe_run_id, tmp_path, mocker, client_cls):
|
|
22
33
|
mocker.patch(
|
|
23
|
-
"dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
|
|
34
|
+
"dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
|
|
35
|
+
new=client_cls,
|
|
24
36
|
)
|
|
25
37
|
with TransferL0DataTask(
|
|
26
38
|
recipe_run_id=recipe_run_id,
|
|
@@ -35,6 +47,18 @@ def transfer_l0_data_task(recipe_run_id, tmp_path, mocker):
|
|
|
35
47
|
task._purge()
|
|
36
48
|
|
|
37
49
|
|
|
50
|
+
@pytest.fixture
|
|
51
|
+
def transfer_l0_data_task(recipe_run_id, tmp_path, mocker):
|
|
52
|
+
yield from _transfer_l0_data_task_with_client(recipe_run_id, tmp_path, mocker, FakeGQLClient)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@pytest.fixture
|
|
56
|
+
def transfer_l0_data_task_missing_part(recipe_run_id, tmp_path, mocker):
|
|
57
|
+
yield from _transfer_l0_data_task_with_client(
|
|
58
|
+
recipe_run_id, tmp_path, mocker, FakeGQLClientMissingInputDatasetPart
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
38
62
|
def test_download_dataset(transfer_l0_data_task):
|
|
39
63
|
"""
|
|
40
64
|
:Given: a TransferL0Data task with a valid input dataset
|
|
@@ -63,6 +87,29 @@ def test_download_dataset(transfer_l0_data_task):
|
|
|
63
87
|
assert parameters_doc_from_file == expected_parameters_doc
|
|
64
88
|
|
|
65
89
|
|
|
90
|
+
def test_download_dataset_missing_part(transfer_l0_data_task_missing_part):
|
|
91
|
+
"""
|
|
92
|
+
:Given: a TransferL0Data task with a valid input dataset without calibration frames
|
|
93
|
+
:When: downloading the dataset documents from the metadata store
|
|
94
|
+
:Then: the correct number of documents are written to disk
|
|
95
|
+
"""
|
|
96
|
+
# Given
|
|
97
|
+
task = transfer_l0_data_task_missing_part
|
|
98
|
+
# When
|
|
99
|
+
task.download_input_dataset()
|
|
100
|
+
# Then
|
|
101
|
+
observe_doc_from_file = next(
|
|
102
|
+
task.read(tags=Tag.input_dataset_observe_frames(), decoder=json_decoder)
|
|
103
|
+
)
|
|
104
|
+
parameters_doc_from_file = next(
|
|
105
|
+
task.read(tags=Tag.input_dataset_parameters(), decoder=json_decoder)
|
|
106
|
+
)
|
|
107
|
+
with pytest.raises(StopIteration):
|
|
108
|
+
calibration_doc_from_file = next(
|
|
109
|
+
task.read(tags=Tag.input_dataset_calibration_frames(), decoder=json_decoder)
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
66
113
|
def test_format_frame_transfer_items(transfer_l0_data_task):
|
|
67
114
|
"""
|
|
68
115
|
:Given: a TransferL0Data task with a downloaded input dataset
|
|
@@ -24,6 +24,9 @@ from dkist_processing_common.models.wavelength import WavelengthRange
|
|
|
24
24
|
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
|
+
from dkist_processing_common.tests.test_transfer_input_data import (
|
|
28
|
+
FakeGQLClientMissingInputDatasetPart,
|
|
29
|
+
)
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
class FakeGQLClientDefaultRecipeConfiguration(FakeGQLClient):
|
|
@@ -484,6 +487,29 @@ def test_reprocessing_keys(write_l1_task, mocker):
|
|
|
484
487
|
assert header["PRODUCT"] == task.compute_product_id(header["IDSOBSID"], header["PROCTYPE"])
|
|
485
488
|
|
|
486
489
|
|
|
490
|
+
def test_missing_input_dataset_part(write_l1_task, mocker):
|
|
491
|
+
"""
|
|
492
|
+
:Given: a Write_L1 task with a missing calibration frames part
|
|
493
|
+
:When: running the task
|
|
494
|
+
:Then: the input dataset part keys are correctly written without throwing an exception
|
|
495
|
+
"""
|
|
496
|
+
mocker.patch(
|
|
497
|
+
"dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
|
|
498
|
+
new=FakeGQLClientMissingInputDatasetPart,
|
|
499
|
+
)
|
|
500
|
+
task, _, _ = write_l1_task
|
|
501
|
+
task()
|
|
502
|
+
files = list(task.read(tags=[Tag.frame(), Tag.output()]))
|
|
503
|
+
for file in files:
|
|
504
|
+
header = fits.open(file)[1].header
|
|
505
|
+
assert header["IDSPARID"] == task.metadata_store_input_dataset_parameters.inputDatasetPartId
|
|
506
|
+
assert (
|
|
507
|
+
header["IDSOBSID"]
|
|
508
|
+
== task.metadata_store_input_dataset_observe_frames.inputDatasetPartId
|
|
509
|
+
)
|
|
510
|
+
assert "IDSCALID" not in header
|
|
511
|
+
|
|
512
|
+
|
|
487
513
|
@pytest.mark.parametrize(
|
|
488
514
|
"ids_obs_id, proc_type",
|
|
489
515
|
[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dkist_processing_common-10.6.2 → dkist_processing_common-10.6.4}/dkist_processing_common/manual.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|