Commit 94e44ef
Lazy netcdf saves (#5191)
* Basic functional lazy saving.
* Simplify function signature which upsets Sphinx.
* Non-lazy saves return nothing.
* Now fixed to enable use with process/distributed scheduling.
* Remove dask.utils.SerializableLock, which I think was a mistake.
* Make DefferedSaveWrapper use _thread_safe_nc.
* Fixes for non-lazy save.
* Avoid saver error when no deferred writes.
* Reorganise locking code, ready for shareable locks.
* Remove optional usage of 'filelock' for lazy saves.
* Document dask-specific locking; implement differently for threads or distributed schedulers.
* Minor fix for unit-tests.
* Pin libnetcdf to avoid problems -- see #5187.
* Minor test fix.
* Move DeferredSaveWrapper into _thread_safe_nc; replicate the NetCDFDataProxy fix; use one lock per Saver; add extra up-scaled test
* Update lib/iris/fileformats/netcdf/saver.py
Co-authored-by: Bouwe Andela <bouweandela@gmail.com>
* Update lib/iris/fileformats/netcdf/_dask_locks.py
Co-authored-by: Bouwe Andela <bouweandela@gmail.com>
* Update lib/iris/fileformats/netcdf/saver.py
Co-authored-by: Bouwe Andela <bouweandela@gmail.com>
* Small rename + reformat.
* Remove Saver lazy option; all lazy saves are delayed; factor out fillvalue checks and make them delayable.
* Repurposed 'test__FillValueMaskCheckAndStoreTarget' to 'test__data_fillvalue_check', since old class is gone.
* Disable (temporary) saver debug printouts.
* Fix test problems; Saver automatically completes to preserve existing direct usage (which is public API).
* Fix docstring error.
* Fix spurious error in old saver test.
* Fix Saver docstring.
* More robust exit for NetCDFWriteProxy operation.
* Fix doctests by making the Saver example functional.
* Improve docstrings; unify terminology; simplify non-lazy save call.
* Moved netcdf cell-method handling into nc_load_rules.helpers, and various tests into more specific test folders.
* Fix lockfiles and Makefile process.
* Add unit tests for routine _fillvalue_report().
* Remove debug-only code.
* Added tests for what the save function does with the 'compute' keyword.
* Fix mock-specific problems, small tidy.
* Restructure hierarchy of tests.unit.fileformats.netcdf
* Tidy test docstrings.
* Correct test import.
* Avoid incorrect checking of byte data, and a numpy deprecation warning.
* Alter parameter names to make test reports clearer.
* Test basic behaviour of _lazy_stream_data; make 'Saver._delayed_writes' private.
* Add integration tests, and distributed dependency.
* Docstring fixes.
* Documentation section and whatsnew entry.
* Various fixes to whatsnew, docstrings and docs.
* Minor review changes, fix doctest.
* Arrange tests + results to organise by package-name alone.
* Review changes.
* Review changes.
* Enhance tests + debug.
* Support scheduler type 'single-threaded'; allow retries on delayed-save test.
* Improve test.
* Adding a whatsnew entry for 5224 (#5234)
* Adding a whatsnew entry explaining 5224
* Fixing link and format error
* Replacing numpy legacy printing with array2string and remaking results for dependent tests
* adding a whatsnew entry
* configure codecov
* remove results creation commit from blame
* fixing whatsnew entry
* Bump scitools/workflows from 2023.04.1 to 2023.04.2 (#5236)
Bumps [scitools/workflows](https://github.com/scitools/workflows) from 2023.04.1 to 2023.04.2.
- [Release notes](https://github.com/scitools/workflows/releases)
- [Commits](SciTools/workflows@2023.04.1...2023.04.2)
---
updated-dependencies:
- dependency-name: scitools/workflows
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Use real array for data of of small netCDF variables. (#5229)
* Small netCDF variable data is real.
* Various test fixes.
* More test fixing.
* Fix printout in Mesh documentation.
* Whatsnew + doctests fix.
* Tweak whatsnew.
* Handle derived coordinates correctly in `concatenate` (#5096)
* First working prototype of concatenate that handels derived coordinates correctly
* Added checks for derived coord metadata during concatenation
* Added tests
* Fixed defaults
* Added what's new entry
* Optimized test coverage
* clarity on whatsnew entry contributors (#5240)
* Modernize and simplify iris.analysis._Groupby (#5015)
* Modernize and simplify _Groupby
* Rename variable to improve readability
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
* Add a whatsnew entry
* Add a type hint to _add_shared_coord
* Add a test for iris.analysis._Groupby.__repr__
---------
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
* Finalises Lazy Data documentation (#5137)
* cube and io lazy data notes added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added comments within analysis, as well as palette and iterate, and what's new
* fixed docstrings as requested in @trexfeathers review
* reverted cube.py for time being
* fixed flake8 issue
* Lazy data second batch
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated lastest what'snew
* I almost hope this wasn't the fix, I'm such a moron
* adressed review changes
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bill Little <bill.james.little@gmail.com>
* Fixes to _discontiguity_in_bounds (attempt 2) (#4975)
* update ci locks location (#5228)
* Updated environment lockfiles (#5211)
Co-authored-by: Lockfile bot <noreply@github.com>
* Increase retries.
* Change debug to show which elements failed.
* update cf standard units (#5244)
* update cf standard units
* added whatsnew entry
* Correct pull number
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
---------
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
* libnetcdf <4.9 pin (#5242)
* Pin libnetcdf<4.9 and update lock files.
* What's New entry.
* libnetcdf not available on PyPI.
* Fix for Pandas v2.0.
* Fix for Pandas v2.0.
* Avoid possible same-file crossover between tests.
* Ensure all-different testfiles; load all vars lazy.
* Revert changes to testing framework.
* Remove repeated line from requirements/py*.yml (?merge error), and re-fix lockfiles.
* Revert some more debug changes.
* Reorganise test for better code clarity.
* Use public 'Dataset.isopen()' instead of '._isopen'.
* Create output files in unique temporary directories.
* Tests for fileformats.netcdf._dask_locks.
* Fix attribution names.
* Fixed new py311 lockfile.
* Fix typos spotted by codespell.
* Add distributed test dep for python 3.11
* Fix lockfile for python 3.11
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Bouwe Andela <bouweandela@gmail.com>
Co-authored-by: Henry Wright <84939917+HGWright@users.noreply.github.com>
Co-authored-by: Henry Wright <henrywright@sky.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
Co-authored-by: Bill Little <bill.james.little@gmail.com>
Co-authored-by: Bouwe Andela <b.andela@esciencecenter.nl>
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
Co-authored-by: Elias <110238618+ESadek-MO@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: stephenworsley <49274989+stephenworsley@users.noreply.github.com>
Co-authored-by: scitools-ci[bot] <107775138+scitools-ci[bot]@users.noreply.github.com>
Co-authored-by: Lockfile bot <noreply@github.com>1 parent 949b296 commit 94e44ef
File tree
39 files changed
+1700
-331
lines changed- docs/src
- userguide
- whatsnew
- lib/iris
- fileformats
- _nc_load_rules
- netcdf
- io
- tests
- integration/netcdf
- results/unit/fileformats/netcdf/saver
- Saver__ugrid/TestSaveUgrid__cube
- Saver/write
- unit/fileformats
- nc_load_rules/helpers
- netcdf
- loader
- saver
- requirements
- locks
39 files changed
+1700
-331
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
231 | | - | |
| 231 | + | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
34 | 60 | | |
35 | 61 | | |
36 | 62 | | |
| |||
97 | 123 | | |
98 | 124 | | |
99 | 125 | | |
100 | | - | |
| 126 | + | |
| 127 | + | |
101 | 128 | | |
102 | 129 | | |
103 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
184 | 182 | | |
185 | 183 | | |
186 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
187 | 389 | | |
188 | 390 | | |
189 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | | - | |
29 | | - | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
0 commit comments