-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dask array html repr to cube html repr #3383
Conversation
lib/iris/tests/integration/experimental/test_CubeRepresentation.py
Outdated
Show resolved
Hide resolved
It is not functioning for me, when I test with :
It seems that the dask arrays do not provide |
Dask 2.0 😉 (see the dask whatsnew) @pp-mo when you say not working, do you mean that the entire cube repr fails (it shouldn't do that) or just that the dask array repr doesn't appear? The second is intentional, as per the description of this PR:
Does that help? |
BTW ping @mrocklin - I've been looking forward to combining the Iris cube html repr with the dask array html repr since the dask repr was introduced! |
No, it's just missing the dask repr part. I was using Python 2.7 <<slaps own wrist>> for certain convenience reasons. No Dask 2 in python 2 ! |
@lbdreyer why v3 and not v2.3? These are only small changes... |
Admittedly I did that before properly looking at this PR. My thinking was along the lines of 'if it's not going to work in Python 2 then it could instead go into the Iris 3 release when we drop Python 2 support'. If it doesn't break under Python 2 then it can certainly go in before Iris 3. We are under a little pressure with outstanding functionality/fixes that need to go in for Iris 2.3, so I can't guarantee this change will also get in in time, but I will take off the Iris 3 milestone/project. |
Thanks @lbdreyer! |
Just to put down some thoughts on the bug @pp-mo is seeing here, I had a look at the code and i think this is what is happening: I believe somehow the data associated with the dimension coordinate also contains the information for scalar coordinates. At this line we begin treating this information as if we were expecting only '+' and '-' separated by whitespace. The body now consists of a list of all the 'words' and the colspan is set to 0. When making a row, we end up here, and we append each item in the list of words in the body as its own column. I'm still not sure what is causing this behaviour to occur, but I don't believe this would be caused by the changes made here. |
efa7bc1
to
5ca6458
Compare
Hi @DPeterK But I'm a bit doubtful now as to whether you/we can find time to fix these up in the next ~2-3weeks ? I'm considering these 3 together, as they all concern the So , could you maybe update how you feel about this ? |
This seems to have gone stale. We still have ambitions for better HTML, particularly given @pp-mo's work turning the Specifically on this one: we LOVE how it looks, so definitely something to revisit in the new |
Extend the cube html repr to include the html repr of the cube's lazy dask array, if present. If the cube is not lazy or the dask version does not support html repr of arrays then the dask array repr is skipped without erroring.
Here's an example: