dkist-processing-common 11.0.0rc2__py3-none-any.whl → 11.1.0rc1__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.
Files changed (28) hide show
  1. changelog/255.misc.rst +3 -0
  2. dkist_processing_common/manual.py +2 -2
  3. dkist_processing_common/models/graphql.py +29 -22
  4. dkist_processing_common/models/input_dataset.py +4 -1
  5. dkist_processing_common/tasks/mixin/quality/_metrics.py +1 -1
  6. dkist_processing_common/tasks/trial_output_data.py +0 -3
  7. dkist_processing_common/tests/conftest.py +28 -221
  8. dkist_processing_common/tests/mock_metadata_store.py +237 -0
  9. dkist_processing_common/tests/test_assemble_movie.py +4 -3
  10. dkist_processing_common/tests/test_base.py +2 -3
  11. dkist_processing_common/tests/test_interservice_bus_mixin.py +0 -1
  12. dkist_processing_common/tests/test_output_data_base.py +4 -5
  13. dkist_processing_common/tests/test_publish_catalog_messages.py +2 -3
  14. dkist_processing_common/tests/test_quality_mixin.py +1 -1
  15. dkist_processing_common/tests/test_submit_dataset_metadata.py +2 -2
  16. dkist_processing_common/tests/test_teardown.py +14 -11
  17. dkist_processing_common/tests/test_transfer_input_data.py +79 -22
  18. dkist_processing_common/tests/test_transfer_l1_output_data.py +2 -3
  19. dkist_processing_common/tests/test_trial_catalog.py +7 -3
  20. dkist_processing_common/tests/test_trial_output_data.py +44 -64
  21. dkist_processing_common/tests/test_write_l1.py +82 -54
  22. {dkist_processing_common-11.0.0rc2.dist-info → dkist_processing_common-11.1.0rc1.dist-info}/METADATA +2 -2
  23. {dkist_processing_common-11.0.0rc2.dist-info → dkist_processing_common-11.1.0rc1.dist-info}/RECORD +25 -26
  24. changelog/256.feature.rst +0 -2
  25. changelog/257.feature.rst +0 -1
  26. changelog/259.feature.rst +0 -1
  27. {dkist_processing_common-11.0.0rc2.dist-info → dkist_processing_common-11.1.0rc1.dist-info}/WHEEL +0 -0
  28. {dkist_processing_common-11.0.0rc2.dist-info → dkist_processing_common-11.1.0rc1.dist-info}/top_level.txt +0 -0
@@ -6,11 +6,13 @@ import pytest
6
6
  from pydantic.dataclasses import dataclass as validating_dataclass
7
7
 
8
8
  from dkist_processing_common._util.scratch import WorkflowFileSystem
9
- from dkist_processing_common.models.graphql import RecipeRunResponse
9
+ from dkist_processing_common.models.graphql import RecipeRunConfiguration
10
10
  from dkist_processing_common.models.tags import Tag
11
11
  from dkist_processing_common.tasks.mixin.globus import GlobusTransferItem
12
12
  from dkist_processing_common.tasks.trial_output_data import TransferTrialData
13
- from dkist_processing_common.tests.conftest import FakeGQLClient
13
+ from dkist_processing_common.tests.mock_metadata_store import fake_gql_client_factory
14
+ from dkist_processing_common.tests.mock_metadata_store import make_default_recipe_run_response
15
+ from dkist_processing_common.tests.mock_metadata_store import RecipeRunResponseMapping
14
16
 
15
17
 
16
18
  @pytest.fixture
@@ -19,42 +21,46 @@ def destination_bucket() -> str:
19
21
 
20
22
 
21
23
  @pytest.fixture
22
- def recipe_run_configuration(
24
+ def fake_gql_client_recipe_run_configuration(
23
25
  custom_root_name,
24
26
  custom_dir_name,
25
27
  destination_bucket,
26
28
  ):
27
- class GQLClientWithConfiguration(FakeGQLClient):
28
- def execute_gql_query(self, **kwargs):
29
- response = super().execute_gql_query(**kwargs)
30
- if isinstance(response, list):
31
- if isinstance(response[0], RecipeRunResponse):
32
- response[0].configuration.trial_root_directory_name = custom_root_name
33
- response[0].configuration.trial_directory_name = custom_dir_name
34
- response[0].configuration.destination_bucket = destination_bucket
35
- return response
29
+ recipe_run_response = make_default_recipe_run_response()
30
+ configuration = RecipeRunConfiguration(
31
+ trial_root_directory_name=custom_root_name,
32
+ trial_directory_name=custom_dir_name,
33
+ destination_bucket=destination_bucket,
34
+ )
35
+ recipe_run_response.configuration = configuration.model_dump_json()
36
+
37
+ new_response_mapping = RecipeRunResponseMapping(response=recipe_run_response)
38
+ FakeGQLClientWithConfiguration = fake_gql_client_factory(
39
+ response_mapping_override=new_response_mapping
40
+ )
36
41
 
37
- return GQLClientWithConfiguration
42
+ return FakeGQLClientWithConfiguration
38
43
 
39
44
 
40
45
  @pytest.fixture
41
- def recipe_run_configuration_with_tag_lists(
46
+ def fake_gql_client_recipe_run_configuration_with_tag_lists(
42
47
  custom_root_name, custom_dir_name, destination_bucket, exclusive_tag_lists
43
48
  ):
44
- class GQLClientWithConfiguration(FakeGQLClient):
45
- def execute_gql_query(self, **kwargs):
46
- response = super().execute_gql_query(**kwargs)
47
- if isinstance(response, list):
48
- if isinstance(response[0], RecipeRunResponse):
49
- response[0].configuration.trial_root_directory_name = custom_root_name
50
- response[0].configuration.trial_directory_name = custom_dir_name
51
- response[0].configuration.destination_bucket = destination_bucket
52
- response[
53
- 0
54
- ].configuration.trial_exclusive_transfer_tag_lists = exclusive_tag_lists
55
- return response
56
-
57
- return GQLClientWithConfiguration
49
+ recipe_run_response = make_default_recipe_run_response()
50
+ configuration = RecipeRunConfiguration(
51
+ trial_root_directory_name=custom_root_name,
52
+ trial_directory_name=custom_dir_name,
53
+ destination_bucket=destination_bucket,
54
+ trial_exclusive_transfer_tag_lists=exclusive_tag_lists,
55
+ )
56
+ recipe_run_response.configuration = configuration.model_dump_json()
57
+
58
+ new_response_mapping = RecipeRunResponseMapping(response=recipe_run_response)
59
+ FakeGQLClientWithConfiguration = fake_gql_client_factory(
60
+ response_mapping_override=new_response_mapping
61
+ )
62
+
63
+ return FakeGQLClientWithConfiguration
58
64
 
59
65
 
60
66
  @pytest.fixture
@@ -64,11 +70,11 @@ def trial_output_task() -> type[TransferTrialData]:
64
70
 
65
71
  @pytest.fixture
66
72
  def basic_trial_output_task(
67
- recipe_run_id, recipe_run_configuration, trial_output_task, tmp_path, mocker
73
+ recipe_run_id, fake_gql_client_recipe_run_configuration, trial_output_task, tmp_path, mocker
68
74
  ):
69
75
  mocker.patch(
70
76
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
71
- new=recipe_run_configuration,
77
+ new=fake_gql_client_recipe_run_configuration,
72
78
  )
73
79
  proposal_id = "test_proposal_id"
74
80
  with trial_output_task(
@@ -115,10 +121,10 @@ class OutputFileNames:
115
121
  def complete_trial_output_task(
116
122
  request, recipe_run_id, trial_output_task, tmp_path, mocker
117
123
  ) -> tuple[TransferTrialData, str, OutputFileObjects]:
118
- recipe_run = request.param
124
+ fake_gql_client = request.param
119
125
  mocker.patch(
120
126
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
121
- new=request.getfixturevalue(recipe_run),
127
+ new=request.getfixturevalue(fake_gql_client),
122
128
  )
123
129
  proposal_id = "test_proposal_id"
124
130
  with trial_output_task(
@@ -235,7 +241,9 @@ def test_format_object_key(
235
241
  )
236
242
 
237
243
 
238
- @pytest.mark.parametrize("complete_trial_output_task", ["recipe_run_configuration"], indirect=True)
244
+ @pytest.mark.parametrize(
245
+ "complete_trial_output_task", ["fake_gql_client_recipe_run_configuration"], indirect=True
246
+ )
239
247
  @pytest.mark.parametrize(
240
248
  "custom_root_name, custom_dir_name",
241
249
  [
@@ -283,7 +291,9 @@ def test_build_transfer_list(
283
291
 
284
292
 
285
293
  @pytest.mark.parametrize(
286
- "complete_trial_output_task", ["recipe_run_configuration_with_tag_lists"], indirect=True
294
+ "complete_trial_output_task",
295
+ ["fake_gql_client_recipe_run_configuration_with_tag_lists"],
296
+ indirect=True,
287
297
  )
288
298
  @pytest.mark.parametrize(
289
299
  "custom_root_name, custom_dir_name, exclusive_tag_lists, expected_output",
@@ -326,33 +336,3 @@ def test_build_transfer_list_with_exclusive_tag_lists(
326
336
  assert transfer_item.destination_path == expected_destination_path
327
337
  with transfer_item.source_path.open(mode="rb") as f:
328
338
  assert file_obj == f.read()
329
-
330
-
331
- @pytest.mark.parametrize(
332
- "complete_trial_output_task", ["recipe_run_configuration_with_tag_lists"], indirect=True
333
- )
334
- @pytest.mark.parametrize(
335
- "custom_root_name, custom_dir_name, exclusive_tag_lists",
336
- [
337
- pytest.param(
338
- None, None, [Tag.task("TASKY_MCTASKERSON")], id="Default trial dir and trial root names"
339
- )
340
- ],
341
- )
342
- def test_build_transfer_list_with_bad_exclusive_tag_lists(
343
- complete_trial_output_task,
344
- destination_bucket,
345
- custom_dir_name,
346
- custom_root_name,
347
- exclusive_tag_lists,
348
- ):
349
- """
350
- :Given: A Task based on TrialTransferDataBase
351
- :When: The exclusive tag list is a simple list instead of the required list of lists
352
- :Then: The correct value error is raised
353
- """
354
- task, proposal_id, output_file_objects, output_file_names = complete_trial_output_task
355
-
356
- with pytest.raises(ValueError) as ve:
357
- transfer_list = task.build_transfer_list()
358
- assert f"tag_lists={exclusive_tag_lists} must" in str(ve)
@@ -18,27 +18,70 @@ from dkist_processing_common._util.scratch import WorkflowFileSystem
18
18
  from dkist_processing_common.codecs.fits import fits_hdu_decoder
19
19
  from dkist_processing_common.codecs.fits import fits_hdulist_encoder
20
20
  from dkist_processing_common.models.graphql import RecipeRunProvenanceResponse
21
- from dkist_processing_common.models.graphql import RecipeRunResponse
22
21
  from dkist_processing_common.models.tags import Tag
23
22
  from dkist_processing_common.models.wavelength import WavelengthRange
24
23
  from dkist_processing_common.tasks.write_l1 import WriteL1Frame
25
- from dkist_processing_common.tests.conftest import FakeGQLClient
26
- from dkist_processing_common.tests.conftest import TILE_SIZE
27
- from dkist_processing_common.tests.test_transfer_input_data import (
28
- FakeGQLClientMissingInputDatasetCalibrationPart,
24
+ from dkist_processing_common.tests.mock_metadata_store import fake_gql_client_factory
25
+ from dkist_processing_common.tests.mock_metadata_store import InputDatasetRecipeRunResponseMapping
26
+ from dkist_processing_common.tests.mock_metadata_store import (
27
+ make_default_input_dataset_recipe_run_response,
29
28
  )
29
+ from dkist_processing_common.tests.mock_metadata_store import make_default_recipe_run_response
30
+ from dkist_processing_common.tests.mock_metadata_store import RecipeRunResponseMapping
31
+ from dkist_processing_common.tests.mock_metadata_store import TILE_SIZE
32
+
33
+
34
+ @pytest.fixture
35
+ def fake_gql_client_default_configuration():
36
+ """Create GraphQL client Mock that returns result without recipe run configuration."""
37
+ recipe_run_response = make_default_recipe_run_response()
38
+ recipe_run_response.configuration = None
39
+ new_response_mapping = RecipeRunResponseMapping(response=recipe_run_response)
40
+ FakeGQLClientDefaultConfiguration = fake_gql_client_factory(
41
+ response_mapping_override=new_response_mapping
42
+ )
30
43
 
44
+ return FakeGQLClientDefaultConfiguration
31
45
 
32
- class FakeGQLClientDefaultRecipeConfiguration(FakeGQLClient):
33
- def execute_gql_query(self, **kwargs):
34
- response = super().execute_gql_query(**kwargs)
35
- if type(response[0]) == RecipeRunResponse:
36
- # Test converting returned None to a default configuration
37
- new_response = response[0].model_validate(
38
- {**response[0].model_dump(), "configuration": None}
39
- )
40
- response[0] = new_response
41
- return response
46
+
47
+ @pytest.fixture
48
+ def fake_gql_client_missing_calibration_part():
49
+ """Create GraphQL client Mock that returns result without calibration part."""
50
+ input_dataset_recipe_run_response = make_default_input_dataset_recipe_run_response()
51
+ dataset_parts = (
52
+ input_dataset_recipe_run_response.recipeInstance.inputDataset.inputDatasetInputDatasetParts
53
+ )
54
+ for index, part in enumerate(dataset_parts):
55
+ if (
56
+ part.inputDatasetPart.inputDatasetPartType.inputDatasetPartTypeName
57
+ == "calibration_frames"
58
+ ):
59
+ del dataset_parts[index]
60
+ new_response_mapping = InputDatasetRecipeRunResponseMapping(
61
+ response=input_dataset_recipe_run_response
62
+ )
63
+ FakeGQLClientMissingInputDatasetCalibrationPart = fake_gql_client_factory(
64
+ response_mapping_override=new_response_mapping
65
+ )
66
+
67
+ return FakeGQLClientMissingInputDatasetCalibrationPart
68
+
69
+
70
+ @pytest.fixture()
71
+ def make_fake_gql_client_with_provenance():
72
+ """Create GraphQL client Mocks that will return customizable provenance records."""
73
+
74
+ def class_generator(provenances: list[RecipeRunProvenanceResponse]):
75
+ recipe_run_response = make_default_recipe_run_response()
76
+ recipe_run_response.recipeRunProvenances = provenances
77
+ new_response_mapping = RecipeRunResponseMapping(response=recipe_run_response)
78
+ FakeGQLClientProvenances = fake_gql_client_factory(
79
+ response_mapping_override=new_response_mapping
80
+ )
81
+
82
+ return FakeGQLClientProvenances
83
+
84
+ return class_generator
42
85
 
43
86
 
44
87
  class CompleteWriteL1Frame(WriteL1Frame):
@@ -260,25 +303,6 @@ def write_l1_task_no_data(request, recipe_run_id, tmp_path, complete_common_head
260
303
  task._purge()
261
304
 
262
305
 
263
- @pytest.fixture()
264
- def make_mock_gql_client_with_provenance():
265
- """Factory to create GraphQL client Mocks that will return customizable provenance records."""
266
-
267
- def factory(provenances: list[RecipeRunProvenanceResponse]):
268
- class WriteL1FakeGQLClient(FakeGQLClient):
269
- def execute_gql_query(self, **kwargs):
270
- response = super().execute_gql_query(**kwargs)
271
- if isinstance(response, list):
272
- if isinstance(response[0], RecipeRunResponse):
273
- response: list[RecipeRunResponse]
274
- response[0].recipeRunProvenances = provenances
275
- return response
276
-
277
- return WriteL1FakeGQLClient
278
-
279
- return factory
280
-
281
-
282
306
  @pytest.mark.parametrize(
283
307
  "provenances, is_manual",
284
308
  [
@@ -313,7 +337,7 @@ def make_mock_gql_client_with_provenance():
313
337
  def test_write_l1_frame(
314
338
  write_l1_task,
315
339
  mocker,
316
- make_mock_gql_client_with_provenance,
340
+ make_fake_gql_client_with_provenance,
317
341
  provenances: list[RecipeRunProvenanceResponse],
318
342
  is_manual,
319
343
  ):
@@ -322,7 +346,7 @@ def test_write_l1_frame(
322
346
  :When: running the task
323
347
  :Then: no errors are raised and the MANPROC and FRAMEVOL headers are correct
324
348
  """
325
- WriteL1GQLClient = make_mock_gql_client_with_provenance(provenances=provenances)
349
+ WriteL1GQLClient = make_fake_gql_client_with_provenance(provenances=provenances)
326
350
 
327
351
  mocker.patch(
328
352
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=WriteL1GQLClient
@@ -405,14 +429,14 @@ def test_calculate_telapse(write_l1_task):
405
429
  assert task.calculate_telapse(header=header) == 86400
406
430
 
407
431
 
408
- def test_solarnet_keys(write_l1_task, mocker):
432
+ def test_solarnet_keys(write_l1_task, mocker, fake_gql_client):
409
433
  """
410
434
  :Given: files with headers converted to SPEC 214 L1
411
435
  :When: checking the solarnet extra headers
412
436
  :Then: the correct values are found
413
437
  """
414
438
  mocker.patch(
415
- "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=FakeGQLClient
439
+ "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=fake_gql_client
416
440
  )
417
441
  mocker.patch(
418
442
  "dkist_processing_common.tasks.write_l1.WriteL1Frame.version_from_module_name",
@@ -437,14 +461,14 @@ def test_solarnet_keys(write_l1_task, mocker):
437
461
  assert header["WAVEMAX"] == 1085.0
438
462
 
439
463
 
440
- def test_documentation_keys(write_l1_task, mocker):
464
+ def test_documentation_keys(write_l1_task, mocker, fake_gql_client):
441
465
  """
442
466
  :Given: files with headers converted to SPEC 214 L1
443
467
  :When: checking the documentation header URLs
444
468
  :Then: the correct values are found
445
469
  """
446
470
  mocker.patch(
447
- "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=FakeGQLClient
471
+ "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=fake_gql_client
448
472
  )
449
473
  mocker.patch(
450
474
  "dkist_processing_common.tasks.write_l1.WriteL1Frame.version_from_module_name",
@@ -475,9 +499,9 @@ def test_get_version_from_module(write_l1_task):
475
499
  assert task.version_from_module_name() == common_version
476
500
 
477
501
 
478
- def test_get_tile_size(write_l1_task, mocker):
502
+ def test_get_tile_size(write_l1_task, mocker, fake_gql_client):
479
503
  mocker.patch(
480
- "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=FakeGQLClient
504
+ "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=fake_gql_client
481
505
  )
482
506
  task, _, _ = write_l1_task
483
507
  test_array = np.zeros((1, TILE_SIZE // 2, TILE_SIZE * 2))
@@ -485,14 +509,14 @@ def test_get_tile_size(write_l1_task, mocker):
485
509
  assert tile_size == [1, TILE_SIZE // 2, TILE_SIZE]
486
510
 
487
511
 
488
- def test_rice_compression_with_specified_tile_size(write_l1_task, mocker):
512
+ def test_rice_compression_with_specified_tile_size(write_l1_task, mocker, fake_gql_client):
489
513
  """
490
514
  :Given: a write_L1 task with a specified tile size in the recipe configuration
491
515
  :When: running the task
492
516
  :Then: data is written with the compression tile size specified in the recipe configuration
493
517
  """
494
518
  mocker.patch(
495
- "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=FakeGQLClient
519
+ "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=fake_gql_client
496
520
  )
497
521
  task, _, _ = write_l1_task
498
522
  task()
@@ -507,7 +531,9 @@ def test_rice_compression_with_specified_tile_size(write_l1_task, mocker):
507
531
  assert comp_header["ZTILE" + str(i + 1)] == min(dim, TILE_SIZE)
508
532
 
509
533
 
510
- def test_rice_compression_with_default_tile_size(write_l1_task, mocker):
534
+ def test_rice_compression_with_default_tile_size(
535
+ write_l1_task, mocker, fake_gql_client_default_configuration
536
+ ):
511
537
  """
512
538
  :Given: a write_L1 task with no specified tile size in the recipe configuration
513
539
  :When: running the task
@@ -517,7 +543,7 @@ def test_rice_compression_with_default_tile_size(write_l1_task, mocker):
517
543
  """
518
544
  mocker.patch(
519
545
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
520
- new=FakeGQLClientDefaultRecipeConfiguration,
546
+ new=fake_gql_client_default_configuration,
521
547
  )
522
548
  task, _, _ = write_l1_task
523
549
  task()
@@ -534,7 +560,7 @@ def test_rice_compression_with_default_tile_size(write_l1_task, mocker):
534
560
  assert comp_header["ZTILE3"] == 1
535
561
 
536
562
 
537
- def test_reprocessing_keys(write_l1_task, mocker):
563
+ def test_reprocessing_keys(write_l1_task, mocker, fake_gql_client):
538
564
  """
539
565
  :Given: a write_L1 task with reprocessing keys present
540
566
  :When: running the task
@@ -542,7 +568,7 @@ def test_reprocessing_keys(write_l1_task, mocker):
542
568
  """
543
569
  mocker.patch(
544
570
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
545
- new=FakeGQLClient,
571
+ new=fake_gql_client,
546
572
  )
547
573
  task, _, _ = write_l1_task
548
574
  task()
@@ -564,7 +590,9 @@ def test_reprocessing_keys(write_l1_task, mocker):
564
590
  assert header["PRODUCT"] == task.compute_product_id(header["IDSOBSID"], header["PROCTYPE"])
565
591
 
566
592
 
567
- def test_missing_input_dataset_part(write_l1_task, mocker):
593
+ def test_missing_input_dataset_part(
594
+ write_l1_task, mocker, fake_gql_client_missing_calibration_part
595
+ ):
568
596
  """
569
597
  :Given: a Write_L1 task with a missing calibration frames part
570
598
  :When: running the task
@@ -572,7 +600,7 @@ def test_missing_input_dataset_part(write_l1_task, mocker):
572
600
  """
573
601
  mocker.patch(
574
602
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
575
- new=FakeGQLClientMissingInputDatasetCalibrationPart,
603
+ new=fake_gql_client_missing_calibration_part,
576
604
  )
577
605
  task, _, _ = write_l1_task
578
606
  task()
@@ -638,7 +666,7 @@ def test_add_contributing_id_headers(write_l1_task):
638
666
  assert header["NEXPERS"] == 3
639
667
 
640
668
 
641
- def test_spectral_line_keys(write_l1_task, mocker):
669
+ def test_spectral_line_keys(write_l1_task, mocker, fake_gql_client):
642
670
  """
643
671
  :Given: a header
644
672
  :When: adding spectral line information to the headers
@@ -646,7 +674,7 @@ def test_spectral_line_keys(write_l1_task, mocker):
646
674
  """
647
675
  mocker.patch(
648
676
  "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient",
649
- new=FakeGQLClient,
677
+ new=fake_gql_client,
650
678
  )
651
679
  task, _, header = write_l1_task
652
680
  header = task.add_datacenter_headers(header=header, hdu_size=1024, stokes="I")
@@ -713,14 +741,14 @@ def test_get_waveband(write_l1_task, wavelength, wavemin, wavemax, expected):
713
741
  assert waveband == expected
714
742
 
715
743
 
716
- def test_empty_waveband(write_l1_task_with_empty_waveband, mocker):
744
+ def test_empty_waveband(write_l1_task_with_empty_waveband, mocker, fake_gql_client):
717
745
  """
718
746
  :Given: a header converted to SPEC 214 L1 and a wavelength range that has no listed spectral lines
719
747
  :When: checking the waveband key
720
748
  :Then: it does not exist
721
749
  """
722
750
  mocker.patch(
723
- "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=FakeGQLClient
751
+ "dkist_processing_common.tasks.mixin.metadata_store.GraphQLClient", new=fake_gql_client
724
752
  )
725
753
  mocker.patch(
726
754
  "dkist_processing_common.tasks.write_l1.WriteL1Frame.version_from_module_name",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkist-processing-common
3
- Version: 11.0.0rc2
3
+ Version: 11.1.0rc1
4
4
  Summary: Common task classes used by the DKIST science data processing pipelines
5
5
  Author-email: NSO / AURA <dkistdc@nso.edu>
6
6
  License: BSD-3-Clause
@@ -61,7 +61,7 @@ Requires-Dist: dkist-inventory<2.0,>=1.6.0; extra == "inventory"
61
61
  Provides-Extra: asdf
62
62
  Requires-Dist: dkist-inventory[asdf]<2.0,>=1.6.0; extra == "asdf"
63
63
  Provides-Extra: quality
64
- Requires-Dist: dkist-quality<2.0,>=1.3.0rc2; extra == "quality"
64
+ Requires-Dist: dkist-quality<2.0,>=1.3.0; extra == "quality"
65
65
 
66
66
  dkist-processing-common
67
67
  =======================
@@ -1,10 +1,8 @@
1
1
  changelog/.gitempty,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- changelog/256.feature.rst,sha256=i_Nf4STs2fP2MNZ3Ec4I5K4Avh0oLD8LF4i8G_x19VM,175
3
- changelog/257.feature.rst,sha256=5RIxMuwnHi6lrTZ_RC1GVRqx9nFHM--ShQEfdaVGqv0,90
4
- changelog/259.feature.rst,sha256=G2UIyD1cpP8ptpDk39bSI4TvqLt46HAyjWJIQ7VSVXs,95
2
+ changelog/255.misc.rst,sha256=Y0CIOQbdAK8Emlz6wQaX59hg1Hr9QDhDMv7-Z-OpbAU,255
5
3
  dkist_processing_common/__init__.py,sha256=490Fwm_GgqpwriQlsYfKcLUZNhZ6GkINtJqcYSIEKoU,319
6
4
  dkist_processing_common/config.py,sha256=IcpaD_NvHZU-aLlUNOTdRC4V7ADIvVQwrZ2dHhIr4NY,4247
7
- dkist_processing_common/manual.py,sha256=M7FW1viESaTfK1jLqHLp7JMGTGeoTxHtgCXRjZpDR8g,6990
5
+ dkist_processing_common/manual.py,sha256=mrW__HupEZMYOxUxfKsdsTI3TfOrOrWHS9yXC_835W4,7023
8
6
  dkist_processing_common/_util/__init__.py,sha256=xf6JNpMKQgbhE2Jivymt-WO0WF6PpGt9rl604YpuTWk,92
9
7
  dkist_processing_common/_util/constants.py,sha256=b0zlRaT09aGj2RU72OQ5J-8u6Z_RevPXtcyx5tlnf-Y,3244
10
8
  dkist_processing_common/_util/graphql.py,sha256=qjsvLWDHqb1X7hDLA8uqbpOIDjZZ2mjsSIL0Wkt1TJc,3420
@@ -29,8 +27,8 @@ dkist_processing_common/models/dkist_location.py,sha256=3cbN6As60tJa0uoOSNFNnz2s
29
27
  dkist_processing_common/models/fits_access.py,sha256=Au9JROwhVla9zb_u0dN8mIWiSJd_Pca0oOr4N1hN0HY,4113
30
28
  dkist_processing_common/models/flower_pot.py,sha256=59C5uGYKyMyncqQYxhzDZWl8k1DRZFB6s9RF-HFp9mY,5128
31
29
  dkist_processing_common/models/fried_parameter.py,sha256=ro_H2Eo3I88lRf1wJjZfTc_XOjhgLt4whIQR_sjAFbM,1609
32
- dkist_processing_common/models/graphql.py,sha256=BBJBIBADAPQAskqS8Qh58DYEyFjY9GY9ZN8nrJ1EKHs,5364
33
- dkist_processing_common/models/input_dataset.py,sha256=OZDxyjHZfFrksFGpas1gsB14Q77CeNsk_nI-EYo3ZRI,4121
30
+ dkist_processing_common/models/graphql.py,sha256=RcFlSDTtV6TwHExb9Y89NhTfLMx2ysdqecY7kHuRwg0,5690
31
+ dkist_processing_common/models/input_dataset.py,sha256=stQa_lbFPr2tmOUpQgpDuwM0-DiIDV3zYwyawh01cKc,4172
34
32
  dkist_processing_common/models/message.py,sha256=DRW7Qhl01dF5KagcqLta5U-uzdOMewrsHvMatDT6jnk,1684
35
33
  dkist_processing_common/models/message_queue_binding.py,sha256=ROQ2ZQE3TCr4gVbz4WggvUSExAiWP8SD_GjjQl482M8,1012
36
34
  dkist_processing_common/models/metric_code.py,sha256=mF-i0nuzko7K949aS01hEsssGes_PIF5B0b_mVqwoL4,847
@@ -65,7 +63,7 @@ dkist_processing_common/tasks/quality_metrics.py,sha256=dWuPKBD5elRCZEs4ZC91tyXx
65
63
  dkist_processing_common/tasks/teardown.py,sha256=e4LKnphJDYDVDAez2tH7MxpZgCmxYsKrq9Zk0qAkzzM,2355
66
64
  dkist_processing_common/tasks/transfer_input_data.py,sha256=8dDOfnT46qavGW-6fy-FT9LVb0TXANSpk1WpACpWK70,5787
67
65
  dkist_processing_common/tasks/trial_catalog.py,sha256=Y3DKstRfMS8nWWtJFMB0MUVPlZ1jWS_2jhJGMWwxy50,8748
68
- dkist_processing_common/tasks/trial_output_data.py,sha256=aI_aRuu0qVO8zFGrr_9baxx9i3jUEHZSmsmbO6ytlkE,6960
66
+ dkist_processing_common/tasks/trial_output_data.py,sha256=ehuts_L_GrnTRsVNeoh1N2kgQhId6_FnrMEiJ_2X_Jc,6834
69
67
  dkist_processing_common/tasks/write_l1.py,sha256=EtCy7vltkZsZgoCAQybKgI35nmQncm0XrhIKxGJGSyc,22615
70
68
  dkist_processing_common/tasks/mixin/__init__.py,sha256=-g-DQbU7m1bclJYuFe3Yh757V-35GIDTbstardKQ7nU,68
71
69
  dkist_processing_common/tasks/mixin/globus.py,sha256=QAV8VElxMAqxJ2KSB_bJaraceovYfjHXjOdocrTCkIA,6592
@@ -74,12 +72,13 @@ dkist_processing_common/tasks/mixin/metadata_store.py,sha256=yTKijpQ-tNx_H2V_9Hs
74
72
  dkist_processing_common/tasks/mixin/object_store.py,sha256=Vn4l2XuCimii9Fc3gM-pQGIkTKMv_ldqljlxkLesZLU,3236
75
73
  dkist_processing_common/tasks/mixin/quality/__init__.py,sha256=Bgu-DHW7yXLiehglldOCWluEkAP5qh0Hp1F30rh5NFw,383
76
74
  dkist_processing_common/tasks/mixin/quality/_base.py,sha256=U1AEhj6OtF4YEdTkKWcgmoH6zrz6tYNjNXnmVU24L70,8491
77
- dkist_processing_common/tasks/mixin/quality/_metrics.py,sha256=QUO6BWcFHZVc_QiXulGKnJk6cVzOalpFJq1Gusb7nZU,59844
75
+ dkist_processing_common/tasks/mixin/quality/_metrics.py,sha256=sQspAXoeSA2dQSX6wQuJKGON2XFilB5t29kNXhSLMmY,59844
78
76
  dkist_processing_common/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
- dkist_processing_common/tests/conftest.py,sha256=Rz1r2_by8aRZslSkS4AduEtpu3cpPxsAonZQyUCBPSQ,30867
80
- dkist_processing_common/tests/test_assemble_movie.py,sha256=XY_ruXSYP5k6s2gUAwlFdnhJ81eyWLSd2O9IkX4RXeo,4165
77
+ dkist_processing_common/tests/conftest.py,sha256=xTmu87MZSPIcucg9UCH88OimdqgjE5VSc-n-fSFbtjI,22319
78
+ dkist_processing_common/tests/mock_metadata_store.py,sha256=ZVxAtVoW8ayEceafeR8yJbGdFZsw13Eyf1Z2-rwGZDM,8260
79
+ dkist_processing_common/tests/test_assemble_movie.py,sha256=RI7Kitd-XNmba-o5pUgqURocXPFi15T-mEvWaSbsN6U,4125
81
80
  dkist_processing_common/tests/test_assemble_quality.py,sha256=j0n67prmjxbBxkqgurmanfH4puCTYytn4thpEXe7u2s,17902
82
- dkist_processing_common/tests/test_base.py,sha256=4ST3__jEHitEQaQs9-0OcqtyEJfIjZsk_6PRYZFV2-U,7124
81
+ dkist_processing_common/tests/test_base.py,sha256=EQsIkeWoOtjk0yxr_oPkhW3Uc0p8cMsknSMwKgrJI9E,7078
83
82
  dkist_processing_common/tests/test_codecs.py,sha256=FGhldrTdc28YD9FKrsW3lZ34LtvzecGP1qNi9fGHVGQ,22173
84
83
  dkist_processing_common/tests/test_constants.py,sha256=Kc9k5TdYy5QkRRlGav6kfI2dy5HHKqtpf9qOuaAfDZU,5903
85
84
  dkist_processing_common/tests/test_cs_step.py,sha256=RA0QD3D8eaL3YSOL_gIJ9wkngy14RQ2jbD-05KAziW4,2408
@@ -89,27 +88,27 @@ dkist_processing_common/tests/test_flower_pot.py,sha256=X9_UI3maa3ZQncV3jYHgovWn
89
88
  dkist_processing_common/tests/test_fried_parameter.py,sha256=iXtlQIifZ6cDOkEi-YDgP3oAlss2loq08Uohgvy1byQ,1295
90
89
  dkist_processing_common/tests/test_input_dataset.py,sha256=pQ01rWAkQ2XQojyHWzAqeOdrMXshNcgEVL5I_9bBTdo,9610
91
90
  dkist_processing_common/tests/test_interservice_bus.py,sha256=M_iv2CLmx5TnCB1VUN4YjkQ2LEUjfCKk7-ZlkV62XEQ,3000
92
- dkist_processing_common/tests/test_interservice_bus_mixin.py,sha256=8TTl0aypkq5gBPeyqSaQHbz_jmt5RmSD2oI8kT4Q1ZA,4195
91
+ dkist_processing_common/tests/test_interservice_bus_mixin.py,sha256=ej2g5k7yi8s7lZKJm6zEItFs_1U_vQNkz0kT5RfueQY,4130
93
92
  dkist_processing_common/tests/test_manual_processing.py,sha256=wAZJztsF33jzJE3m3vJ6cJT0ujgIkMg01jGq-Ys_a4c,1045
94
- dkist_processing_common/tests/test_output_data_base.py,sha256=Y9MFz5xw11tAnKjpHH7qrzsRYP1rZM_Trt4AylY0S6k,3120
93
+ dkist_processing_common/tests/test_output_data_base.py,sha256=Od7qgg61CMBfh86Kv4Reuf73aIlen1kn2sZ-J_8GRiI,3093
95
94
  dkist_processing_common/tests/test_parameters.py,sha256=kNzX89vfrNRJ8d9rusMVv4DM9rPD3l-7HIstZsLoYBE,14033
96
95
  dkist_processing_common/tests/test_parse_l0_input_data.py,sha256=SMNV1qyQTvnMx94MCNsiA-RyS9uxaxIABEDDxsuVzqY,10629
97
- dkist_processing_common/tests/test_publish_catalog_messages.py,sha256=wB2lcAnT77yVnqO0cFWOPxGf-tZ8U62kvvpiB5roBwQ,3268
96
+ dkist_processing_common/tests/test_publish_catalog_messages.py,sha256=l6Wga1s2wNBIf4wGZ78ZIO_rtqjdidmtvlN9nMnQUAs,3222
98
97
  dkist_processing_common/tests/test_quality.py,sha256=vomy2YSPadKqJj2tG8sCs-UkQVvfKus7Cum7_Hpee4I,10257
99
- dkist_processing_common/tests/test_quality_mixin.py,sha256=AFYLr6ZRWuxsAdPqvwwcgMfPhYCHKJRX-0oLJgoIDmg,55120
98
+ dkist_processing_common/tests/test_quality_mixin.py,sha256=NVpHCHVAO_kbM1hfgOCYYzq88zZP2jOEEjkOfaS8jcY,55120
100
99
  dkist_processing_common/tests/test_scratch.py,sha256=7f28FMiSskSNX-bkRSrpJf2u1HQIbSvYajbjkeGMF9s,16481
101
100
  dkist_processing_common/tests/test_stems.py,sha256=ini5dylLT5ioWKKWd1uu6kwx8Tf3aEnKKaGjf46a_GI,32649
102
- dkist_processing_common/tests/test_submit_dataset_metadata.py,sha256=F1IKBFWhjjMhONxEgs5p-cpjbQwxh7BLhDFw9b6j874,3806
101
+ dkist_processing_common/tests/test_submit_dataset_metadata.py,sha256=LHEyjoIxJHXXssqKkr8Qn1NzzHD1FLJiD3lP8yaLiXU,3764
103
102
  dkist_processing_common/tests/test_tags.py,sha256=UwlOJ45rkvbfbd5L5m5YltvOxQc8kGqJEn5V81H33U8,5023
104
103
  dkist_processing_common/tests/test_task_name.py,sha256=kqFr59XX2K87xzfTlClzDV4-Je1dx72LvdaJ22UE8UU,1233
105
104
  dkist_processing_common/tests/test_task_parsing.py,sha256=QXt1X6DTO3_liBD2c-t84DToLeEn7B3J-eteIyN4HEM,4027
106
- dkist_processing_common/tests/test_teardown.py,sha256=w2sATQHkg2lMLvm6VFZF1mNGFYHwWj_SxvF9RQu-tuY,5362
107
- dkist_processing_common/tests/test_transfer_input_data.py,sha256=B-kDsGJTUxxnamN4xjn69TFiY_TEN8MmhHNndP6bKac,10301
108
- dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=27PifkyH3RZg0nsM-AjmrFJ-hbYuCk5Tt_0Zx8PJBfM,2109
109
- dkist_processing_common/tests/test_trial_catalog.py,sha256=SZ-nyn0MXU9Lkg_94FbKER_cwiGoi06GYlzF_3AmvKg,6802
110
- dkist_processing_common/tests/test_trial_output_data.py,sha256=cBCj0kXyF5NEMzKh6zPVksdoXyE8ju1opJgWgjdcJWA,12790
105
+ dkist_processing_common/tests/test_teardown.py,sha256=nlKiqcy-AgYumMdXMu3_7vm-fiq3PsuzpOugkNfOorE,5601
106
+ dkist_processing_common/tests/test_transfer_input_data.py,sha256=bLBQs7qiYKJz3MNgRd8jOSGY6hDYeW9jfxN_lia3yIw,12619
107
+ dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=PVGDJBEUk4kAeu8ivrhlCE7yd29R18t9kZLFx-mpBwY,2063
108
+ dkist_processing_common/tests/test_trial_catalog.py,sha256=y5SDjns8CoAY_Wr3pgkYwvRB-ieRXavbF5_2AZ4NFNM,6777
109
+ dkist_processing_common/tests/test_trial_output_data.py,sha256=TUPycx_hDgyQj_k6xqDQXgS25yrz78vh78SArZHHm0g,12008
111
110
  dkist_processing_common/tests/test_workflow_task_base.py,sha256=Z5aPW5LQtS0UWJiYho4X0r-2gPLfzpkmMwfmaoFLjMg,10517
112
- dkist_processing_common/tests/test_write_l1.py,sha256=U0Ge-sSvtKT4t5YrVochbwxSb1R_Lk-fKNbheDmhjtc,26709
111
+ dkist_processing_common/tests/test_write_l1.py,sha256=Uj6eOCcmfrTTfRY7pgkS2tqaWH_9RFDg8KAFRJCLSQw,28020
113
112
  docs/Makefile,sha256=qnlVz6PuBqE39NfHWuUnHhNEA-EFgT2-WJNNNy9ttfk,4598
114
113
  docs/changelog.rst,sha256=S2jPASsWlQxSlAPqdvNrYvhk9k3FcFWNXFNDYXBSjl4,120
115
114
  docs/conf.py,sha256=FkX575cqTqZGCcLAjg2MlvE8Buj1Vt3CpHNgZxG256E,1890
@@ -118,7 +117,7 @@ docs/landing_page.rst,sha256=aPAuXFhBx73lEZ59B6E6JXxkK0LlxzD0n-HXqHrfumQ,746
118
117
  docs/make.bat,sha256=mBAhtURwhQ7yc95pqwJzlhqBSvRknr1aqZ5s8NKvdKs,4513
119
118
  docs/requirements.txt,sha256=Kbl_X4c7RQZw035YTeNB63We6I7pvXFU4T0Uflp2yDY,29
120
119
  licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
121
- dkist_processing_common-11.0.0rc2.dist-info/METADATA,sha256=cSPTrGL0pRaNTjlS1_iOkRX2vFLBkgyebjixp2i_Bbg,7207
122
- dkist_processing_common-11.0.0rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
123
- dkist_processing_common-11.0.0rc2.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
124
- dkist_processing_common-11.0.0rc2.dist-info/RECORD,,
120
+ dkist_processing_common-11.1.0rc1.dist-info/METADATA,sha256=dRRRLyGbSfnb7REoyDKxbfdrs8x9-iJelOzGHv9fcOg,7204
121
+ dkist_processing_common-11.1.0rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
122
+ dkist_processing_common-11.1.0rc1.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
123
+ dkist_processing_common-11.1.0rc1.dist-info/RECORD,,
changelog/256.feature.rst DELETED
@@ -1,2 +0,0 @@
1
- Move `location_of_dkist` from the `WriteL1` task to its own module (`~dkist_processing_common.models.dkist_location`).
2
- Also make it a constant variable instead of a function.
changelog/257.feature.rst DELETED
@@ -1 +0,0 @@
1
- `Stems` that only match a specific task types can now check against a list of task types.
changelog/259.feature.rst DELETED
@@ -1 +0,0 @@
1
- Add ability to store and build a quality metric showing the results of wavelength calibration.