dkist-processing-common 10.7.1rc1__py3-none-any.whl → 10.8.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.
@@ -0,0 +1 @@
1
+ Modify usage of CompImageHeader to support astropy 7.
@@ -0,0 +1 @@
1
+ Bump numpy version to cross the 2.0.0 release.
@@ -0,0 +1 @@
1
+ Add checksum verification to the hdu decoder.
@@ -32,7 +32,7 @@ def fits_hdulist_encoder(hdu_list: fits.HDUList) -> bytes:
32
32
 
33
33
  def fits_hdu_decoder(path: Path) -> fits.PrimaryHDU | fits.CompImageHDU:
34
34
  """Read a Path with `fits` to produce an `HDUList`."""
35
- hdu_list = fits.open(path)
35
+ hdu_list = fits.open(path, checksum=True)
36
36
  return _extract_hdu(hdu_list)
37
37
 
38
38
 
@@ -512,6 +512,6 @@ class WriteL1Frame(WorkflowTaskBase, MetadataStoreMixin, ABC):
512
512
  @staticmethod
513
513
  def remove_invalid_r0_values(header: fits.Header) -> fits.Header:
514
514
  """Remove the Fried parameter r0 from the header if the AO is not locked."""
515
- if not header["AO_LOCK"]:
515
+ if header.get("AO_LOCK") is not True:
516
516
  header.pop("ATMOS_R0", None)
517
517
  return header
@@ -157,8 +157,9 @@ def write_l1_task(request, recipe_run_id, tmp_path):
157
157
  @pytest.fixture(
158
158
  scope="function",
159
159
  params=[
160
- pytest.param(True, id="AO_lock_on"),
161
- pytest.param(False, id="AO_lock_off"),
160
+ pytest.param({"AO_LOCK": True}, id="AO_LOCK_True"),
161
+ pytest.param({"AO_LOCK": False}, id="AO_LOCK_False"),
162
+ pytest.param({}, id="AO_LOCK_missing"),
162
163
  ],
163
164
  )
164
165
  def write_l1_task_no_data(request, recipe_run_id, tmp_path, complete_common_header):
@@ -171,7 +172,8 @@ def write_l1_task_no_data(request, recipe_run_id, tmp_path, complete_common_head
171
172
  ):
172
173
  task.scratch = WorkflowFileSystem(recipe_run_id=recipe_run_id, scratch_base_path=tmp_path)
173
174
  header = complete_common_header
174
- header["AO_LOCK"] = request.param
175
+ header.pop("AO_LOCK", None) # If it's not required, shouldn't be here in the first place??
176
+ header.update(request.param)
175
177
  fried_parameter = 0.2
176
178
  header["ATMOS_R0"] = fried_parameter
177
179
  hdu = fits.PrimaryHDU(data=np.random.random(size=(1, 1, 1)) * 1, header=header)
@@ -428,7 +430,8 @@ def test_rice_compression_with_specified_tile_size(write_l1_task, mocker):
428
430
  files = list(task.read(tags=[Tag.frame(), Tag.output()]))
429
431
  for file in files:
430
432
  hdul = fits.open(file)
431
- comp_header = hdul[1]._header
433
+ bintable = hdul[1]._get_bintable_without_data()
434
+ comp_header = bintable.header
432
435
  data_shape = list(hdul[1].data.shape)
433
436
  data_shape.reverse()
434
437
  for i, dim in enumerate(data_shape):
@@ -453,7 +456,8 @@ def test_rice_compression_with_default_tile_size(write_l1_task, mocker):
453
456
  files = list(task.read(tags=[Tag.frame(), Tag.output()]))
454
457
  for file in files:
455
458
  hdul = fits.open(file)
456
- comp_header = hdul[1]._header
459
+ bintable = hdul[1]._get_bintable_without_data()
460
+ comp_header = bintable.header
457
461
  data_shape = list(hdul[1].data.shape)
458
462
  data_shape.reverse()
459
463
  assert comp_header["ZTILE1"] == data_shape[0]
@@ -604,12 +608,11 @@ def test_check_r0_ao_lock(write_l1_task_no_data):
604
608
  """
605
609
  task, header, r0 = write_l1_task_no_data
606
610
  header_after_check = task.remove_invalid_r0_values(header=header)
607
- if header["AO_LOCK"]:
611
+ if header.get("AO_LOCK"):
608
612
  assert header_after_check["ATMOS_R0"] == header["ATMOS_R0"]
609
613
  assert header["ATMOS_R0"] == r0
610
614
  assert header["AO_LOCK"]
611
- if not header["AO_LOCK"]:
612
- with pytest.raises(KeyError) as ke:
615
+ else:
616
+ with pytest.raises(KeyError, match="Keyword 'ATMOS_R0' not found"):
613
617
  invalid_r0 = header_after_check["ATMOS_R0"]
614
- assert "Keyword 'ATMOS_R0' not found" in str(ke)
615
- assert not header["AO_LOCK"]
618
+ assert header.get("AO_LOCK") != True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dkist-processing-common
3
- Version: 10.7.1rc1
3
+ Version: 10.8.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
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Requires-Python: >=3.11
15
15
  Description-Content-Type: text/x-rst
16
16
  Requires-Dist: asdf<4.0.0,>=3.5.0
17
- Requires-Dist: astropy<7.0.0,>=6.0.0
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
20
  Requires-Dist: dkist-processing-core==5.1.0
@@ -26,7 +26,7 @@ Requires-Dist: gqlclient[pydantic]==1.2.3
26
26
  Requires-Dist: sqids==0.5.1
27
27
  Requires-Dist: matplotlib>=3.4
28
28
  Requires-Dist: moviepy>=2.0.0
29
- Requires-Dist: numpy>=1.20.2
29
+ Requires-Dist: numpy>=2.2.5
30
30
  Requires-Dist: object-clerk==0.1.1
31
31
  Requires-Dist: pandas>=1.4.2
32
32
  Requires-Dist: pillow>=10.2.0
@@ -43,7 +43,7 @@ Requires-Dist: pytest-cov; extra == "test"
43
43
  Requires-Dist: pytest-mock; extra == "test"
44
44
  Requires-Dist: hypothesis; extra == "test"
45
45
  Requires-Dist: towncrier; extra == "test"
46
- Requires-Dist: dkist-data-simulator>=5.0.0; extra == "test"
46
+ Requires-Dist: dkist-data-simulator>=5.2.6; extra == "test"
47
47
  Requires-Dist: dkist-processing-common[inventory]; extra == "test"
48
48
  Requires-Dist: dkist-processing-common[asdf]; extra == "test"
49
49
  Requires-Dist: dkist-processing-common[quality]; extra == "test"
@@ -1,5 +1,7 @@
1
1
  changelog/.gitempty,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- changelog/248.bugfix.rst,sha256=zpa1QJfaqZ5dbakRBvlGQsp_B2i66oBFez2jAFFHZwM,118
2
+ changelog/222.bugfix.rst,sha256=PXXz9YIyqtl2icpbtDRK0Zh5fXQjpMuKA1G5fd8LAFc,54
3
+ changelog/222.feature.2.rst,sha256=-6OdS9g1PSiUnyzMkz6orYiOmOnpD3Hcfy3KDYUdLEQ,47
4
+ changelog/222.feature.rst,sha256=X9TyBOkXdz3Ze0BfRi7awpk0SM5ljTJhjOeQZb-J5Xo,46
3
5
  dkist_processing_common/__init__.py,sha256=490Fwm_GgqpwriQlsYfKcLUZNhZ6GkINtJqcYSIEKoU,319
4
6
  dkist_processing_common/config.py,sha256=IcpaD_NvHZU-aLlUNOTdRC4V7ADIvVQwrZ2dHhIr4NY,4247
5
7
  dkist_processing_common/manual.py,sha256=IH72QxdGlr-BuWq2EDrfC9yStegO-elUWrobQqT4710,7042
@@ -11,7 +13,7 @@ dkist_processing_common/_util/tags.py,sha256=8r62_-x3xpbCoCu5dd09Q2u-OYzYiML6SlP
11
13
  dkist_processing_common/codecs/__init__.py,sha256=du1iitvsudSSOMENSywXmXSLOlvIocJsPbvfEcyqFNc,159
12
14
  dkist_processing_common/codecs/asdf.py,sha256=2GHCFOZk1j-ml4EolXac_sUzk7aPYJUGqKYxZk4mG_c,1046
13
15
  dkist_processing_common/codecs/bytes.py,sha256=tiVEUu_Gzc5NfW1_qsJtHDlYAZzgIqA7f4cfAwN734k,495
14
- dkist_processing_common/codecs/fits.py,sha256=GH_K5_w0sjGY3_Yokw4jBhwxvEk05WYD5V3Hxb7odUs,2331
16
+ dkist_processing_common/codecs/fits.py,sha256=0D6tDvt13OhVXok4tS8VGHdd8OSV8DrRet8VCD6Zt3g,2346
15
17
  dkist_processing_common/codecs/iobase.py,sha256=r0ImN0CxfjAnfMflNv7w2pGDp2i6EQg0p2OaEkE82pk,977
16
18
  dkist_processing_common/codecs/json.py,sha256=OWXzoFWccJiojkiKSeDrMdL9f7EpdNIOMvO9YBBg-Yg,939
17
19
  dkist_processing_common/codecs/path.py,sha256=LU5Kh1ew2PQI9hcpzbnZkE47k-zAMZDDV4cgqHRcDkY,197
@@ -59,7 +61,7 @@ dkist_processing_common/tasks/teardown.py,sha256=e4LKnphJDYDVDAez2tH7MxpZgCmxYsK
59
61
  dkist_processing_common/tasks/transfer_input_data.py,sha256=afEW0glpCFMZRj90nFtQo_4XOQ4CuoOh86jahP6a-a0,5548
60
62
  dkist_processing_common/tasks/trial_catalog.py,sha256=Y3DKstRfMS8nWWtJFMB0MUVPlZ1jWS_2jhJGMWwxy50,8748
61
63
  dkist_processing_common/tasks/trial_output_data.py,sha256=aI_aRuu0qVO8zFGrr_9baxx9i3jUEHZSmsmbO6ytlkE,6960
62
- dkist_processing_common/tasks/write_l1.py,sha256=Jw8zQjlYjBQru3m1SB_ZDmicMkDRiUihy9VdwehvZc0,22683
64
+ dkist_processing_common/tasks/write_l1.py,sha256=8KQ5LWa15mmjcoN0EgyaeLJS2qxeAowU5MC8IEIt4l4,22695
63
65
  dkist_processing_common/tasks/mixin/__init__.py,sha256=-g-DQbU7m1bclJYuFe3Yh757V-35GIDTbstardKQ7nU,68
64
66
  dkist_processing_common/tasks/mixin/globus.py,sha256=QAV8VElxMAqxJ2KSB_bJaraceovYfjHXjOdocrTCkIA,6592
65
67
  dkist_processing_common/tasks/mixin/input_dataset.py,sha256=dkW5vf_QPgWedHO_Lf9GjBxr1QrUCKs6gIXufUTi7GE,6813
@@ -101,7 +103,7 @@ dkist_processing_common/tests/test_transfer_l1_output_data.py,sha256=27PifkyH3RZ
101
103
  dkist_processing_common/tests/test_trial_catalog.py,sha256=SZ-nyn0MXU9Lkg_94FbKER_cwiGoi06GYlzF_3AmvKg,6802
102
104
  dkist_processing_common/tests/test_trial_output_data.py,sha256=cBCj0kXyF5NEMzKh6zPVksdoXyE8ju1opJgWgjdcJWA,12790
103
105
  dkist_processing_common/tests/test_workflow_task_base.py,sha256=Z5aPW5LQtS0UWJiYho4X0r-2gPLfzpkmMwfmaoFLjMg,10517
104
- dkist_processing_common/tests/test_write_l1.py,sha256=R_ljJdSC4hCHS_mLV6rKE7PVfpDWCaMXoN6n45QJNWM,21951
106
+ dkist_processing_common/tests/test_write_l1.py,sha256=xdPqIeS7brVUzDD0XmCVKc4N4QUbaUc0ENMFBwCYU2c,22203
105
107
  docs/Makefile,sha256=qnlVz6PuBqE39NfHWuUnHhNEA-EFgT2-WJNNNy9ttfk,4598
106
108
  docs/changelog.rst,sha256=S2jPASsWlQxSlAPqdvNrYvhk9k3FcFWNXFNDYXBSjl4,120
107
109
  docs/conf.py,sha256=FkX575cqTqZGCcLAjg2MlvE8Buj1Vt3CpHNgZxG256E,1890
@@ -110,7 +112,7 @@ docs/landing_page.rst,sha256=aPAuXFhBx73lEZ59B6E6JXxkK0LlxzD0n-HXqHrfumQ,746
110
112
  docs/make.bat,sha256=mBAhtURwhQ7yc95pqwJzlhqBSvRknr1aqZ5s8NKvdKs,4513
111
113
  docs/requirements.txt,sha256=Kbl_X4c7RQZw035YTeNB63We6I7pvXFU4T0Uflp2yDY,29
112
114
  licenses/LICENSE.rst,sha256=piZaQplkzOMmH1NXg6QIdo9wwo9pPCoHkvm2-DmH76E,1462
113
- dkist_processing_common-10.7.1rc1.dist-info/METADATA,sha256=Q9cp_Hd28cRGUf8P_YPPpp67BNRg7uN61WmqbLg3_Bg,7157
114
- dkist_processing_common-10.7.1rc1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
115
- dkist_processing_common-10.7.1rc1.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
116
- dkist_processing_common-10.7.1rc1.dist-info/RECORD,,
115
+ dkist_processing_common-10.8.0rc1.dist-info/METADATA,sha256=ROcyuGFP8aFpV68p9dryGzts3Q4XOSQxRz-LxUOjem0,7149
116
+ dkist_processing_common-10.8.0rc1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
117
+ dkist_processing_common-10.8.0rc1.dist-info/top_level.txt,sha256=LJhd1W-Vn90K8HnQDIE4r52YDpUjjMWDnllAWHBByW0,48
118
+ dkist_processing_common-10.8.0rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
changelog/248.bugfix.rst DELETED
@@ -1 +0,0 @@
1
- Fix a bug exposed by updates in the `dkist-inventory` package that did not manage HISTORY or COMMENT cards correctly.