Make iris.util.new_axis handle lazy data#2051
Conversation
2937f5e to
93afdfd
Compare
|
I'd really like to squeeze this into the next release if possible @bjlittle? (I know you said it is closed for further PRs, but the branch has yet to be cut...). |
|
@ajdawson Our motivation was to push 1.10 out asap, but we're hitting issues with iris-grib baggage. I suspect that this PR could slip in 😉 , but if not we want a swift point release after 1.10. I'll have a huddle with the other devs to discuss. Because we're just not slick enough with the release mechanism "at the moment" it's inevitable that more PRs will come knocking on the door ... In the meantime, something has broken the channel dependencies. I re-ran your travis tests to check that this was the case ... and sure enough it is. I can't recreate the problem locally, in a fresh conda env and manually stepping through the .travis.yml just works. Any ideas? Have you seen this before? |
|
This perhaps? conda/conda#2675 |
|
Shameful if true ... awesome spot, I'll give it a try, thanks! |
|
@ajdawson I think that it would be worth while adding an integration test that actually has a cube with deferred data e.g. What do you think? Otherwise, I'm 👍 |
|
I think the integration test is a nice idea. I will do that. |
|
Awesome. |
| cube = iris.load_cube(filename) | ||
| new_cube = new_axis(cube, 'time') | ||
| self.assertTrue(cube.has_lazy_data()) | ||
| self.assertTrue(new_cube.has_lazy_data()) |
There was a problem hiding this comment.
@ajdawson Did you also want to check the resulting shape ?
If so, then I guess that would also apply to test_lazy_data ...
071b214 to
23965d9
Compare
|
OK I've modified the unit and integration tests. They are now essentially the same as each other, but one uses real data. |
Make
iris.util.new_axiswork without loading a deferred data payload. I've usediris.cube.Cube.lazy_data()for this, I didn't use a check to see if the cube actually has lazy data, it seems not to matter, but advice is welcome.