From 713468528fa15e90067e909ad5b4a7b981300aad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:09:02 +0000 Subject: [PATCH] Prepare for release of v1.9.0 (#460) Co-authored-by: Cadair Co-authored-by: Stuart Mumford --- CHANGELOG.rst | 28 +++++++++++++++++++ changelog/340.bugfix.rst | 1 - changelog/340.feature.rst | 1 - changelog/437.feature.rst | 1 - changelog/439.trivial.rst | 2 -- changelog/440.bugfix.rst | 1 - changelog/441.trivial.rst | 1 - changelog/447.trivial.rst | 1 - changelog/453.bugfix.rst | 1 - changelog/455.feature.rst | 1 - dkist/data/api_search_values.json | 2 +- dkist/dataset/tiled_dataset.py | 26 +++++++++++------ ..._astropy_dev_animators_dev_ndcube_dev.json | 6 ++-- 13 files changed, 50 insertions(+), 22 deletions(-) delete mode 100644 changelog/340.bugfix.rst delete mode 100644 changelog/340.feature.rst delete mode 100644 changelog/437.feature.rst delete mode 100644 changelog/439.trivial.rst delete mode 100644 changelog/440.bugfix.rst delete mode 100644 changelog/441.trivial.rst delete mode 100644 changelog/447.trivial.rst delete mode 100644 changelog/453.bugfix.rst delete mode 100644 changelog/455.feature.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2dd7d161..ad54e28d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,31 @@ +1.9.0 (2024-11-04) +================== + +Features +-------- + +- `dkist.net.transfer_complete_datasets` will now only create one Globus task for all datasets it downloads. (`#340 `_) +- Add a FileManager property to TiledDataset for tracking files more easily. (`#437 `_) +- Improve performance of computing arrays when using non-thread or sync dask schedulers, by reducing the amount of data needed to be sent to each worker. (`#455 `_) + + +Bug Fixes +--------- + +- Fix a bug with `dkist.net.transfer_complete_datasets` where a length one ``UnifiedResponse`` would cause an error. (`#340 `_) +- Fix mark argument parsing in the new pytest hook. (`#440 `_) +- Minor tweak to correct indexing of >4D datasets. (`#453 `_) + + +Trivial/Internal Changes +------------------------ + +- Add `--ds` and `--tiled-ds` CLI options to allow passing in datasets for use with the test suite. + The dataset given with `--ds` is passed to tests marked with `accept_cli_dataset` and those given with `--tiled-ds` are passed to tests marked with `accept_cli_tiled_dataset`. (`#439 `_) +- Minor updates to `TiledDataset.plot()` for working with more complex arrangements of tiles. (`#441 `_) +- Fix failure to fetch CLI options in publish build. (`#447 `_) + + 1.8.0 (2024-09-04) ================== diff --git a/changelog/340.bugfix.rst b/changelog/340.bugfix.rst deleted file mode 100644 index 8b22d1d8..00000000 --- a/changelog/340.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix a bug with `dkist.net.transfer_complete_datasets` where a length one ``UnifiedResponse`` would cause an error. diff --git a/changelog/340.feature.rst b/changelog/340.feature.rst deleted file mode 100644 index eb592000..00000000 --- a/changelog/340.feature.rst +++ /dev/null @@ -1 +0,0 @@ -`dkist.net.transfer_complete_datasets` will now only create one Globus task for all datasets it downloads. diff --git a/changelog/437.feature.rst b/changelog/437.feature.rst deleted file mode 100644 index 550c3320..00000000 --- a/changelog/437.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Add a FileManager property to TiledDataset for tracking files more easily. diff --git a/changelog/439.trivial.rst b/changelog/439.trivial.rst deleted file mode 100644 index 3a97796f..00000000 --- a/changelog/439.trivial.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add `--ds` and `--tiled-ds` CLI options to allow passing in datasets for use with the test suite. -The dataset given with `--ds` is passed to tests marked with `accept_cli_dataset` and those given with `--tiled-ds` are passed to tests marked with `accept_cli_tiled_dataset`. diff --git a/changelog/440.bugfix.rst b/changelog/440.bugfix.rst deleted file mode 100644 index 49ce5d4f..00000000 --- a/changelog/440.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix mark argument parsing in the new pytest hook. diff --git a/changelog/441.trivial.rst b/changelog/441.trivial.rst deleted file mode 100644 index ae78a710..00000000 --- a/changelog/441.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Minor updates to `TiledDataset.plot()` for working with more complex arrangements of tiles. diff --git a/changelog/447.trivial.rst b/changelog/447.trivial.rst deleted file mode 100644 index 9f819e26..00000000 --- a/changelog/447.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Fix failure to fetch CLI options in publish build. diff --git a/changelog/453.bugfix.rst b/changelog/453.bugfix.rst deleted file mode 100644 index fca41701..00000000 --- a/changelog/453.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Minor tweak to correct indexing of >4D datasets. diff --git a/changelog/455.feature.rst b/changelog/455.feature.rst deleted file mode 100644 index 92dc49c9..00000000 --- a/changelog/455.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Improve performance of computing arrays when using non-thread or sync dask schedulers, by reducing the amount of data needed to be sent to each worker. diff --git a/dkist/data/api_search_values.json b/dkist/data/api_search_values.json index 254e4433..6fee97f4 100644 --- a/dkist/data/api_search_values.json +++ b/dkist/data/api_search_values.json @@ -1 +1 @@ -{"parameterValues":[{"parameterName":"createDateMin","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2024-09-02T20:19:56.988017"}},{"parameterName":"createDateMax","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2024-09-02T20:19:56.988017"}},{"parameterName":"endTimeMin","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-08-27T21:45:38.497106"}},{"parameterName":"endTimeMax","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-08-27T21:45:38.497106"}},{"parameterName":"exposureTimeMin","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"exposureTimeMax","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"instrumentNames","values":{"categoricalValues":["CRYO-NIRSP","VBI","VISP"]}},{"parameterName":"qualityAverageFriedParameterMin","values":{"minValue":0.01695005847191685,"maxValue":2.6520787500175156e+30}},{"parameterName":"qualityAverageFriedParameterMax","values":{"minValue":0.01695005847191685,"maxValue":2.6520787500175156e+30}},{"parameterName":"qualityAveragePolarimetricAccuracyMin","values":{"minValue":0.14787299538416715,"maxValue":263.313656131021}},{"parameterName":"qualityAveragePolarimetricAccuracyMax","values":{"minValue":0.14787299538416715,"maxValue":263.313656131021}},{"parameterName":"startTimeMin","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-08-27T20:09:46.569864"}},{"parameterName":"startTimeMax","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-08-27T20:09:46.569864"}},{"parameterName":"targetTypes","values":{"categoricalValues":["coronalhole","activecorona","quietcorona","prominence","sunspot","spicules","quietsun","plages","unknown","filament"]}},{"parameterName":"averageDatasetSpectralSamplingMin","values":{"minValue":0.000540156130946172,"maxValue":0.004605031614270178}},{"parameterName":"averageDatasetSpectralSamplingMax","values":{"minValue":0.000540156130946172,"maxValue":0.004605031614270178}},{"parameterName":"averageDatasetSpatialSamplingMin","values":{"minValue":0.0,"maxValue":12388.04306084}},{"parameterName":"averageDatasetSpatialSamplingMax","values":{"minValue":0.0,"maxValue":12388.04306084}},{"parameterName":"averageDatasetTemporalSamplingMin","values":{"minValue":7.403500000002339,"maxValue":5263.145059399399}},{"parameterName":"averageDatasetTemporalSamplingMax","values":{"minValue":7.403500000002339,"maxValue":5263.145059399399}},{"parameterName":"highLevelSoftwareVersion","values":{"categoricalValues":["Alakai_10-0","Pono_6.1.5","Pono_2.1.0","Alakai_5-1","Pono_3.1.0","Pono_8.0.0","Alakai_11.1.0","Alakai_6-0","Alakai_8-0","Alakai_7-0","Pono_7.0.0","Pono_1.0.0","Alakai_3-0","Alakai_4-0"]}},{"parameterName":"workflowName","values":{"categoricalValues":["l0_to_l1_visp","l0_to_l1_cryonirsp_sp","l0_to_l1_cryonirsp_ci","l0_to_l1_vbi_summit-calibrated"]}},{"parameterName":"workflowVersion","values":{"categoricalValues":["2.7.4","2.16.4","2.10.3","1.1.7","0.16.0","2.16.7","1.1.10","2.15.0","2.7.2","2.10.15","2.7.0","2.10.1","2.0.2","2.7.3","1.12.1","2.10.12","1.1.5","1.11.1","2.6.1","1.2.1","2.10.13","2.7.5","2.0.1","1.4.8","1.8.2","2.9.0","2.10.7","2.3.1","2.3.0","2.10.0","1.0.0","1.13.0","1.14.7","1.4.11","1.4.1","2.16.0","2.13.1","1.2.0","2.10.2"]}},{"parameterName":"headerDataUnitCreationDateMin","values":{"minValue":"2022-12-08T17:25:51.965000","maxValue":"2024-09-02T16:39:39.678000"}},{"parameterName":"headerDataUnitCreationDateMax","values":{"minValue":"2022-12-08T17:25:51.965000","maxValue":"2024-09-02T16:39:39.678000"}},{"parameterName":"headerVersion","values":{"categoricalValues":["4.3.0","4.6.0","4.0.0","4.1.1","3.4.0","3.9.0","3.5.0","4.2.0","3.6.0","3.3.0","3.0.0","3.7.1","3.8.1","4.5.0"]}}]} \ No newline at end of file +{"parameterValues":[{"parameterName":"createDateMin","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2024-11-03T04:40:55.057537"}},{"parameterName":"createDateMax","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2024-11-03T04:40:55.057537"}},{"parameterName":"endTimeMin","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-10-30T23:37:16.428808"}},{"parameterName":"endTimeMax","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-10-30T23:37:16.428808"}},{"parameterName":"exposureTimeMin","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"exposureTimeMax","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"instrumentNames","values":{"categoricalValues":["CRYO-NIRSP","VBI","VISP"]}},{"parameterName":"qualityAverageFriedParameterMin","values":{"minValue":0.016950058471916846,"maxValue":2.6520787500175156e+30}},{"parameterName":"qualityAverageFriedParameterMax","values":{"minValue":0.016950058471916846,"maxValue":2.6520787500175156e+30}},{"parameterName":"qualityAveragePolarimetricAccuracyMin","values":{"minValue":0.14787299538416715,"maxValue":263.313656131021}},{"parameterName":"qualityAveragePolarimetricAccuracyMax","values":{"minValue":0.14787299538416715,"maxValue":263.313656131021}},{"parameterName":"startTimeMin","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-10-30T22:45:09.038601"}},{"parameterName":"startTimeMax","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-10-30T22:45:09.038601"}},{"parameterName":"targetTypes","values":{"categoricalValues":["coronalhole","activecorona","quietcorona","prominence","sunspot","spicules","quietsun","plages","unknown","filament"]}},{"parameterName":"averageDatasetSpectralSamplingMin","values":{"minValue":0.000540156130946172,"maxValue":0.004605031614270178}},{"parameterName":"averageDatasetSpectralSamplingMax","values":{"minValue":0.000540156130946172,"maxValue":0.004605031614270178}},{"parameterName":"averageDatasetSpatialSamplingMin","values":{"minValue":0.0,"maxValue":12388.04306084}},{"parameterName":"averageDatasetSpatialSamplingMax","values":{"minValue":0.0,"maxValue":12388.04306084}},{"parameterName":"averageDatasetTemporalSamplingMin","values":{"minValue":2.6666669999887205,"maxValue":5263.145059399398}},{"parameterName":"averageDatasetTemporalSamplingMax","values":{"minValue":2.6666669999887205,"maxValue":5263.145059399398}},{"parameterName":"highLevelSoftwareVersion","values":{"categoricalValues":["Alakai_10-0","Pono_6.1.5","Pono_2.1.0","Alakai_5-1","Pono_3.1.0","Pono_8.0.0","Alakai_6-0","Alakai_11.1.0","Alakai_8-0","Alakai_7-0","Pono_7.0.0","Pono_1.0.0","Alakai_3-0","Alakai_4-0","Pono_9.1.0"]}},{"parameterName":"workflowName","values":{"categoricalValues":["l0_to_l1_visp","l0_to_l1_cryonirsp_sp","l0_to_l1_cryonirsp_ci","l0_to_l1_vbi_summit-calibrated"]}},{"parameterName":"workflowVersion","values":{"categoricalValues":["2.7.4","2.10.3","2.16.4","1.1.7","2.17.0","0.16.0","1.3.2","2.16.7","1.17.5","1.1.10","2.15.0","2.7.2","2.10.15","1.1.2","2.7.0","2.19.1","2.10.1","2.0.2","2.7.3","1.12.1","2.10.12","1.1.5","1.11.1","1.3.3","2.19.5","1.2.1","2.6.1","2.7.5","2.10.13","2.19.2","2.0.1","1.4.8","1.8.2","2.9.0","2.10.7","2.19.4","2.3.1","2.3.0","2.19.3","1.17.1","2.10.0","1.15.0","1.13.0","1.0.0","1.15.1","1.14.7","1.4.11","1.3.5","2.16.0","2.13.1","1.4.1","1.2.0","2.10.2"]}},{"parameterName":"headerDataUnitCreationDateMin","values":{"minValue":"2022-12-08T17:30:30.462000","maxValue":"2024-11-03T03:39:48.823000"}},{"parameterName":"headerDataUnitCreationDateMax","values":{"minValue":"2022-12-08T17:30:30.462000","maxValue":"2024-11-03T03:39:48.823000"}},{"parameterName":"headerVersion","values":{"categoricalValues":["4.3.0","4.6.0","4.0.0","4.1.1","3.4.0","3.9.0","4.7.0","3.5.0","4.2.0","3.6.0","3.3.0","3.0.0","3.7.1","3.8.1","4.5.0"]}}]} \ No newline at end of file diff --git a/dkist/dataset/tiled_dataset.py b/dkist/dataset/tiled_dataset.py index 3c315a3b..29f69140 100644 --- a/dkist/dataset/tiled_dataset.py +++ b/dkist/dataset/tiled_dataset.py @@ -11,6 +11,7 @@ import matplotlib.pyplot as plt import numpy as np +import astropy from astropy.table import vstack from dkist.io.file_manager import FileManager, StripedExternalArray @@ -152,6 +153,20 @@ def tiles_shape(self): """ return [[tile.data.shape for tile in row] for row in self] + @staticmethod + def _get_axislabels(ax): + if astropy.__version__ >= "6.1.5": + return (ax.get_xlabel(), ax.get_ylabel()) + + xlabel = ylabel = "" + for coord in ax.coords: + axislabel_position = coord.axislabels.get_visible_axes() + if "b" in axislabel_position: + xlabel = coord.get_axislabel() or coord._get_default_axislabel() + if "l" in axislabel_position: + ylabel = coord.get_axislabel() or coord._get_default_axislabel() + return (xlabel, ylabel) + def plot(self, slice_index, share_zscale=False, **kwargs): """ Plot a slice of each tile in the TiledDataset @@ -176,14 +191,9 @@ def plot(self, slice_index, share_zscale=False, **kwargs): ax = fig.add_subplot(self.shape[0], self.shape[1], i+1, projection=tile.wcs) tile.plot(axes=ax, **kwargs) if i == 0: - # TODO: When we can depend on astropy >=7.0 we can remove these or statements - xlabel = ax.coords[0].get_axislabel() or ax.coords[0]._get_default_axislabel() - ylabel = ax.coords[1].get_axislabel() or ax.coords[1]._get_default_axislabel() - for coord in ax.coords: - if "b" in coord.axislabels.get_visible_axes(): - fig.supxlabel(xlabel, y=0.05) - if "l" in coord.axislabels.get_visible_axes(): - fig.supylabel(ylabel, x=0.05) + xlabel, ylabel = self._get_axislabels(ax) + fig.supxlabel(xlabel, y=0.05) + fig.supylabel(ylabel, x=0.05) axmin, axmax = ax.get_images()[0].get_clim() vmin = axmin if axmin < vmin else vmin vmax = axmax if axmax > vmax else vmax diff --git a/dkist/tests/figure_hashes_mpl_dev_ft_261_astropy_dev_animators_dev_ndcube_dev.json b/dkist/tests/figure_hashes_mpl_dev_ft_261_astropy_dev_animators_dev_ndcube_dev.json index 863b28e1..57678629 100644 --- a/dkist/tests/figure_hashes_mpl_dev_ft_261_astropy_dev_animators_dev_ndcube_dev.json +++ b/dkist/tests/figure_hashes_mpl_dev_ft_261_astropy_dev_animators_dev_ndcube_dev.json @@ -1,11 +1,11 @@ { "dkist.dataset.tests.test_plotting.test_dataset_projection[aslice0]": "f3cd5b87ef5d109090bf3183c7edbcdd8398d083417b2564991c4515bddbc8bf", "dkist.dataset.tests.test_plotting.test_dataset_projection[aslice1]": "753909f9ae5d03a03d18513783c22501784460d7f93851fd40e8ddfd493dcb6c", - "dkist.dataset.tests.test_plotting.test_dataset_projection[aslice2]": "0a29ef8f286f16acf7d5ab420da6970d632ce44c1f11cfd6eb3b4c5e15c7f23a", + "dkist.dataset.tests.test_plotting.test_dataset_projection[aslice2]": "ca45c084e38d46e5e13ef16b50d1d1b0df170e560bf263330b11582f40a878c3", "dkist.dataset.tests.test_plotting.test_2d_plot[aslice0]": "b31423d5ec45941849564f4ec7e276f2c52a0fa5038ce0b3c8d4af1b7f848a1d", "dkist.dataset.tests.test_plotting.test_2d_plot[aslice1]": "cbb84fbae51d8238803f8f0d6820c575f024fe54b1656f1b181dc4ec645e9ff9", - "dkist.dataset.tests.test_plotting.test_2d_plot[aslice2]": "132c5615832daff457dacb4cb770498f1fbb4460a5b90b5d4d01d224c70eeb28", - "dkist.dataset.tests.test_plotting.test_2d_plot2": "409b5a10ad8ccf005331261505e63ce8febdc38eb8b5a34f8863e567e3cccb9c", + "dkist.dataset.tests.test_plotting.test_2d_plot[aslice2]": "4b5be9cf1883d0ebd15ff091f52cea2822068e8238a8df7b0f594d69fba27597", + "dkist.dataset.tests.test_plotting.test_2d_plot2": "1c10e9db44b0b694a6bb1b493c4c2193278541df7c1302bb11fe3f6372682e35", "dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[share_zscale]": "0687c12c0a90fd35a892b1825ae8f95614507982f28ea5c8f62422745aaf0ef3", "dkist.dataset.tests.test_tiled_dataset.test_tileddataset_plot[indpendent_zscale]": "a0a76d5bc02795722046d2079d4809fe18744df955ea55265062f162312da8a7" } \ No newline at end of file