|
| 1 | +# Changelog<a name="changelog"></a> |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) |
| 6 | + |
| 7 | +<!-- uncomment the following when we're out of alpha and actually following it --> |
| 8 | + |
| 9 | +<!-- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --> |
| 10 | + |
| 11 | +## \[Unreleased\]<a name="unreleased"></a> |
| 12 | + |
| 13 | +## \[0.2.47\] - 2023-06-20 |
| 14 | + |
| 15 | +### Changed |
| 16 | +- `broker_utils/avro_schemas` now contains the alert schemas and broker classification schema for ELAsTiCC schema version 0.9.1 |
| 17 | +- `avro_schemas/load.py` registers ELAsTiCC schema version 0.9.1 |
| 18 | +- Improve error handling and logging in `data_utils.open_alert`. The function uses a lot of |
| 19 | + broad try/excepts in a brute-force attempt to open an alert packet that could be in many |
| 20 | + different formats. These changes do some moderate clean up of the error handling and |
| 21 | + provide more detail in the logs about a known issue with some versions of fastavro. |
| 22 | +- Sort all imports. |
| 23 | +- Cleanup syntax issues identified by Codacy. |
| 24 | + |
| 25 | +### Fixed |
| 26 | + |
| 27 | +- Bugfix the IDs in `testing.Mock`. |
| 28 | + |
| 29 | +## \[0.2.46\] - 2023-04-09 |
| 30 | + |
| 31 | +### Changed |
| 32 | + |
| 33 | +- Alert filename "objectId.sourceId.topic.avro" -> "topic/objectId/sourceId.avro" |
| 34 | + |
| 35 | +## \[0.2.45\] - 2022-10-22 |
| 36 | + |
| 37 | +### Fixed |
| 38 | + |
| 39 | +- Import `pandas` for `data_utils.alert_lite_to_dataframe()`. |
| 40 | +- Remove the `xmatch` dict from the dataframe created by `data_utils.alert_lite_to_dataframe()`. |
| 41 | + |
| 42 | +## \[0.2.44\] - 2022-10-20 |
| 43 | + |
| 44 | +### Added |
| 45 | + |
| 46 | +- `data_utils.alert_lite_to_dataframe()` |
| 47 | + |
| 48 | +## \[0.2.43\] - 2022-08-25 |
| 49 | + |
| 50 | +### Fixed |
| 51 | + |
| 52 | +- Updates `data_utils.open_alert()` to properly handle json-serialized alerts in a Cloud Function. |
| 53 | + |
| 54 | +## \[0.2.42\] - 2022-08-24 |
| 55 | + |
| 56 | +### Fixed |
| 57 | + |
| 58 | +- Fix bug introduced by allowing `data_utils.open_alert()` to blindly send `**kwargs` to the |
| 59 | + functions it calls. `data_utils.open_alert()` now sends only the arguments that are appropriate |
| 60 | + for the function it's calling. |
| 61 | + |
| 62 | +## \[0.2.41\] - 2022-08-19 |
| 63 | + |
| 64 | +### Fixed |
| 65 | + |
| 66 | +- Fix bug preventing data files from being included with the package. |
| 67 | + |
| 68 | +## \[0.2.40\] - 2022-08-19 |
| 69 | + |
| 70 | +### Added |
| 71 | + |
| 72 | +- `avro_schemas` module to handle schemaless alerts. Includes schema data files. |
| 73 | +- `data_utils.open_alert()` which uses a brute-force strategy to try to open alerts of all |
| 74 | + different formats. |
| 75 | + |
| 76 | +### Changed |
| 77 | + |
| 78 | +- In `data_utils`, deprecate functions `load_alert()` and `decode_alert()` in favor of |
| 79 | + `open_alert()` |
| 80 | + |
| 81 | +## \[0.2.39\] - 2022-06-23 |
| 82 | + |
| 83 | +### Fixed |
| 84 | + |
| 85 | +- Bug fix: don't use `dataclasses.dataclass` decorator on `collections.namedtuple` modules. |
| 86 | + |
| 87 | +## \[0.2.38\] - 2022-06-23 |
| 88 | + |
| 89 | +### Added |
| 90 | + |
| 91 | +- Use `dataclasses.dataclass` decorator on `types` and `testing` modules |
| 92 | + |
| 93 | +### Fixed |
| 94 | + |
| 95 | +- Bug fix in `types.AlertIds.extract_ids()`: access `self.id_keys` as a property, not a function call. |
| 96 | + |
| 97 | +## \[0.2.37\] - 2022-06-21 |
| 98 | + |
| 99 | +### Changed |
| 100 | + |
| 101 | +- Minor internal improvements and bug fixes to `testing`. |
| 102 | +- Rename attributes `testing.Mock.results` to `testing.Mock.module_results` and |
| 103 | + `testing.TestAlert.publish_as` to `testing.TestAlert.serialize`. |
| 104 | + |
| 105 | +## \[0.2.36\] - 2022-06-20 |
| 106 | + |
| 107 | +### Added |
| 108 | + |
| 109 | +- Adds `mock` as a keyword argument in `testing.TestAlert`. |
| 110 | + |
| 111 | +## \[0.2.35\] - 2022-06-20 |
| 112 | + |
| 113 | +### Added |
| 114 | + |
| 115 | +- `types` module containing `_AlertIds`, `AlertIds`, and `AlertFilename`. These were rewritten and |
| 116 | + moved out of `data_utils`. |
| 117 | + |
| 118 | +### Changed |
| 119 | + |
| 120 | +- Lazy load `pandas`. It hogs memory on Cloud Functions. |
| 121 | +- Remove `data_utils.AlertIds`, `data_utils.idUtils`, and `data_utils.AlertFilename`. They moved to |
| 122 | + the new `types` module. |
| 123 | +- Rename `tests` module to `testing` and rewrite the included classes to give them more |
| 124 | + functionality and make them easier to use. |
| 125 | + |
| 126 | +## \[0.2.34\] - 2022-06-17 |
| 127 | + |
| 128 | +### Added |
| 129 | + |
| 130 | +- add `AlertFilename` class in `data_utils` |
| 131 | + |
| 132 | +### Changed |
| 133 | + |
| 134 | +- updated `tests.TestValidator` to accept keyword argument `ids_in` that determines whether |
| 135 | + alert IDs are extracted from message attributes or the Avro filename. |
| 136 | + |
| 137 | +## \[0.2.33\] - 2022-06-17 |
| 138 | + |
| 139 | +### Added |
| 140 | + |
| 141 | +- add "kafka.topic" to mocked msg attributes in `tests.TestAlert` |
| 142 | + |
| 143 | +## \[0.2.32\] - 2022-05-19 |
| 144 | + |
| 145 | +### Changed |
| 146 | + |
| 147 | +- fix bug when creating avro payload in `tests.TestAlert` |
| 148 | + |
| 149 | +## \[0.2.31\] - 2022-05-19 |
| 150 | + |
| 151 | +### Added |
| 152 | + |
| 153 | +- `tests` module and `tests.TestValidator` class |
| 154 | +- `data_utils.idUtils` class |
| 155 | + |
| 156 | +### Changed |
| 157 | + |
| 158 | +- moved `data_utils.TestAlert` to `tests.TestAlert` |
| 159 | + |
| 160 | +## \[0.2.30\] - 2022-05-18 |
| 161 | + |
| 162 | +### Added |
| 163 | + |
| 164 | +- `data_utils.AlertIds` and `data_utils.TestAlert` |
| 165 | +- `gcp_utils.purge_subscription()` |
| 166 | + |
| 167 | +## \[0.2.29\] - 2022-05-17 |
| 168 | + |
| 169 | +### Added |
| 170 | + |
| 171 | +- `schema_maps.get_key()` return the key name or the final element in the list corresponding to a |
| 172 | + schema map and key. |
| 173 | +- `schema_maps.get_value()` return the alert value corresponding to a schema map and key. |
| 174 | + |
| 175 | +### Changed |
| 176 | + |
| 177 | +- Modules updated to use the added functions. |
| 178 | +- `data_utils.load_yaml()` moved to `schema_maps.load_yaml()` to avoid circular imports. |
| 179 | + |
| 180 | +## \[0.2.28\] - 2022-03-27 |
| 181 | + |
| 182 | +### Added |
| 183 | + |
| 184 | +- `math` module - new home for math functions (currently `jd_to_mjd` and `mag_to_flux`) |
| 185 | +- `data_utils.load_yaml` |
| 186 | + |
| 187 | +### Changed |
| 188 | + |
| 189 | +- Move functions `jd_to_mjd` and `mag_to_flux` from `data_utils` to the new `math` module. Update |
| 190 | + SuperNNova Cloud Function to accommodate (outside `broker_utils` at |
| 191 | + broker/cloud_functions/classify_snn). |
| 192 | +- Update `schema_maps.load_schema_map` to accept a Path and load from a local file |
| 193 | + |
| 194 | +### Removed |
| 195 | + |
| 196 | +- `data_utils._get_schema_map` |
| 197 | + |
| 198 | +## \[0.2.27\] - 2022-03-26 |
| 199 | + |
| 200 | +### Added<a name="added-1"></a> |
| 201 | + |
| 202 | +- `data_utils._get_schema_map` function to load schema map from file if needed and check that it |
| 203 | + is a dict. |
| 204 | +- `data_utils.load_alert` to load an alert from file. |
| 205 | +- Support for passing `alert_avro` as a path to `data_utils.decode_alert`. |
| 206 | + |
| 207 | +### Changed<a name="changed-1"></a> |
| 208 | + |
| 209 | +- `data_utils` now passes `schema_map` and `drop_cutouts` as kwargs. |
| 210 | + |
| 211 | +### Fixed<a name="fixed-1"></a> |
| 212 | + |
| 213 | +- Rename variable `pgb_project_id` to `PROJECT_ID`. |
| 214 | + |
| 215 | +## \[0.2.26\] - 2022-03-26<a name="0226---2022-03-26"></a> |
| 216 | + |
| 217 | +### Added<a name="added"></a> |
| 218 | + |
| 219 | +- Add `project_id` as a kwarg to `gcp_utils` bigquery functions. |
| 220 | + |
| 221 | +### Changed<a name="changed"></a> |
| 222 | + |
| 223 | +- Set GCP project ID by an environment variable, fall back to the production broker project. |
| 224 | + Formerly this was hardcoded to production project. |
| 225 | +- Unpin `numpy` |
| 226 | +- Unpin `google.cloud.bigquery` |
| 227 | +- Unpin `google.cloud.pubsub`. Update `consumer_sim` and `gcp_utils` to accommodate. |
0 commit comments