Open bryevdv opened 6 years ago
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.
@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.
@hafen Any update on this? I and another dev spent some time looking at what we think is your current version of the code (https://github.com/bokeh/bokeh/compare/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.
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/rbokeh@v0.6.5")
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.
@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.
@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.
@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",
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.
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.
@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.
OK. Thank you for your answer.
@hafen Thanks! I created issue https://github.com/bokeh/rbokeh/issues/234 for click_policy
with a proposal of how I'd think it would work.
@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)