dkist-processing-common 12.0.0__py3-none-any.whl → 12.0.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.
changelog/288.misc.rst ADDED
@@ -0,0 +1 @@
1
+ Upgrade dkist-processing-core to 7.0.0 which includes an upgrade of Airflow to 3.1.5 and python >= 3.13.
@@ -53,7 +53,6 @@ class BudName(StrEnum):
53
53
  dark_date_end = "DARK_DATE_END"
54
54
  solar_gain_date_end = "SOLAR_GAIN_DATE_END"
55
55
  polcal_date_end = "POLCAL_DATE_END"
56
- dark_num_raw_frames_per_fpa = "DARK_NUM_RAW_FRAMES_PER_FPA"
57
56
  solar_gain_num_raw_frames_per_fpa = "SOLAR_GAIN_NUM_RAW_FRAMES_PER_FPA"
58
57
  polcal_num_raw_frames_per_fpa = "POLCAL_NUM_RAW_FRAMES_PER_FPA"
59
58
  solar_gain_telescope_tracking_mode = "SOLAR_GAIN_TELESCOPE_TRACKING_MODE"
@@ -329,13 +328,6 @@ class ConstantsBase:
329
328
  """Return the date end constant for the polcal task."""
330
329
  return self._db_dict[BudName.polcal_date_end]
331
330
 
332
- @property
333
- def dark_num_raw_frames_per_fpa(self) -> dict[float, list]:
334
- """Return the dictionary of exposure times to number of raw frames per fpa."""
335
- raw_return = self._db_dict[BudName.dark_num_raw_frames_per_fpa]
336
- # convert nested lists to dictionary
337
- return {k: v for k, v in raw_return}
338
-
339
331
  @property
340
332
  def solar_gain_num_raw_frames_per_fpa(self) -> int:
341
333
  """Return the number of raw frames per fpa constant for the solar gain task."""
@@ -83,14 +83,19 @@ class TransferL1Data(TransferDataBase, GlobusMixin):
83
83
  def transfer_movie(self):
84
84
  """Transfer the movie to the object store."""
85
85
  paths = list(self.read(tags=[Tag.output(), Tag.movie()]))
86
-
87
- count = len(paths)
88
- if count != 1:
89
- raise RuntimeError(
90
- f"Expected exactly one movie to upload, found {count}. "
91
- f"recipe_run_id={self.recipe_run_id}"
86
+ if len(paths) == 0:
87
+ logger.warning(
88
+ f"No movies found to upload for dataset. recipe_run_id={self.recipe_run_id}"
92
89
  )
90
+ return
93
91
  movie = paths[0]
92
+ if count := len(paths) > 1:
93
+ # note: this needs to be an error or the dataset receipt accounting will have an
94
+ # expected count > the eventual actual
95
+ raise RuntimeError(
96
+ f"Multiple movies found to upload. Uploading the first one. "
97
+ f"{count=}, {movie=}, recipe_run_id={self.recipe_run_id}"
98
+ )
94
99
  logger.info(f"Uploading Movie: recipe_run_id={self.recipe_run_id}, {movie=}")
95
100
  movie_object_key = self.format_object_key(movie)
96
101
  self.object_store_upload_movie(
@@ -37,7 +37,6 @@ from dkist_processing_common.models.task_name import TaskName
37
37
  from dkist_processing_common.parsers.average_bud import TaskAverageBud
38
38
  from dkist_processing_common.parsers.experiment_id_bud import ContributingExperimentIdsBud
39
39
  from dkist_processing_common.parsers.experiment_id_bud import ExperimentIdBud
40
- from dkist_processing_common.parsers.lookup_bud import TaskTimeLookupBud
41
40
  from dkist_processing_common.parsers.observing_program_id_bud import (
42
41
  TaskContributingObservingProgramExecutionIdsBud,
43
42
  )
@@ -104,12 +103,6 @@ def dataset_extra_bud_factory() -> list[S]:
104
103
  constant_name=BudName.polcal_observing_program_execution_ids,
105
104
  ip_task_types=TaskName.polcal,
106
105
  ),
107
- TaskTimeLookupBud(
108
- constant_name=BudName.dark_num_raw_frames_per_fpa,
109
- key_metadata_key=MetadataKey.sensor_readout_exposure_time_ms,
110
- value_metadata_key=MetadataKey.num_raw_frames_per_fpa,
111
- ip_task_types=TaskName.dark,
112
- ),
113
106
  TaskUniqueBud(
114
107
  constant_name=BudName.solar_gain_num_raw_frames_per_fpa,
115
108
  metadata_key=MetadataKey.num_raw_frames_per_fpa,
@@ -78,7 +78,6 @@ class TransferL0Data(WorkflowTaskBase, GlobusMixin):
78
78
  self.tag(obj_path, tags=obj.tag)
79
79
  else:
80
80
  self.tag(obj_path, tags=[Tag.input(), Tag.frame()])
81
- logger.info(f"Tagged {len(input_dataset_objects)} input dataset objects in scratch")
82
81
 
83
82
  def run(self) -> None:
84
83
  """Execute the data transfer."""
@@ -17,7 +17,6 @@ from dkist_processing_common.models.flower_pot import Stem
17
17
  from dkist_processing_common.models.flower_pot import Thorn
18
18
  from dkist_processing_common.models.tags import StemName
19
19
  from dkist_processing_common.models.tags import Tag
20
- from dkist_processing_common.parsers.lookup_bud import TimeLookupBud
21
20
  from dkist_processing_common.parsers.single_value_single_key_flower import (
22
21
  SingleValueSingleKeyFlower,
23
22
  )
@@ -118,17 +117,6 @@ def visp_buds():
118
117
  return [UniqueBud(constant_name=BudName.num_modstates, metadata_key=ViSPMetadataKey.num_mod)]
119
118
 
120
119
 
121
- @pytest.fixture(scope="function")
122
- def visp_lookup_buds():
123
- return [
124
- TimeLookupBud(
125
- constant_name="LOOKUP_BUD",
126
- key_metadata_key=ViSPMetadataKey.num_mod,
127
- value_metadata_key=ViSPMetadataKey.modstate,
128
- )
129
- ]
130
-
131
-
132
120
  @pytest.fixture(scope="function")
133
121
  def empty_flowers():
134
122
  class EmptyFlower(Stem):
@@ -173,17 +161,8 @@ def picky_buds():
173
161
 
174
162
  @pytest.fixture(scope="function")
175
163
  def parse_inputs_task(
176
- tmp_path,
177
- visp_flowers,
178
- visp_buds,
179
- visp_lookup_buds,
180
- empty_flowers,
181
- empty_buds,
182
- picky_buds,
183
- recipe_run_id,
164
+ tmp_path, visp_flowers, visp_buds, empty_flowers, empty_buds, picky_buds, recipe_run_id
184
165
  ):
185
- """Override parse task class and make data for testing."""
186
-
187
166
  class TaskClass(ParseL0InputDataBase):
188
167
  @property
189
168
  def tag_flowers(self):
@@ -191,7 +170,7 @@ def parse_inputs_task(
191
170
 
192
171
  @property
193
172
  def constant_buds(self):
194
- return visp_buds + visp_lookup_buds + empty_buds + picky_buds
173
+ return visp_buds + empty_buds + picky_buds
195
174
 
196
175
  @property
197
176
  def fits_parsing_class(self):
@@ -231,8 +210,6 @@ def parse_inputs_task(
231
210
 
232
211
  @pytest.fixture()
233
212
  def visp_parse_inputs_task(tmp_path, visp_flowers, visp_buds, recipe_run_id):
234
- """Extend parse task class, but don't make data for testing."""
235
-
236
213
  class TaskClass(ParseL0InputDataBase):
237
214
  @property
238
215
  def tag_flowers(self):
@@ -266,13 +243,12 @@ def test_make_flowerpots(parse_inputs_task):
266
243
  tag_pot, constant_pot = parse_inputs_task.make_flower_pots()
267
244
 
268
245
  assert len(tag_pot.stems) == 2
269
- assert len(constant_pot.stems) == 4
246
+ assert len(constant_pot.stems) == 3
270
247
  assert tag_pot.stems[0].stem_name == StemName.modstate
271
248
  assert tag_pot.stems[1].stem_name == "EMPTY_FLOWER"
272
249
  assert constant_pot.stems[0].stem_name == BudName.num_modstates
273
- assert constant_pot.stems[1].stem_name == "LOOKUP_BUD"
274
- assert constant_pot.stems[2].stem_name == "EMPTY_BUD"
275
- assert constant_pot.stems[3].stem_name == "PICKY_BUD"
250
+ assert constant_pot.stems[1].stem_name == "EMPTY_BUD"
251
+ assert constant_pot.stems[2].stem_name == "PICKY_BUD"
276
252
 
277
253
 
278
254
  def test_subclass_flowers(visp_parse_inputs_task, max_cs_step_time_sec):
@@ -284,7 +260,7 @@ def test_subclass_flowers(visp_parse_inputs_task, max_cs_step_time_sec):
284
260
  tag_pot, constant_pot = visp_parse_inputs_task.make_flower_pots()
285
261
 
286
262
  assert len(tag_pot.stems) == 1
287
- assert len(constant_pot.stems) == 61
263
+ assert len(constant_pot.stems) == 60
288
264
  all_flower_names = [StemName.modstate]
289
265
  assert sorted([f.stem_name for f in tag_pot.stems]) == sorted(all_flower_names)
290
266
  all_bud_names = [b.stem_name for b in default_constant_bud_factory()] + [BudName.num_modstates]
@@ -320,23 +296,27 @@ def test_dataset_extra_bud_factory(visp_parse_inputs_task, max_cs_step_time_sec)
320
296
  ]
321
297
  for base in bud_name_base:
322
298
  assert "SOLAR_GAIN_" + base in stem_names
323
- # telescope mode keys are not constant for dark frames
324
- assert ("DARK_" + base in stem_names) ^ ("MODE" in base)
325
- # gos keys are not constant for polcal frames
326
- assert ("POLCAL_" + base in stem_names) ^ ("GOS" in base)
299
+ if base not in [
300
+ "NUM_RAW_FRAMES_PER_FPA",
301
+ "TELESCOPE_TRACKING_MODE",
302
+ "COUDE_TABLE_TRACKING_MODE",
303
+ "TELESCOPE_SCANNING_MODE",
304
+ ]:
305
+ assert "DARK_" + base in stem_names
306
+ if "GOS" not in base:
307
+ assert "POLCAL_" + base in stem_names
327
308
 
328
309
 
329
310
  def test_constants_correct(parse_inputs_task):
330
311
  """
331
312
  Given: ParseInputData task with a populated constant FlowerPot
332
313
  When: Updating pipeline constants
333
- Then: A pipeline constant is correctly populated and the values return correctly
314
+ Then: A pipeline constant is correctly populated
334
315
  """
335
316
  _, constant_pot = parse_inputs_task.make_flower_pots()
336
317
  parse_inputs_task.update_constants(constant_pot)
337
318
  assert dict(parse_inputs_task.constants._db_dict) == {
338
319
  BudName.num_modstates.value: parse_inputs_task._num_mod,
339
- "LOOKUP_BUD": [[parse_inputs_task._num_mod, [0, 1]]],
340
320
  }
341
321
 
342
322
 
@@ -1,4 +1,3 @@
1
- import collections
2
1
  from enum import StrEnum
3
2
  from itertools import chain
4
3
 
@@ -18,8 +17,6 @@ from dkist_processing_common.parsers.dsps_repeat import TotalDspsRepeatsBud
18
17
  from dkist_processing_common.parsers.experiment_id_bud import ContributingExperimentIdsBud
19
18
  from dkist_processing_common.parsers.experiment_id_bud import ExperimentIdBud
20
19
  from dkist_processing_common.parsers.id_bud import TaskContributingIdsBud
21
- from dkist_processing_common.parsers.lookup_bud import TaskTimeLookupBud
22
- from dkist_processing_common.parsers.lookup_bud import TimeLookupBud
23
20
  from dkist_processing_common.parsers.near_bud import NearFloatBud
24
21
  from dkist_processing_common.parsers.near_bud import TaskNearFloatBud
25
22
  from dkist_processing_common.parsers.observing_program_id_bud import (
@@ -206,7 +203,7 @@ def basic_header_objs():
206
203
  "ID___012": "experiment_id_1",
207
204
  "XPOSURE": 100.0,
208
205
  "TEXPOSUR": 11.0,
209
- "NSUMEXP": 5,
206
+ "NSUMEXP": 4,
210
207
  "DSPSNUM": 2,
211
208
  "DSPSREPS": 2,
212
209
  "DATE-OBS": "2022-06-17T22:00:03.000",
@@ -1090,49 +1087,4 @@ def test_task_average_bud(basic_header_objs):
1090
1087
  assert round(petal[0].value, 3) == 1.227
1091
1088
 
1092
1089
 
1093
- def test_time_lookup_bud(basic_header_objs):
1094
- """
1095
- Given: A set of headers with two differently valued header keys
1096
- When: Ingesting headers with a TimeLookupBud and asking for the value
1097
- Then: The bud's value is a dictionary of one key to sets of the other key as nested tuples
1098
- """
1099
- bud = TimeLookupBud(
1100
- constant_name="lookup",
1101
- key_metadata_key=FitsReaderMetadataKey.fpa_exposure_time_ms,
1102
- value_metadata_key=FitsReaderMetadataKey.num_raw_frames_per_fpa,
1103
- )
1104
- assert bud.stem_name == "lookup"
1105
- for fo in basic_header_objs:
1106
- key = fo.name
1107
- bud.update(key, fo)
1108
-
1109
- assert type(bud.mapping) == collections.defaultdict
1110
- assert bud.mapping == {0.0013: {3}, 12.345: {1}, 100.0: {4, 5}}
1111
- assert len(bud.petals) == 1
1112
- expected_value = ((0.0013, (3,)), (12.345, (1,)), (100.0, (4, 5)))
1113
- assert bud.petals[0].value == expected_value
1114
-
1115
-
1116
- def test_task_time_lookup_bud(basic_header_objs):
1117
- """
1118
- Given: A set of headers with two differently valued header keys
1119
- When: Ingesting headers with a TaskTimeLookupBud and asking for the value
1120
- Then: The bud's value is a dictionary of one key to sets of the other key as nested tuples
1121
- """
1122
- bud = TaskTimeLookupBud(
1123
- constant_name="task_lookup",
1124
- key_metadata_key=FitsReaderMetadataKey.fpa_exposure_time_ms,
1125
- value_metadata_key=FitsReaderMetadataKey.num_raw_frames_per_fpa,
1126
- ip_task_types="dark",
1127
- )
1128
- assert bud.stem_name == "task_lookup"
1129
- for fo in basic_header_objs:
1130
- key = fo.name
1131
- bud.update(key, fo)
1132
-
1133
- assert len(bud.petals) == 1
1134
- expected_value = ((12.345, (1,)),)
1135
- assert bud.petals[0].value == expected_value
1136
-
1137
-
1138
1090
  # TODO: test new stem types that have been added to parse_l0_input_data
@@ -175,17 +175,6 @@ def test_constants(workflow_data_task):
175
175
  assert task.constants.instrument_twice == "foofoo"
176
176
 
177
177
 
178
- def test_constant_dark_num_raw_frames_per_fpa(workflow_data_task):
179
- """
180
- Given: a WorkflowDataTask's constants object
181
- When: accessing a constant that does unusual processing in the property
182
- Then: the value is correctly processed
183
- """
184
- task = workflow_data_task[0]
185
- task.constants._update({BudName.dark_num_raw_frames_per_fpa: ((1.1, (2, 3)), (4.4, (5,)))})
186
- assert task.constants.dark_num_raw_frames_per_fpa == {1.1: [2, 3], 4.4: [5]}
187
-
188
-
189
178
  def test_dataset_id(workflow_data_task):
190
179
  """
191
180
  Given: a ParsedL0InputTaskBase task
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkist-processing-common
3
- Version: 12.0.0
3
+ Version: 12.0.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
@@ -17,9 +17,9 @@ Requires-Dist: asdf<4.0.0,>=3.5.0
17
17
  Requires-Dist: astropy>=7.0.0
18
18
  Requires-Dist: dkist-fits-specifications<5.0,>=4.0.0
19
19
  Requires-Dist: dkist-header-validator<6.0,>=5.0.0
20
- Requires-Dist: dkist-processing-core==7.0.1
20
+ Requires-Dist: dkist-processing-core==7.0.0rc3
21
21
  Requires-Dist: dkist-processing-pac<4.0,>=3.1
22
- Requires-Dist: dkist-service-configuration<5.0,>=4.2.0
22
+ Requires-Dist: dkist-service-configuration<5.0,>=4.1.7
23
23
  Requires-Dist: dkist-spectral-lines<4.0,>=3.0.0
24
24
  Requires-Dist: solar-wavelength-calibration<3.0,>=2.0.0
25
25
  Requires-Dist: globus-sdk<5.0.0,>=4.0.0
@@ -146,8 +146,6 @@ Environment Variables
146
146
  - annotation=str required=False default='classic' description='Queue type for the interservice-bus.' examples=['quorum', 'classic']
147
147
  * - BUILD_VERSION
148
148
  - annotation=str required=False default='dev' description='Fallback build version for workflow tasks.'
149
- * - MAX_FILE_DESCRIPTORS
150
- - annotation=int required=False default=1024 description='Maximum number of file descriptors to allow the process.'
151
149
  * - GQL_AUTH_TOKEN
152
150
  - annotation=Union[str, NoneType] required=False default='dev' description='The auth token for the metadata-store-api.'
153
151
  * - OBJECT_STORE_ACCESS_KEY
@@ -1,4 +1,5 @@
1
1
  changelog/.gitempty,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ changelog/288.misc.rst,sha256=7IG2moLq70WJ6PjKq9CzCT64XE-2a60nEqjFdINBTzU,105
2
3
  dkist_processing_common/__init__.py,sha256=GQ9EBnYhkOnt-qODclAoLS_g5YVhurxfg1tjVtI9rDI,320
3
4
  dkist_processing_common/config.py,sha256=f511KVpK24sQO4dDr4L6PMj5dz0jmWgnx2Y-3DpV0cw,5991
4
5
  dkist_processing_common/manual.py,sha256=bIVVyLsbXMh-g_2L3kGROL-1TtJe0_XviHsp7Br31x8,7023
@@ -21,7 +22,7 @@ dkist_processing_common/codecs/str.py,sha256=Xqt5k8IhLc95KiiNiFwB1JWcVVc6T8AfcLr
21
22
  dkist_processing_common/fonts/Lato-Regular.ttf,sha256=1jbkaDIx-THtoiLViOlE0IK_0726AvkovuRhwPGFslE,656568
22
23
  dkist_processing_common/fonts/__init__.py,sha256=hBvZRtkoGRPlNDWCK-ZePXdSIlThCcjwBDfYaamVgAw,101
23
24
  dkist_processing_common/models/__init__.py,sha256=6LMqemdzVZ87fRrpAsbEnTtWZ02_Gu_oajsUlwGRH_Q,74
24
- dkist_processing_common/models/constants.py,sha256=0PVSvyovMpb6PrzKYUj-Cog5p6FJTsiaVTtAl2fGUrs,20165
25
+ dkist_processing_common/models/constants.py,sha256=VDYPfrZtmBDNaWc3EvbpX7Hs87wJ6cA2BqZQJhb2B1Q,19773
25
26
  dkist_processing_common/models/dkist_location.py,sha256=6Nk0wvv4R8ptlrV7BXon7abq4YLvmTdUmPsDN5G8nWc,971
26
27
  dkist_processing_common/models/fits_access.py,sha256=imKqL4-_g6gTR-IeIjZ6qkMhQX3JujdrKFrTd9gOXnw,5605
27
28
  dkist_processing_common/models/flower_pot.py,sha256=_J7DwHM8u5kQfdPCpk5pUmALtLrM1L_h-x8JW5BSjXA,5129
@@ -45,7 +46,6 @@ dkist_processing_common/parsers/experiment_id_bud.py,sha256=LUehIqB56hmDwARph1it
45
46
  dkist_processing_common/parsers/id_bud.py,sha256=dWNr-njRqDzTnXa2WLZQEb48ul7RdeGzSsURt74978w,2340
46
47
  dkist_processing_common/parsers/l0_fits_access.py,sha256=Ol3eo8yyNbGqbN2whhD2jBNoqhOrlwmH8DbMmCLtNk0,1033
47
48
  dkist_processing_common/parsers/l1_fits_access.py,sha256=BWojvcFl_RmkrRWHe1WxDCsPeexervlRFPothuXAyoI,4410
48
- dkist_processing_common/parsers/lookup_bud.py,sha256=ED_pzv9MgSyT_70Q0sjLD9oHKwpwKOZyQi6lPAFsEog,4130
49
49
  dkist_processing_common/parsers/near_bud.py,sha256=ithuQpnAaK5MDXFhMPNoNIGuF2M94q0n6_qofGl-CdU,4006
50
50
  dkist_processing_common/parsers/observing_program_id_bud.py,sha256=foESQTMShcp-aPGZFcLEdXIdi5Y6vFeus-W447olQEc,884
51
51
  dkist_processing_common/parsers/proposal_id_bud.py,sha256=VvVoYM-MUivra2fMZOSAOgGQslLROZxFuwHnuAZyAjc,942
@@ -59,12 +59,12 @@ dkist_processing_common/parsers/wavelength.py,sha256=P5C9mG8DAKK3GB3vWNRBI5l7pAW
59
59
  dkist_processing_common/tasks/__init__.py,sha256=l23ctjNsKJbHbbqaZBMeOPaOtw0hmITEljI_JJ-CVsU,627
60
60
  dkist_processing_common/tasks/assemble_movie.py,sha256=1ixDG-f4ODt0vywqVccG3aodLljVO5OGlvuMO9EEvcU,12767
61
61
  dkist_processing_common/tasks/base.py,sha256=itAHCvzcodo-q8_AjpWoRaM86BlcjWDpCIiUP7uwmP0,13236
62
- dkist_processing_common/tasks/l1_output_data.py,sha256=LxGnOSfG0wRQi5r3OuSQueZYSSUG27GBeCDjmg9HCpo,10380
62
+ dkist_processing_common/tasks/l1_output_data.py,sha256=eF3BvTTH0Bb163_gpJ8epxkjve8YIdrYgPZO_LCMKKo,10717
63
63
  dkist_processing_common/tasks/output_data_base.py,sha256=r1Bu3FX5zTVj66GTMWtaV_NdhxjyjSm661Bt2Mxmfi4,3685
64
- dkist_processing_common/tasks/parse_l0_input_data.py,sha256=6wPs6UiV5X4TNQgG6Dx6NxGOUvfcK-fx6QI-b9OPLnA,19191
64
+ dkist_processing_common/tasks/parse_l0_input_data.py,sha256=KguXT0Xavynu7C8NFMjsV4628LRoTvfeSuApb6v4Neg,18835
65
65
  dkist_processing_common/tasks/quality_metrics.py,sha256=cvGF6tJ8yAvxOvkeG3tWxYwL885BrFW5X3V7_MSzL-A,12481
66
66
  dkist_processing_common/tasks/teardown.py,sha256=rwT9lWINVDF11-az_nx-Z5ykMTX_SJCchobpU6sErgk,2360
67
- dkist_processing_common/tasks/transfer_input_data.py,sha256=4TJqlDjTc503QFvzSmMert99r9KHDwyd72r1kHAVhQA,5879
67
+ dkist_processing_common/tasks/transfer_input_data.py,sha256=DAYfS-B1o-iBT9MXU-TiJG4Hv05Z0c_JzPrnFgvnK9g,5786
68
68
  dkist_processing_common/tasks/trial_catalog.py,sha256=Yf-BKNCT_OHwJsxxZP8p2eRW04CcY0tw5_YIe1e9RQY,10535
69
69
  dkist_processing_common/tasks/trial_output_data.py,sha256=pUdrNlAzuir4AUdfax5_MOplB-A9NrXErMJmAwtJmLA,6811
70
70
  dkist_processing_common/tasks/write_l1.py,sha256=Xy834RTp3F95kLcW4ba5gfHMUocfZd82ZQQKnvQcP2M,23204
@@ -95,12 +95,12 @@ dkist_processing_common/tests/test_interservice_bus_mixin.py,sha256=IptJkW7Qeu2Y
95
95
  dkist_processing_common/tests/test_manual_processing.py,sha256=iHF7yQPlar9niYAGXtFv28Gw3Undlds38yMfszk4ccY,1037
96
96
  dkist_processing_common/tests/test_output_data_base.py,sha256=D8b1XKvbE3C5cGOiHq58yJ2pzQL3iL0wLZy_AkDdB9Y,3085
97
97
  dkist_processing_common/tests/test_parameters.py,sha256=CUEUIGBPMCUXPll0G0UxFDbMXi8lmnjRwXBarGX1PAQ,14033
98
- dkist_processing_common/tests/test_parse_l0_input_data.py,sha256=Ap7OVmLrlY9wcQRCqArNey-2Mq2JXWnKw1tddgNBlKo,12500
98
+ dkist_processing_common/tests/test_parse_l0_input_data.py,sha256=9OOqeMX8ReQO67ldoMHOBKLQg7Nd5qWHOEoHygcN5Ic,11889
99
99
  dkist_processing_common/tests/test_publish_catalog_messages.py,sha256=7WRsEwoLHGeaCmLTAW4tU_BlZw0e3hwx65uWSGzfuYE,2393
100
100
  dkist_processing_common/tests/test_quality.py,sha256=IPz7liXcmoqWIsY78oX07Ui0nWHxoUH2FbKGEmMle7E,10258
101
101
  dkist_processing_common/tests/test_quality_mixin.py,sha256=L-_kSIKs8A48LGt9QaItZWZqIcRF0MhBCAZQZYdSflk,55575
102
102
  dkist_processing_common/tests/test_scratch.py,sha256=WO8C1VJlkcC5IzST9Hj08CyyrINwYcN8pyteD9x38xs,16482
103
- dkist_processing_common/tests/test_stems.py,sha256=Xi1xVib6dbFthJ_yBdOv33UaK8djatf9sbg_8Y9Qb-U,40811
103
+ dkist_processing_common/tests/test_stems.py,sha256=p__51u-b8vfWLI71aLxF3w2tcWtv6M6DyHJ7_6FZMHI,38949
104
104
  dkist_processing_common/tests/test_submit_dataset_metadata.py,sha256=-UicRcyRQAC9H3sbTYlJaH4-Yn6jKNyQEZhzZxojzqw,3543
105
105
  dkist_processing_common/tests/test_tags.py,sha256=w5gmVfp3Ck92KNV80lJQRMz0OYgTYzWtwVUFWv1b5i8,5024
106
106
  dkist_processing_common/tests/test_task_name.py,sha256=kqFr59XX2K87xzfTlClzDV4-Je1dx72LvdaJ22UE8UU,1233
@@ -110,7 +110,7 @@ dkist_processing_common/tests/test_transfer_input_data.py,sha256=eyAAWXpTHQ8aew8
110
110
  dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=PVGDJBEUk4kAeu8ivrhlCE7yd29R18t9kZLFx-mpBwY,2063
111
111
  dkist_processing_common/tests/test_trial_catalog.py,sha256=CxjtVABE5Fw2EvyXR56IJ3PPi9QvEOjccH0OzzRWk30,9424
112
112
  dkist_processing_common/tests/test_trial_output_data.py,sha256=fu3iGNV_FI8LOacezyt4HvXnxY3g1_UiBuRI63yz5Oo,11977
113
- dkist_processing_common/tests/test_workflow_task_base.py,sha256=WWlIGd45H_ga-7oADuviJ6wyCnmq_g-q4dj5ZBakXcE,10920
113
+ dkist_processing_common/tests/test_workflow_task_base.py,sha256=LTVusltNrsGUOvw9G323am4CXebgE4tJhP6gZCcS0CQ,10457
114
114
  dkist_processing_common/tests/test_write_l1.py,sha256=alN-lozKEm6vKNdhtvzjnuPqv-NjHyUg16Op7SkMH-c,27964
115
115
  docs/Makefile,sha256=qnlVz6PuBqE39NfHWuUnHhNEA-EFgT2-WJNNNy9ttfk,4598
116
116
  docs/changelog.rst,sha256=S2jPASsWlQxSlAPqdvNrYvhk9k3FcFWNXFNDYXBSjl4,120
@@ -120,7 +120,7 @@ docs/landing_page.rst,sha256=aPAuXFhBx73lEZ59B6E6JXxkK0LlxzD0n-HXqHrfumQ,746
120
120
  docs/make.bat,sha256=mBAhtURwhQ7yc95pqwJzlhqBSvRknr1aqZ5s8NKvdKs,4513
121
121
  docs/requirements.txt,sha256=Kbl_X4c7RQZw035YTeNB63We6I7pvXFU4T0Uflp2yDY,29
122
122
  licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
123
- dkist_processing_common-12.0.0.dist-info/METADATA,sha256=PQAxh-LfAa_l7MRC8K9NQhzRN4KwqiI4JCz0nttQ0lg,14211
124
- dkist_processing_common-12.0.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
125
- dkist_processing_common-12.0.0.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
126
- dkist_processing_common-12.0.0.dist-info/RECORD,,
123
+ dkist_processing_common-12.0.0rc1.dist-info/METADATA,sha256=iQZBvQor5LmXNM6QgE25YBIPYCKWTMHecigSZoj6Klk,14068
124
+ dkist_processing_common-12.0.0rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
125
+ dkist_processing_common-12.0.0rc1.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
126
+ dkist_processing_common-12.0.0rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.10.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,129 +0,0 @@
1
- """Simple bud that is used to set a constant to a mapping dictionary."""
2
-
3
- from collections import defaultdict
4
- from enum import StrEnum
5
- from typing import Any
6
- from typing import Callable
7
- from typing import DefaultDict
8
-
9
- from dkist_processing_common.models.flower_pot import SpilledDirt
10
- from dkist_processing_common.models.flower_pot import Stem
11
- from dkist_processing_common.models.tags import EXP_TIME_ROUND_DIGITS
12
- from dkist_processing_common.parsers.l0_fits_access import L0FitsAccess
13
- from dkist_processing_common.parsers.task import passthrough_header_ip_task
14
-
15
-
16
- class TimeLookupBud(Stem):
17
- """
18
- Bud that reads two header keys from all files and creates a dictionary mapping a time KEY value to sets of a VALUE value.
19
-
20
- Parameters
21
- ----------
22
- constant_name
23
- The name for the constant to be defined
24
-
25
- key_metadata_key
26
- The time metadata key for the resulting dictionary key
27
-
28
- value_metadata_key
29
- The metadata key for the resulting dictionary value
30
- """
31
-
32
- def __init__(
33
- self,
34
- constant_name: str,
35
- key_metadata_key: str | StrEnum,
36
- value_metadata_key: str | StrEnum,
37
- ):
38
- super().__init__(stem_name=constant_name)
39
-
40
- if isinstance(key_metadata_key, StrEnum):
41
- key_metadata_key = key_metadata_key.name
42
- self.key_metadata_key = key_metadata_key
43
- if isinstance(value_metadata_key, StrEnum):
44
- value_metadata_key = value_metadata_key.name
45
- self.value_metadata_key = value_metadata_key
46
-
47
- self.mapping: DefaultDict[float, set[Any]] = defaultdict(set)
48
-
49
- def setter(self, fits_obj: L0FitsAccess):
50
- """
51
- Update the mapping dictionary.
52
-
53
- Parameters
54
- ----------
55
- fits_obj
56
- The input fits object
57
- Returns
58
- -------
59
- Updates the dictionary and returns None
60
- """
61
- key = getattr(fits_obj, self.key_metadata_key)
62
- rounded_key = round(key, EXP_TIME_ROUND_DIGITS)
63
- value = getattr(fits_obj, self.value_metadata_key)
64
- self.mapping[rounded_key].add(value)
65
- return None
66
-
67
- def getter(self, key):
68
- """
69
- Get the dictionary mapping created by the setter converted into hashable nested tuples.
70
-
71
- Parameters
72
- ----------
73
- key
74
- The input key
75
- Returns
76
- -------
77
- The mapping dictionary converted into hashable nested tuples
78
- """
79
- hashable_mapping = tuple((k, tuple(v)) for k, v in self.mapping.items())
80
- return hashable_mapping
81
-
82
-
83
- class TaskTimeLookupBud(TimeLookupBud):
84
- """
85
- Subclass of `TimeLookupBud` that only considers objects that have specific task types.
86
-
87
- Parameters
88
- ----------
89
- constant_name
90
- The name for the constant to be defined
91
-
92
- key_metadata_key
93
- The time metadata key for the resulting dictionary key
94
-
95
- value_metadata_key
96
- The metadata key for the resulting dictionary value
97
-
98
- ip_task_types
99
- Only consider objects whose parsed header IP task type matches a string in this list
100
-
101
- task_type_parsing_function
102
- The function used to convert a header into an IP task type
103
- """
104
-
105
- def __init__(
106
- self,
107
- constant_name: str,
108
- key_metadata_key: str | StrEnum,
109
- value_metadata_key: str | StrEnum,
110
- ip_task_types: str | list[str],
111
- task_type_parsing_function: Callable = passthrough_header_ip_task,
112
- ):
113
- super().__init__(
114
- constant_name=constant_name,
115
- key_metadata_key=key_metadata_key,
116
- value_metadata_key=value_metadata_key,
117
- )
118
- if isinstance(ip_task_types, str):
119
- ip_task_types = [ip_task_types]
120
- self.ip_task_types = [task.casefold() for task in ip_task_types]
121
- self.parsing_function = task_type_parsing_function
122
-
123
- def setter(self, fits_obj: L0FitsAccess):
124
- """Ingest an object only if its parsed IP task type matches what's desired."""
125
- task = self.parsing_function(fits_obj)
126
- if task.casefold() in self.ip_task_types:
127
- return super().setter(fits_obj)
128
-
129
- return SpilledDirt