Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Update for Bokeh 1.0 #232

Open
bryevdv opened this issue Oct 24, 2018 · 12 comments
Open

Update for Bokeh 1.0 #232

bryevdv opened this issue Oct 24, 2018 · 12 comments

Comments

@bryevdv
Copy link
Member

bryevdv commented Oct 24, 2018

@hafen FYI Bokeh 1.0 has been released. Let me know if I can help get an updated RBokeh ready (I will not be around most of November, but can help before/after)

@hafen
Copy link
Collaborator

hafen commented Oct 25, 2018

Awesome! The current production rbokeh will not be easy to migrate to 1.0. However, the rewrite I did last year will be easy to update, but as I've mentioned before, there's more testing and documentation that needs to be done with that branch overall before it gets to production, but it's been a very busy year. We can connect more on this offline as necessary.

@elbamos
Copy link

elbamos commented Nov 6, 2018

@hafen I really need the click_policy functionality from bokeh. I'm happy to contribute some time to getting rbokeh up to 1.0 if that will get me the click_policy functionality.

@elbamos
Copy link

elbamos commented Nov 26, 2018

@hafen Any update on this? I and another dev spent some time looking at what we think is your current version of the code (bokeh/bokeh@0.12.15...master ?) and it looks to us that it wouldn't be too much work to get this working. Again, happy to put time in to make it happen.

@hafen
Copy link
Collaborator

hafen commented Nov 27, 2018

Sorry for the delay @elbamos. The location you referenced is for the Bokeh codebase, not rbokeh. I have updated the branch I mentioned to use Bokeh 1.0.1 and it is located here: https://github.com/bokeh/rbokeh/tree/v0.6.5

You can install with

devtools::install_github("bokeh/[email protected]")

I've run it through all the tests and it looks okay. But let me know if you run into any issues.

To expose click_policy functionality should be pretty straightforward, I would assume. @elbamos, if you can open a new issue focused on that with an example for how you would expect it to work, that would be great.

Also, @elbamos, now that you have the location of the newer codebase, if you and your colleague(s) want to take a look and contribute in any way, that would be awesome.

Note @bryevdv that although column_names is a valid attribute of a ColumnDataSource, if you specify this attribute in your json specification, Bokeh 1.0.1 won't render it. Not a big deal but I had to adjust my spec creation accordingly.

@bryevdv
Copy link
Member Author

bryevdv commented Nov 27, 2018

@hafen column_names is no longer a Bokeh Model Property, it is a read-only Python "getter" property, and is definitely not valid in the JSON. Accordingly, it does not show up in the spec.py output:

~/work/bokeh/scripts master ⇣
(base) ❯ python spec.py|grep column_names

~/work/bokeh/scripts master ⇣
(base) ❯

so updating your spec is exactly appropriate to do. I think this change was made a few releases ago, but I don't recall offhand exactly.

@hafen
Copy link
Collaborator

hafen commented Nov 27, 2018

@bryevdv when I run spec.py:

python scripts/spec.py > spec_1.0.1.json

I get the following file: https://github.com/hafen/rbokeh/blob/v0.6.5/code-gen/spec_1.0.1.json, which does still show column_names as attributes.

@bryevdv
Copy link
Member Author

bryevdv commented Nov 27, 2018

@hafen offhand I think you must not be running the version of Bokeh that you intend, maybe a conda/virtualenv confusion? If I activate a 0.12.15 env for example, it does show up:

(base) ❯ conda activate 01215

~/work/bokeh/scripts master ⇣
(01215) ❯ python spec.py|grep column_names
    "proto": "{\"callback\": null, \"column_names\": [], \"content_type\": \"application/json\", \"data\": {}, \"data_url\": null, \"http_headers\": {}, \"id\": \"e935a081-7a97-453c-894f-c4f76237790a\", \"if_modified\": false, \"js_event_callbacks\": {}, \"js_property_callbacks\": {}, \"max_size\": null, \"method\": \"POST\", \"mode\": \"replace\", \"name\": null, \"polling_interval\": null, \"selected\": null, \"selection_policy\": null, \"subscribed_events\": [], \"tags\": []}",
        "name": "column_names",
    "proto": "{\"callback\": null, \"column_names\": [], \"data\": {}, \"id\": \"276c1b57-fb15-4132-ba8b-24fa1fbf9496\", \"js_event_callbacks\": {}, \"js_property_callbacks\": {}, \"name\": null, \"selected\": null, \"selection_policy\": null, \"subscribed_events\": [], \"tags\": []}",
        "name": "column_names",
    "proto": "{\"callback\": null, \"column_names\": [], \"id\": \"5be7e9d6-5acc-4581-9872-14e9e55663b8\", \"js_event_callbacks\": {}, \"js_property_callbacks\": {}, \"name\": null, \"selected\": null, \"selection_policy\": null, \"subscribed_events\": [], \"tags\": []}",
        "name": "column_names",
    "proto": "{\"callback\": null, \"column_names\": [], \"geojson\": null, \"id\": \"ec31ba3e-d9f2-4954-88c8-016e4c72334d\", \"js_event_callbacks\": {}, \"js_property_callbacks\": {}, \"name\": null, \"selected\": null, \"selection_policy\": null, \"subscribed_events\": [], \"tags\": []}",
        "name": "column_names",
    "proto": "{\"callback\": null, \"column_names\": [], \"data\": {}, \"data_url\": null, \"id\": \"c8f22d66-6b44-471d-a6a1-f8c4bd5623f7\", \"js_event_callbacks\": {}, \"js_property_callbacks\": {}, \"name\": null, \"polling_interval\": null, \"selected\": null, \"selection_policy\": null, \"subscribed_events\": [], \"tags\": []}",
        "name": "column_names",

@hafen
Copy link
Collaborator

hafen commented Nov 27, 2018

Ah I'm glad I checked. For some reason I was under the assumption that the spec JSON is just generated from the checked out code, not the installed bokeh Python package. I had run the spec before updating the Python package, but with the 1.0.1 tagged release branch checked out. It's correct now, but now need to do a little more testing.

@Atrebas
Copy link

Atrebas commented Nov 27, 2018

Thank you for this package. It is awesome.
@hafen, could you please update the link to "barebones.R"? At the bottom of the v0.6.5 branch description: "A bare bones set of functions illustrating how this is done is here."
I guess it could help to better understand how it works under the hood.
Thank you.

@hafen
Copy link
Collaborator

hafen commented Nov 27, 2018

@sbsdc thanks for pointing that out - that link is stale because the barebones code was in the early stages of the refactor and is no longer valid. I have started putting together more useful developer documentation, but I won't be able to work on it more until I have some downtime from work, hopefully soon.

@Atrebas
Copy link

Atrebas commented Nov 27, 2018

OK. Thank you for your answer.

@elbamos
Copy link

elbamos commented Nov 28, 2018

@hafen Thanks! I created issue #234 for click_policy with a proposal of how I'd think it would work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants