Skip to content
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

Update to support Bokeh's Quad instead of Rect #5702

Merged
merged 4 commits into from
May 8, 2023
Merged

Update to support Bokeh's Quad instead of Rect #5702

merged 4 commits into from
May 8, 2023

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented May 1, 2023

Fixes #5682

Look into why data is not synced back for Rectangle:

import holoviews as hv
from holoviews import annotate

hv.extension("bokeh")

rectangles = hv.Rectangles([(0, 0, 10, 10)])
box_annotate = annotate.instance()
box_annotate(rectangles, annotations=["Label"], name="Rectangles")
box_annotate.annotated.dframe()

image

Getting a lot of these warnings:

Uncaught Error: reference p1071 isn't known
    DeserializationError http://localhost:8888/lab? line 2 > injectedScript:6885
    error http://localhost:8888/lab? line 2 > injectedScript:7163
    _decode_ref http://localhost:8888/lab? line 2 > injectedScript:7145
    _decode http://localhost:8888/lab? line 2 > injectedScript:6994
    _decode_plain_object http://localhost:8888/lab? line 2 > injectedScript:7027
    _decode http://localhost:8888/lab? line 2 > injectedScript:6997
    _decode_plain_array http://localhost:8888/lab? line 2 > injectedScript:7022
    map http://localhost:8888/lab? line 2 > injectedScript:2041
    _decode_plain_array http://localhost:8888/lab? line 2 > injectedScript:7022
    _decode http://localhost:8888/lab? line 2 > injectedScript:6943
    decoded http://localhost:8888/lab? line 2 > injectedScript:6918
    decode http://localhost:8888/lab? line 2 > injectedScript:6926
    apply_json_patch http://localhost:8888/lab? line 2 > injectedScript:1252
    process_events http://localhost:8888/lab? line 2 > injectedScript:142521
    _document_changed http://localhost:8888/lab? line 2 > injectedScript:142521
    setTimeout handler*_document_changed http://localhost:8888/lab? line 2 > injectedScript:142521
    _document_listener http://localhost:8888/lab? line 2 > injectedScript:142521
    _trigger_on_change http://localhost:8888/lab? line 2 > injectedScript:1146
    patch_to http://localhost:8888/lab? line 2 > injectedScript:2837
    patch http://localhost:8888/lab? line 2 > injectedScript:12927
    setField http://localhost:8888/lab? line 2 > injectedScript:79586
    applyValue http://localhost:8888/lab? line 2 > injectedScript:78743
    execute http://localhost:8888/lab? line 2 > injectedScript:95122
    commitCurrentEdit http://localhost:8888/lab? line 2 > injectedScript:95149
    commitCurrentEdit http://localhost:8888/lab? line 2 > injectedScript:88997
    commitEditAndSetFocus http://localhost:8888/lab? line 2 > injectedScript:94518
    handleKeyDown http://localhost:8888/lab? line 2 > injectedScript:94095
    dispatch http://localhost:8888/lab? line 2 > injectedScript:84332
    dispatch http://localhost:8888/lab? line 2 > injectedScript:95760
    handle http://localhost:8888/lab? line 2 > injectedScript:84184
    add http://localhost:8888/lab? line 2 > injectedScript:84223
    on http://localhost:8888/lab? line 2 > injectedScript:84145
    each http://localhost:8888/lab? line 2 > injectedScript:80393
    each http://localhost:8888/lab? line 2 > injectedScript:80255
    on http://localhost:8888/lab? line 2 > injectedScript:84144
    on http://localhost:8888/lab? line 2 > injectedScript:84721
    finishInitialization http://localhost:8888/lab? line 2 > injectedScript:90467
    init http://localhost:8888/lab? line 2 > injectedScript:90402
    SlickGrid http://localhost:8888/lab? line 2 > injectedScript:95394
    _after_render http://localhost:8888/lab? line 2 > injectedScript:79821
    after_render http://localhost:8888/lab? line 2 > injectedScript:41672
    r_after_render http://localhost:8888/lab? line 2 > injectedScript:41669
    r_after_render http://localhost:8888/lab? line 2 > injectedScript:41665
    r_after_render http://localhost:8888/lab? line 2 > injectedScript:41665
    r_after_render http://localhost:8888/lab? line 2 > injectedScript:41665
    r_after_render http://localhost:8888/lab? line 2 > injectedScript:41665
    render_to http://localhost:8888/lab? line 2 > injectedScript:41658
    render_view http://localhost:8888/lab? line 2 > injectedScript:7836
    render_model http://localhost:8888/lab? line 2 > injectedScript:7843
    add_document_standalone http://localhost:8888/lab? line 2 > injectedScript:7856
    embed_items_notebook http://localhost:8888/lab? line 2 > injectedScript:9724
    embed_document http://localhost:8888/lab/tree/development/dev_holoviews/5682_Update_BoxEditCallback_and_RectanglesTableLinkCallback_to_also_use_Bokehs_Quad.ipynb line 2 > injectedScript:1470
    <anonymous> http://localhost:8888/lab/tree/development/dev_holoviews/5682_Update_BoxEditCallback_and_RectanglesTableLinkCallback_to_also_use_Bokehs_Quad.ipynb line 2 > injectedScript:1482
    <anonymous> http://localhost:8888/lab/tree/development/dev_holoviews/5682_Update_BoxEditCallback_and_RectanglesTableLinkCallback_to_also_use_Bokehs_Quad.ipynb line 2 > injectedScript:1498
    attachWidget http://localhost:8888/static/lab/jlab_core.4d5114e25256eeddf4e4.js?v=4d5114e25256eeddf4e4:2
    insertWidget http://localhost:8888/static/lab/jlab_core.4d5114e25256eeddf4e4.js?v=4d5114e25256eeddf4e4:2
    _insertOutput http://localhost:8888/static/lab/jlab_core.4d5114e25256eeddf4e4.js?v=4d5114e25256eeddf4e4:2
    onModelChanged http://localhost:8888/static/lab/jlab_core.4d5114e25256eeddf4e4.js?v=4d5114e25256eeddf4e4:2
lab:6885:11

@codecov-commenter
Copy link

codecov-commenter commented May 1, 2023

Codecov Report

Merging #5702 (054526d) into main (5ec8e63) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5702      +/-   ##
==========================================
- Coverage   88.30%   88.29%   -0.01%     
==========================================
  Files         302      302              
  Lines       62605    62596       -9     
==========================================
- Hits        55281    55272       -9     
  Misses       7324     7324              
Impacted Files Coverage Δ
holoviews/plotting/bokeh/links.py 72.02% <ø> (ø)
holoviews/plotting/bokeh/callbacks.py 62.26% <100.00%> (-0.32%) ⬇️
holoviews/tests/plotting/bokeh/test_callbacks.py 98.65% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hoxbro
Copy link
Member Author

hoxbro commented May 8, 2023

This problem is also on Holoviews 1.15.4 / Bokeh 2.4.3.

image

@hoxbro
Copy link
Member Author

hoxbro commented May 8, 2023

I will merge this as I have opened #5712 to investigate the missing sync between the table and the annotated.dframe.

@hoxbro hoxbro merged commit 28b05f5 into main May 8, 2023
@hoxbro hoxbro deleted the quad_support branch May 8, 2023 12:41
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update BoxEditCallback and RectanglesTableLinkCallback to also use Bokeh's Quad
2 participants