|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## Version 0.16.0 |
| 4 | + |
| 5 | +- feat(core): add blocking `wait_for_event_handlers` method to `Store` to wait for all event handlers to finish |
| 6 | + |
3 | 7 | ## Version 0.15.10
|
4 | 8 |
|
5 | 9 | - feat(test): add arguments for `wait_for`'s `check`
|
6 | 10 |
|
7 | 11 | ## Version 0.15.9
|
8 | 12 |
|
9 |
| -- refactor(core): use `str_to_bool` of `python-strtobool` instead of `strtobool` |
10 |
| - of `distutils` |
| 13 | +- refactor(core): use `str_to_bool` of `python-strtobool` instead of `strtobool` of `distutils` |
11 | 14 | - feat(test-snapshot): add prefix to snapshot fixture
|
12 | 15 |
|
13 | 16 | ## Version 0.15.8
|
14 | 17 |
|
15 |
| -- feat(test-snapshot): the `selector` function can signal the `monitor` it should |
16 |
| - ignore a particular snapshot of the state by returning `None` |
| 18 | +- feat(test-snapshot): the `selector` function can signal the `monitor` it should ignore a particular snapshot of the state by returning `None` |
17 | 19 |
|
18 | 20 | ## Version 0.15.7
|
19 | 21 |
|
20 |
| -- refactor(test-snapshot): make it aligned with `pyfakefs` by using `try`/`except` |
21 |
| - instead of checking `Path().exists()` as `pyfakefs` doesn't seem to respect `skip_names` |
22 |
| - for `Path().exists()` |
| 22 | +- refactor(test-snapshot): make it aligned with `pyfakefs` by using `try`/`except` instead of checking `Path().exists()` as `pyfakefs` doesn't seem to respect `skip_names` for `Path().exists()` |
23 | 23 |
|
24 | 24 | ## Version 0.15.5
|
25 | 25 |
|
26 |
| -- feat(test-snapshot): while still taking snapshots of the whole state of the |
27 |
| - store, one can narrow this down by providing a selector to the `snapshot` method |
28 |
| - (used to be a property) |
29 |
| -- feat(test-snapshot): new `monitor` method to let a test automatically take snapshots |
30 |
| - of the store whenever it is changed. Takes an optional selector to narrow down |
31 |
| - the snapshot. |
| 26 | +- feat(test-snapshot): while still taking snapshots of the whole state of the store, one can narrow this down by providing a selector to the `snapshot` method (used to be a property) |
| 27 | +- feat(test-snapshot): new `monitor` method to let a test automatically take snapshots of the store whenever it is changed. Takes an optional selector to narrow down the snapshot. |
32 | 28 |
|
33 | 29 | ## Version 0.15.4
|
34 | 30 |
|
|
40 | 36 |
|
41 | 37 | ## Version 0.15.2
|
42 | 38 |
|
43 |
| -- refactor(autorun): improve type-hints so that its final return value has the correct |
44 |
| - type, regardless `default_value` is provided or not |
45 |
| -- refactor(view): improve type-hints so that its final return value has the correct |
46 |
| - type, regardless `default_value` is provided or not |
| 39 | +- refactor(autorun): improve type-hints so that its final return value has the correct type, regardless `default_value` is provided or not |
| 40 | +- refactor(view): improve type-hints so that its final return value has the correct type, regardless `default_value` is provided or not |
47 | 41 | - refactor(combine_reducers): use `make_immutable` instead of `make_dataclass`
|
48 | 42 | - test(view): write tests for `store.view`
|
49 | 43 |
|
50 | 44 | ## Version 0.15.1
|
51 | 45 |
|
52 |
| -- feat(core): add `view` method to `Store` to allow computing a derived value from |
53 |
| - the state only when it is accessed and caching the result until the relevant parts |
54 |
| - of the state change |
| 46 | +- feat(core): add `view` method to `Store` to allow computing a derived value from the state only when it is accessed and caching the result until the relevant parts of the state change |
55 | 47 | - feat(test): add performance tests to check it doesn't timeout in edge cases
|
56 | 48 |
|
57 | 49 | ## Version 0.15.0
|
58 | 50 |
|
59 |
| -- refactor(autorun)!: setting `initial_run` option of autorun to `False` used to |
60 |
| - make the autorun simply not call the function on initialization, now it makes |
61 |
| - sure the function is not called until the selector's value actually changes |
62 |
| -- feat(autorun): add `auto_call` and `reactive` options to autorun to control whether |
63 |
| - the autorun should call the function automatically when the comparator's value |
64 |
| - changes and whether it shouldn't automatically call it but yet register a change |
65 |
| - so that when it is manually called the next time, it will call the function. |
| 51 | +- refactor(autorun)!: setting `initial_run` option of autorun to `False` used to make the autorun simply not call the function on initialization, now it makes sure the function is not called until the selector's value actually changes |
| 52 | +- feat(autorun): add `auto_call` and `reactive` options to autorun to control whether the autorun should call the function automatically when the comparator's value changes and whether it shouldn't automatically call it but yet register a change so that when it is manually called the next time, it will call the function. |
66 | 53 |
|
67 | 54 | ## Version 0.14.5
|
68 | 55 |
|
|
82 | 69 |
|
83 | 70 | ## Version 0.14.1
|
84 | 71 |
|
85 |
| -- feat: introduce `grace_time_in_seconds` parameter to `Store` to allow a grace |
86 |
| - period for the store to finish its work before calling `cleanup` and `on_finish` |
| 72 | +- feat: introduce `grace_time_in_seconds` parameter to `Store` to allow a grace period for the store to finish its work before calling `cleanup` and `on_finish` |
87 | 73 |
|
88 | 74 | ## Version 0.14.0
|
89 | 75 |
|
90 |
| -- refactor: `Store` no longer aggregates changes, it now calls listeners with every |
91 |
| - change |
92 |
| -- refactor: `SideEffectRunnerThread` now runs async side effects in the event loop |
93 |
| - of the thread in which it was instantiated in (it used to create its own event |
94 |
| - loop) |
95 |
| -- refactor(test): `event_loop` fixture now sets the global event loop on setup and |
96 |
| - restores it on teardown |
| 76 | +- refactor: `Store` no longer aggregates changes, it now calls listeners with every change |
| 77 | +- refactor: `SideEffectRunnerThread` now runs async side effects in the event loop of the thread in which it was instantiated in (it used to create its own event loop) |
| 78 | +- refactor(test): `event_loop` fixture now sets the global event loop on setup and restores it on teardown |
97 | 79 |
|
98 | 80 | ## Version 0.13.2
|
99 | 81 |
|
100 |
| -- fix: initial snapshot cleanup which used to mistakenly remove files with store:... |
101 |
| - filenames now removes files with store-... filenames |
| 82 | +- fix: initial snapshot cleanup which used to mistakenly remove files with store:... filenames now removes files with store-... filenames |
102 | 83 |
|
103 | 84 | ## Version 0.13.1
|
104 | 85 |
|
|
111 | 92 | - test: add tests for scheduler and fixtures
|
112 | 93 | - refactor: `SideEffectRunnerThread` now runs async side effects in its own event-loop
|
113 | 94 | - refactor: removed `immediate_run` from event subscriptions
|
114 |
| -- refactor: removed `EventSubscriptionOptions` as the only option left was `keep_ref`, |
115 |
| - it's now a parameter of `subscribe_event` |
116 |
| -- feat: new `on_finish` callback for the store, it runs when all worker threads are |
117 |
| - joined and resources are freed |
| 95 | +- refactor: removed `EventSubscriptionOptions` as the only option left was `keep_ref`, it's now a parameter of `subscribe_event` |
| 96 | +- feat: new `on_finish` callback for the store, it runs when all worker threads are joined and resources are freed |
118 | 97 |
|
119 | 98 | ## Version 0.12.7
|
120 | 99 |
|
|
127 | 106 |
|
128 | 107 | ## Version 0.12.5
|
129 | 108 |
|
130 |
| -- refactor: add cleanup to `FinishEvent` handler to clean workers, listeners, subscriptions, |
131 |
| - autoruns, etc |
| 109 | +- refactor: add cleanup to `FinishEvent` handler to clean workers, listeners, subscriptions, autoruns, etc |
132 | 110 | - refactor: `TaskCreator` add `TaskCreatorCallback` protocols
|
133 |
| -- refactor: `Store._create_task` now has a callback parameter to report the created |
134 |
| - task |
135 |
| -- refactor: move serialization methods and side_effect_runner class to separate |
136 |
| - files |
| 111 | +- refactor: `Store._create_task` now has a callback parameter to report the created task |
| 112 | +- refactor: move serialization methods and side_effect_runner class to separate files |
137 | 113 |
|
138 | 114 | ## Version 0.12.4
|
139 | 115 |
|
140 |
| -- fix: serialization class methods of `Store` use `cls` instead of `Store` for the |
141 |
| - sake of extensibility via inheritance |
| 116 | +- fix: serialization class methods of `Store` use `cls` instead of `Store` for the sake of extensibility via inheritance |
142 | 117 | - refactor: `pytest_addoption` moved to `test.py` to make reusable
|
143 | 118 |
|
144 | 119 | ## Version 0.12.3
|
145 | 120 |
|
146 | 121 | - test: write tests for different features of the api
|
147 | 122 | - refactor: rename certain names in the api to better reflect their job
|
148 |
| -- refactor: store_snapshot now puts snapshot files in a hierarchical directory structure |
149 |
| - based on the test module and test name |
| 123 | +- refactor: store_snapshot now puts snapshot files in a hierarchical directory structure based on the test module and test name |
150 | 124 | - fix: sort JSON keys in `snapshot_store`'s `json_snapshot`
|
151 | 125 | - test: cover most features with tests
|
152 | 126 |
|
|
162 | 136 |
|
163 | 137 | ## Version 0.12.0
|
164 | 138 |
|
165 |
| -- refactor: improve creating new state classes in `combine_reducers` upon registering/unregistering |
166 |
| - sub-reducers |
| 139 | +- refactor: improve creating new state classes in `combine_reducers` upon registering/unregistering sub-reducers |
167 | 140 | - feat: add test fixture for snapshot testing the store
|
168 | 141 | - chore(test): add test infrastructure for snapshot testing the store
|
169 | 142 | - test: move demo files to test files and update the to use snapshot fixture
|
170 | 143 |
|
171 | 144 | ## Version 0.11.0
|
172 | 145 |
|
173 |
| -- feat: add `keep_ref` parameter to subscriptions and autoruns, defaulting to `True`, |
174 |
| - if set to `False`, the subscription/autorun will not keep a reference to the callback |
| 146 | +- feat: add `keep_ref` parameter to subscriptions and autoruns, defaulting to `True`, if set to `False`, the subscription/autorun will not keep a reference to the callback |
175 | 147 | - refacotr: general housekeeping
|
176 | 148 |
|
177 | 149 | ## Version 0.10.7
|
|
195 | 167 |
|
196 | 168 | ## Version 0.10.0
|
197 | 169 |
|
198 |
| -- refactor: remove `create_store` closure in favor of `Store` class with identical |
199 |
| - api |
| 170 | +- refactor: remove `create_store` closure in favor of `Store` class with identical api |
200 | 171 |
|
201 | 172 | ## Version 0.9.25
|
202 | 173 |
|
|
208 | 179 |
|
209 | 180 | ## Version 0.9.23
|
210 | 181 |
|
211 |
| -- feat(combine_reducers): initialization of sub-reducers is done with `CombineReducerInitAction` |
212 |
| - containing `_id` instead of normal `InitAction` |
| 182 | +- feat(combine_reducers): initialization of sub-reducers is done with `CombineReducerInitAction` containing `_id` instead of normal `InitAction` |
213 | 183 |
|
214 | 184 | ## Version 0.9.22
|
215 | 185 |
|
216 |
| -- fix: `CombineReducerRegisterAction` should take care of `CompleteReducerResult` |
217 |
| - returned by the sub-reducer on its initialization. |
| 186 | +- fix: `CombineReducerRegisterAction` should take care of `CompleteReducerResult` returned by the sub-reducer on its initialization. |
218 | 187 |
|
219 | 188 | ## Version 0.9.21
|
220 | 189 |
|
221 | 190 | - feat: new option for all subscriptions to hint them keep a weakref of the callback
|
222 | 191 |
|
223 | 192 | ## Version 0.9.20
|
224 | 193 |
|
225 |
| -- refactor: encapsulate autorun options previously provided as multiple keyword arguments, |
226 |
| - in a single `AutorunOptions` immutable class |
| 194 | +- refactor: encapsulate autorun options previously provided as multiple keyword arguments, in a single `AutorunOptions` immutable class |
227 | 195 | - refactor: rename `immediate` to `immediate_run` in autorun subscribers
|
228 |
| -- feat: default value of `immediate_run` can be set for all subscribers of an autorun |
229 |
| - instance by settings `subscribers_immediate_run` option for the autorun |
| 196 | +- feat: default value of `immediate_run` can be set for all subscribers of an autorun instance by settings `subscribers_immediate_run` option for the autorun |
230 | 197 |
|
231 | 198 | ## Version 0.9.19
|
232 | 199 |
|
|
239 | 206 |
|
240 | 207 | ## Version 0.9.17
|
241 | 208 |
|
242 |
| -- refactor: make `dispatch` accept a `with_state(store)` function as parameter, if |
243 |
| - provided it will dispatch return value of this function |
| 209 | +- refactor: make `dispatch` accept a `with_state(store)` function as parameter, if provided it will dispatch return value of this function |
244 | 210 |
|
245 | 211 | ## Version 0.9.15
|
246 | 212 |
|
|
252 | 218 |
|
253 | 219 | ## Version 0.9.13
|
254 | 220 |
|
255 |
| -- feat: make `subscribe` method of `autorun`'s return value, call its callback with |
256 |
| - the latest value immediately |
| 221 | +- feat: make `subscribe` method of `autorun`'s return value, call its callback with the latest value immediately |
257 | 222 |
|
258 | 223 | ## Version 0.9.12
|
259 | 224 |
|
260 | 225 | - feat: add the latest value of `autorun` to the `value` field of its returned value
|
261 | 226 |
|
262 | 227 | ## Version 0.9.11
|
263 | 228 |
|
264 |
| -- feat: the provided `scheduler`, if any, should have a `interval` parameter, if |
265 |
| - set to `False`, it should schedule only once, otherwise it should periodically |
266 |
| - call the `callback` |
| 229 | +- feat: the provided `scheduler`, if any, should have a `interval` parameter, if set to `False`, it should schedule only once, otherwise it should periodically call the `callback` |
267 | 230 |
|
268 | 231 | ## Version 0.9.10
|
269 | 232 |
|
|
272 | 235 |
|
273 | 236 | ## Version 0.9.9
|
274 | 237 |
|
275 |
| -- refactor: improve typehints and allow dispatch to get multiple actions/events |
276 |
| - via `*args` |
| 238 | +- refactor: improve typehints and allow dispatch to get multiple actions/events via `*args` |
277 | 239 |
|
278 | 240 | ## Version 0.9.8
|
279 | 241 |
|
|
298 | 260 |
|
299 | 261 | ## Version 0.9.3
|
300 | 262 |
|
301 |
| -- refactor: add `subscribe` property to the type of the return value of an |
302 |
| - autorun decorator |
| 263 | +- refactor: add `subscribe` property to the type of the return value of an autorun decorator |
303 | 264 |
|
304 | 265 | ## Version 0.9.2
|
305 | 266 |
|
306 |
| -- refactor: use `Immutable` from python-immutable package (extracted and created |
307 |
| - based on `Immutable` class of this package) |
| 267 | +- refactor: use `Immutable` from python-immutable package (extracted and created based on `Immutable` class of this package) |
308 | 268 |
|
309 | 269 | ## Version 0.9.1
|
310 | 270 |
|
|
313 | 273 | ## Version 0.9.0
|
314 | 274 |
|
315 | 275 | - feat: add `scheduler` option to schedule running actions in the main loop of frameworks
|
316 |
| -- feat: add `threads` option to run event handlers asynchronous in `threads` |
317 |
| - number of threads |
| 276 | +- feat: add `threads` option to run event handlers asynchronous in `threads` number of threads |
318 | 277 | - refacotr: allow `Any` return type for event handler and subscriber functions
|
319 | 278 | - feat: add `subscribe` property to the returned function of `autorun`
|
320 | 279 |
|
|
328 | 287 |
|
329 | 288 | ## Version 0.8.0
|
330 | 289 |
|
331 |
| -- feat: drop `type` field in actions and events altogether, recognition is done |
332 |
| - by `isinstance` |
| 290 | +- feat: drop `type` field in actions and events altogether, recognition is done by `isinstance` |
333 | 291 |
|
334 | 292 | ## Version 0.7.3
|
335 | 293 |
|
336 |
| -- fix: loosen `subscribe_event` typing constraints as python doesn't have enough |
337 |
| - type narrowing mechanism at the moment |
| 294 | +- fix: loosen `subscribe_event` typing constraints as python doesn't have enough type narrowing mechanism at the moment |
338 | 295 |
|
339 | 296 | ## Version 0.7.2
|
340 | 297 |
|
|
350 | 307 |
|
351 | 308 | ## Version 0.6.3
|
352 | 309 |
|
353 |
| -- fix: let input reducers of `combine_reducers` have arbitrary action types |
354 |
| - irrelevant to each other |
| 310 | +- fix: let input reducers of `combine_reducers` have arbitrary action types irrelevant to each other |
355 | 311 |
|
356 | 312 | ## Version 0.6.2
|
357 | 313 |
|
|
368 | 324 |
|
369 | 325 | ## Version 0.5.0
|
370 | 326 |
|
371 |
| -- feat: introduce `immutable` decorator as a shortcut of |
372 |
| - `dataclass(kw_only=True, frozen=True)` |
| 327 | +- feat: introduce `immutable` decorator as a shortcut of `dataclass(kw_only=True, frozen=True)` |
373 | 328 | - feat: introduce `Immutable` class, its subclasses automatically become `immutable`
|
374 | 329 | - refactor: `BaseAction` now inherits from `Immutable`
|
375 |
| -- refactor: Removed `BaseState`, state classes, payload classes, etc should now |
376 |
| - inherit `Immutable` |
| 330 | +- refactor: Removed `BaseState`, state classes, payload classes, etc should now inherit `Immutable` |
377 | 331 |
|
378 | 332 | ## Version 0.4.0
|
379 | 333 |
|
|
0 commit comments