internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: bokeh/bokeh

Issue:
examples upload failed on full release build 
Reported error:

```
 'utf-8' codec can't decode byte 0xcd in position 12: invalid continuation byte
```

https://travis-ci.org/bokeh/bokeh/jobs/242442407#L1826


Discussion:
Presumably this is because the `cdn_upload` function does this:
```
 c.setopt(pycurl.POSTFIELDS, open(local_path).read().encode('utf-8'))
```
which is necessary and appropriate when uploading BokehJS files to CDN. Will have to investigate if that command can also accept raw bytes. 

Resolving patch:
diff --git a/scripts/build_upload.py b/scripts/build_upload.py
--- a/scripts/build_upload.py
+++ b/scripts/build_upload.py
@@ -161,7 +161,7 @@ def wrapper(*args, **kw):
         return wrapper
     return decorator
 
-def cdn_upload(local_path, cdn_path, content_type, cdn_token, cdn_id):
+def cdn_upload(local_path, cdn_path, content_type, cdn_token, cdn_id, binary=False):
     print(":uploading to CDN: %s" % cdn_path)
     if CONFIG.dry_run: return
     url = 'https://storage101.dfw1.clouddrive.com/v1/%s/%s' % (cdn_id, cdn_path)
@@ -172,7 +172,11 @@ def cdn_upload(local_path, cdn_path, content_type, cdn_token, cdn_id):
     c.setopt(c.HTTPHEADER, ["X-Auth-Token: %s" % cdn_token,
                             "Origin: https://mycloud.rackspace.com",
                             "Content-Type: %s" % content_type])
-    c.setopt(pycurl.POSTFIELDS, open(local_path).read().encode('utf-8'))
+    if binary:
+        data = open(local_path, "rb").read()
+    else:
+        data = open(local_path).read().encode('utf-8')
+    c.setopt(pycurl.POSTFIELDS, data)
     c.perform()
     c.close()
 
@@ -382,7 +386,7 @@ def upload_docs():
 def upload_examples(cdn_token, cdn_id):
     local_path = "examples-%s.zip" % CONFIG.version
     cdn_path = 'bokeh/bokeh/examples/%s' % local_path
-    cdn_upload(local_path, cdn_path, 'application/zip', cdn_token, cdn_id)
+    cdn_upload(local_path, cdn_path, 'application/zip', cdn_token, cdn_id, binary=True)
 
 @upload_wrapper('npm')
 def upload_npm():
@@ -472,8 +476,8 @@ def upload_npm():
         print(blue("[SKIP] ") + "Not updating Examples tarball for pre-releases")
     else:
         upload_pypi()
-        upload_examples(cdn_token, cdn_id)
         upload_npm()
+        upload_examples(cdn_token, cdn_id)
 
     # finish ----------------------------------------------------------------
 


Test patch:
Repository: bokeh/bokeh

Issue:
bokeh png command doesn't maximize window to capture entire output
bokeh png command doesn't maximize window to capture entire output.

bokeh 0.12.7dev2


Discussion:

Resolving patch:
diff --git a/bokeh/io.py b/bokeh/io.py
--- a/bokeh/io.py
+++ b/bokeh/io.py
@@ -626,6 +626,7 @@ def _get_screenshot_as_png(obj, driver):
         web_driver = driver
 
     web_driver.get("file:///" + html_path)
+    web_driver.maximize_window()
 
     ## resize for PhantomJS compat
     web_driver.execute_script("document.body.style.width = '100%';")


Test patch:
diff --git a/bokeh/tests/test_io.py b/bokeh/tests/test_io.py
--- a/bokeh/tests/test_io.py
+++ b/bokeh/tests/test_io.py
@@ -337,6 +337,23 @@ def test__get_screenshot_as_png_with_driver():
     # a 20x20px image of transparent pixels
     assert png.tobytes() == ("\x00"*1600).encode()
 
+@pytest.mark.unit
+@pytest.mark.selenium
+def test__get_screenshot_as_png_large_plot():
+    layout = Plot(x_range=Range1d(), y_range=Range1d(),
+                  plot_height=800, plot_width=800, toolbar_location=None,
+                  outline_line_color=None, background_fill_color=None,
+                  border_fill_color=None)
+
+    driver = webdriver.PhantomJS(service_log_path=os.path.devnull)
+    assert driver.get_window_size() == {'width': 400, 'height': 300}
+
+    io._get_screenshot_as_png(layout, driver)
+
+    # LC: Although the window size doesn't match the plot dimensions (unclear
+    # why), the window resize allows for the whole plot to be captured
+    assert driver.get_window_size() == {'width': 1366, 'height': 768}
+
 @pytest.mark.unit
 @pytest.mark.selenium
 def test__get_svgs_no_svg_present():
Repository: bokeh/bokeh

Issue:
Remove bokehjs/src/vendor and all associated logic
At this point there is only gloo2 and bootstrap/less. Those can be moved around and it will be possible to remove clumsy logic handling `src/vendor` (custom labeling and imports).


Discussion:

Resolving patch:
diff --git a/bokeh/settings.py b/bokeh/settings.py
--- a/bokeh/settings.py
+++ b/bokeh/settings.py
@@ -210,7 +210,7 @@ def js_files(self):
         js_files = []
         for root, dirnames, files in os.walk(bokehjsdir):
             for fname in files:
-                if fname.endswith(".js") and 'vendor' not in root:
+                if fname.endswith(".js"):
                     js_files.append(join(root, fname))
         return js_files
 
@@ -222,7 +222,7 @@ def css_files(self):
         js_files = []
         for root, dirnames, files in os.walk(bokehjsdir):
             for fname in files:
-                if fname.endswith(".css") and 'vendor' not in root:
+                if fname.endswith(".css"):
                     js_files.append(join(root, fname))
         return js_files
 


Test patch:
diff --git a/bokehjs/test/index.coffee b/bokehjs/test/index.coffee
--- a/bokehjs/test/index.coffee
+++ b/bokehjs/test/index.coffee
@@ -13,15 +13,10 @@ module.constructor.prototype.require = (modulePath) ->
   assert(typeof modulePath == 'string', 'path must be a string')
 
   if not modulePath.startsWith(".")
-    overridePath = pkg.browser[modulePath]
+    overridePath = path.join(root, path.dirname(pkg.main), modulePath + ".js")
 
-    if overridePath?
-      modulePath = path.join(root, overridePath)
-    else
-      overridePath = path.join(root, path.dirname(pkg.main), modulePath + ".js")
-
-      if fs.existsSync(overridePath)
-        modulePath = overridePath
+    if fs.existsSync(overridePath)
+      modulePath = overridePath
 
   try
     return this.constructor._load(modulePath, this)
diff --git a/tests/test_code_quality.py b/tests/test_code_quality.py
--- a/tests/test_code_quality.py
+++ b/tests/test_code_quality.py
@@ -38,7 +38,7 @@ def use_tab_rule(fname):
 
 exclude_exts = (".png", ".jpg", ".pxm", ".ico", ".ics", ".gz", ".gif", ".enc", ".svg", ".xml")
 
-exclude_dirs = ("bokehjs/src/vendor", "sphinx/draw.io")
+exclude_dirs = ("sphinx/draw.io",)
 
 def collect_errors():
     errors = []
Repository: bokeh/bokeh

Issue:
"TapTool" is incorrectly called "TapSelectTool" in the reference documentation
"TapTool" is incorrectly called "TapSelectTool" in the reference documentation
-------------------------------------------------------------------------------------------------------

In the Bokeh documentation, "TapTool" is described under the name "TapSelectTool".

See http://bokeh.pydata.org/en/latest/docs/user_guide/tools.html.

Attempting to import "TapSelectTool" under bokeh 0.12.6 gives an Import Error. Importing and using "TapTool" works just fine.



Discussion:
@MarcusOlivecrona can you check the link you provided? There is neither TapTool nor TapSelectTool on the page linked. A screen shot would also be helpful.
@bryevdv You're right, I made an edit to the correct link.

Here is a screen shot of the docs:

![image](https://user-images.githubusercontent.com/23477216/28124207-4a84da7e-6723-11e7-9af7-284e82ecb3b1.png)

Here is a screenshot from bokeh/models/tools.py in bokeh 0.12.6:

![image](https://user-images.githubusercontent.com/23477216/28124347-ae4ff322-6723-11e7-9a30-9d3d99a0a2a7.png)

And here trying to import both "TapSelectTool" and "TapTool" (only succeeding for the second):
![image](https://user-images.githubusercontent.com/23477216/28124631-8d3db966-6724-11e7-80be-89f4be7ce160.png)

 
@MarcusOlivecrona awesome, thanks

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -294,7 +294,7 @@ class ResizeTool(Drag):
 
 
 class TapTool(Tap):
-    ''' *toolbar icon*: |tap_select_icon|
+    ''' *toolbar icon*: |tap_icon|
 
     The tap selection tool allows the user to select at single points by
     left-clicking a mouse, or tapping with a finger.
@@ -302,7 +302,7 @@ class TapTool(Tap):
     See :ref:`userguide_styling_selected_unselected_glyphs` for information
     on styling selected and unselected glyphs.
 
-    .. |tap_select_icon| image:: /_images/icons/TapSelect.png
+    .. |tap_icon| image:: /_images/icons/Tap.png
         :height: 18pt
 
     .. note::


Test patch:
Repository: bokeh/bokeh

Issue:
Server url hard coded as localhost. With possible fix.
#### ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
bokeh: 0.12.6
python: 3.6
notebook: 5.0.0
jupyter: 1.0.0
jupyter_client 5.0.1
jupyter_console: 5.1.0
jupyter_core: 4.3.0
ipython: 6.0.0
ipython_genutils: 0.2.0
OS: ubuntu 16.04
brower: Chrome 58.0.3029.110 (64-bit)
#### Description of expected behavior and the observed behavior
What I tried to do was running a jupyter server on one computer and then opening up notebook_embed.ipynb on another computer through internet. The `show(app)` didn't show any figure.

This is caused by this line `script = autoload_server(url='http://127.0.0.1:%d%s' % (server.port, app_path))`  in the function `_show_notebook_app_with_state`. 

This is fine when jupyter notebook is run on localhost. But suppose now my server ip is 10.0.1.1 and client ip is 10.0.1.2. When this line is called, it creates js code on server (10.0.1.1). The code is sent to the client (10.0.1.2). When the browser on client sees this js code, it tries to fetch the figure from 127.0.0.1 instead of the server (10.0.1.1).

So I fixed the bug by changing the line to
```
script = autoload_server(url='http://%s:%d%s' % (notebook_url.split(':')[0], server.port, app_path))
```
In this case, you can specify the server ip by calling `show(app, notebook_url='10.0.1.1:8888')`. Now the browser on the client computer correctly sees to the bokeh server is on the server ip.



Discussion:
@enfeizhan are you interested in working up a small PR with this change?
@bryevdv Sure. Already working with the fixed version.

Resolving patch:
diff --git a/bokeh/io.py b/bokeh/io.py
--- a/bokeh/io.py
+++ b/bokeh/io.py
@@ -28,7 +28,7 @@
 # Bokeh imports
 from .core.state import State
 from .document import Document
-from .embed import autoload_server, notebook_div, file_html
+from .embed import server_document, notebook_div, file_html
 from .layouts import gridplot, GridSpec ; gridplot, GridSpec
 from .models import Plot
 from .resources import INLINE
@@ -303,7 +303,8 @@ def _show_notebook_app_with_state(app, state, app_path, notebook_url):
     loop = IOLoop.current()
     server = Server({app_path: app}, io_loop=loop, port=0,  allow_websocket_origin=[notebook_url])
     server.start()
-    script = autoload_server(url='http://127.0.0.1:%d%s' % (server.port, app_path))
+    url = 'http://%s:%d%s' % (notebook_url.split(':')[0], server.port, app_path)
+    script = server_document(url)
     display(HTML(_server_cell(server, script)))
 
 def _show_with_state(obj, state, browser, new, notebook_handle=False):


Test patch:
Repository: bokeh/bokeh

Issue:
consider dynamic_map.py for deprecation
ping @brendancol 

The data and undelying map quickly get out of sync

A _very_ short self contained fix could potentially be made. 

```
examples/plotting/file/dynamic_map.py:
 data overlays wrong after pan/zoom
```



Discussion:
added this to the `examples_tweaks` branch

@brendancol fixes should be in their own PRs (sorry for confusion) the "shared" PRs are for docs-only changes. (Also that branch/PR has been merged already)

I merged the PR for a release workaround but will leave this issue open to further investigate the root causes. 

The example is currently broken because the server in the example does not seem to be publicly serving images any longer, e.g this URL 

http://raster.nationalmap.gov/arcgis/rest/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer/export?bbox=-17738291.271167893,-10610798.101869,4373412.271167893,11559823.101869&bboxSR=102100&size=567%2C565&imageSR=102100&format=png32&transparent=true&f=image

does not work.

I would actually propose to remove the example (and possibly deprecate dynamic image) and leave this sort of thing to geoviews. 

@bokeh/dev @brendancol @philippjfr @jlstevens thoughts? 

Moving to 0.12.7 because if we are to deprecate it needs to happen in the next release. 
@bryevdv Could briefly describe what functionality dynamic map actually provided and how it relates to map tiles?
@philippjfr not really, AFIAK I think it can help with retrieving scaled images from sites that have a suitable REST API
A brief and admittedly incomplete search of GitHub did not turn up any real uses of `add_dynamic_map` that I could find. I'm personally +1 to remove. 

Resolving patch:
diff --git a/bokeh/models/plots.py b/bokeh/models/plots.py
--- a/bokeh/models/plots.py
+++ b/bokeh/models/plots.py
@@ -332,6 +332,7 @@ def add_dynamic_image(self, image_source, **kw):
             DynamicImageRenderer : DynamicImageRenderer
 
         '''
+        deprecated((0, 12, 7), "add_dynamic_image", "GeoViews for GIS functions on top of Bokeh (http://geo.holoviews.org)")
         image_renderer = DynamicImageRenderer(image_source=image_source, **kw)
         self.renderers.append(image_renderer)
         return image_renderer
diff --git a/bokeh/models/renderers.py b/bokeh/models/renderers.py
--- a/bokeh/models/renderers.py
+++ b/bokeh/models/renderers.py
@@ -13,6 +13,7 @@
 from ..core.validation import error
 from ..core.validation.errors import BAD_COLUMN_NAME, MISSING_GLYPH, NO_SOURCE_FOR_GLYPH, CDSVIEW_SOURCE_DOESNT_MATCH
 from ..model import Model
+from ..util.deprecation import deprecated
 
 from .glyphs import Glyph, XYGlyph, Circle, MultiLine
 from .graphs import GraphSource
@@ -76,6 +77,10 @@ class DynamicImageRenderer(DataRenderer):
 
     '''
 
+    def __init__(self, *args, **kw):
+        super(DynamicImageRenderer, self).__init__(*args, **kw)
+        deprecated((0, 12, 7), "DynamicImageRenderer", "GeoViews for GIS functions on top of Bokeh (http://geo.holoviews.org)")
+
     image_source = Instance(ImageSource, help="""
     Image source to use when rendering on the plot.
     """)


Test patch:
Repository: bokeh/bokeh

Issue:
deprecate OpenURL?
`OpenURL` has slightly different semantics that standard callbacks, causing confusion and problems (e.g. https://github.com/bokeh/bokeh/issues/6580). I'd like to propose deprecating it in `0.12.7` and removing in `1.0` The change would be accompanied by documentation support in the user's guide showing how to do the same sort of thing with a standard `CustomJS` callback, and a deprecation message pointing there. 


ping @bokeh/dev 


Discussion:
I'm supportive of this. The OpenURL callback has been (to me) a greater source of confusion than value due to it's non-standard semantics.

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -321,8 +321,25 @@ class TapTool(Tap):
     """)
 
     callback = Instance(Callback, help="""
-    A client-side action specification, like opening a URL, showing
-    a dialog box, etc. See :class:`~bokeh.models.actions.Action` for details.
+    A callback to execute *whenever a glyph is "hit"* by a mouse click
+    or tap.
+
+    This is often useful with the  :class:`~bokeh.models.callbacks.OpenURL`
+    model to open URLs based on a user clicking or tapping a specific glyph.
+
+    However, it may also be a :class:`~bokeh.models.callbacks.CustomJS`
+    which can execute arbitrary JavaScript code in response to clicking or
+    tapping glyphs. The callback will be executed for each individual glyph
+    that is it hit by a click or tap, and will receive the ``TapTool`` model
+    as  ``cb_obj``. The optional ``cb_data`` will have the data source as
+    its ``.source`` attribute and the selection geometry as its
+    ``.geometries`` attribute.
+
+    .. note::
+        This callback does *not* execute on every tap, only when a glyphs is
+        "hit". If you would like to execute a callback on every mouse tap,
+        please see :ref:`userguide_interaction_jscallbacks_customjs_interactions`.
+
     """)
 
 


Test patch:
Repository: bokeh/bokeh

Issue:
export_csv example under 0.12.7dev11 doesn't resize table
Running example export_csv from https://github.com/bokeh/bokeh/tree/master/examples/app/export_csv

under 0.12.7dev11 the table doesn't resize and extra rows are filled with 'undefined', '$NaN'.
The number of rows is 248 and doesn't change when moving the slider.
The rows after 248 are not shown.

Under 0.12.6 everything works perfect.


Discussion:
ping @mattpap can confirm this in `master` have not had a chance to bisect yet. 
<img width="1081" alt="screen shot 2017-07-19 at 09 20 33" src="https://user-images.githubusercontent.com/1078448/28371791-89c1bcc6-6c63-11e7-97f9-74a50521e2cf.png">


Resolving patch:
diff --git a/examples/app/export_csv/main.py b/examples/app/export_csv/main.py
--- a/examples/app/export_csv/main.py
+++ b/examples/app/export_csv/main.py
@@ -4,7 +4,7 @@
 
 from bokeh.layouts import row, widgetbox
 from bokeh.models import ColumnDataSource, CustomJS
-from bokeh.models.widgets import Slider, Button, DataTable, TableColumn, NumberFormatter
+from bokeh.models.widgets import RangeSlider, Button, DataTable, TableColumn, NumberFormatter
 from bokeh.io import curdoc
 
 df = pd.read_csv(join(dirname(__file__), 'salary_data.csv'))
@@ -12,14 +12,14 @@
 source = ColumnDataSource(data=dict())
 
 def update():
-    current = df[df['salary'] <= slider.value].dropna()
+    current = df[(df['salary'] >= slider.value[0]) & (df['salary'] <= slider.value[1])].dropna()
     source.data = {
         'name'             : current.name,
         'salary'           : current.salary,
         'years_experience' : current.years_experience,
     }
 
-slider = Slider(title="Max Salary", start=10000, end=250000, value=150000, step=1000)
+slider = RangeSlider(title="Max Salary", start=10000, end=110000, value=(10000, 50000), step=1000, format="0,0")
 slider.on_change('value', lambda attr, old, new: update())
 
 button = Button(label="Download", button_type="success")


Test patch:
diff --git a/bokehjs/test/models/sources/cds_view.coffee b/bokehjs/test/models/sources/cds_view.coffee
--- a/bokehjs/test/models/sources/cds_view.coffee
+++ b/bokehjs/test/models/sources/cds_view.coffee
@@ -80,3 +80,14 @@ describe "CDSView", ->
     expect(view.indices).to.be.deep.equal([])
     cds.patch({"x" :[[0, "b"]]})
     expect(view.indices).to.be.deep.equal([0])
+
+  it "should update its indices when its source's data changes", ->
+    data1 = {x: ["a"], y: [1]}
+    data2 = {x: ["b"], y: [1]}
+    cds = new ColumnDataSource({data: data1})
+    group_filter = new GroupFilter({column_name: "x", group: "b"})
+
+    view = new CDSView({source: cds, filters: [group_filter]})
+    expect(view.indices).to.be.deep.equal([])
+    cds.data = data2
+    expect(view.indices).to.be.deep.equal([0])
Repository: bokeh/bokeh

Issue:
Task: Add PolySelectTool callback attr
The PolySelectTool is missing a callback attribute and needs one to be in alignment w/ the other select tools.


Discussion:

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -640,6 +640,14 @@ class PolySelectTool(Tap):
     defaults to all renderers on a plot.
     """)
 
+    callback = Instance(Callback, help="""
+    A callback to run in the browser on completion of drawing a polygon.
+    The cb_data parameter that is available to the Callback code will contain
+    one PolySelectTool-specific field:
+
+    :geometry: object containing the coordinates of the polygon
+    """)
+
     overlay = Instance(PolyAnnotation, default=DEFAULT_POLY_OVERLAY, help="""
     A shaded annotation drawn to indicate the selection region.
     """)


Test patch:
Repository: bokeh/bokeh

Issue:
Drop TSX templates
Currently only toolbar still uses templates. This should be replaced with `core/dom` and the TSX templates can be removed.


Discussion:

Resolving patch:
diff --git a/bokeh/util/compiler.py b/bokeh/util/compiler.py
--- a/bokeh/util/compiler.py
+++ b/bokeh/util/compiler.py
@@ -18,6 +18,7 @@
 from ..model import Model
 from ..settings import settings
 from .string import snakify
+from .deprecation import deprecated
 
 _plugin_umd = \
 """\
@@ -213,6 +214,9 @@ def lang(self):
 class FromFile(Implementation):
 
     def __init__(self, path):
+        if path.endswith(".tsx"):
+            deprecated((0, 12, 7), "TSX templates", "core/dom APIs")
+
         with io.open(path, encoding="utf-8") as f:
             self.code = f.read()
         self.file = path


Test patch:
diff --git a/bokehjs/test/models/tools/toolbar.coffee b/bokehjs/test/models/tools/toolbar.coffee
--- a/bokehjs/test/models/tools/toolbar.coffee
+++ b/bokehjs/test/models/tools/toolbar.coffee
@@ -20,14 +20,6 @@ describe "ToolbarView", ->
     @test_tb = new Toolbar()
     @test_tb.attach_document(doc)
 
-  it "render should call template with toolbar_location", ->
-    @test_tb.toolbar_location = 'below'
-    tb_view = new @test_tb.default_view({ model: @test_tb, parent: null })
-    spy = sinon.spy(tb_view, 'template')
-    tb_view.render()
-    expect(spy.calledOnce).is.true
-    expect(spy.args[0][0]['location']).is.equal 'below'
-
   it "render should set the appropriate positions and paddings on the element in box mode", ->
     dom_left = 12
     dom_top = 44
Repository: bokeh/bokeh

Issue:
Set initial date in date picker in models/file/widgets
This is needed to make image diff not fail when example is run on different days.



Discussion:

Resolving patch:
diff --git a/examples/models/file/widgets.py b/examples/models/file/widgets.py
--- a/examples/models/file/widgets.py
+++ b/examples/models/file/widgets.py
@@ -1,6 +1,6 @@
 from __future__ import print_function
 
-#from datetime import date
+from datetime import date
 
 from bokeh.document import Document
 from bokeh.embed import file_html
@@ -55,7 +55,7 @@
 
 #date_range_slider = DateRangeSlider(value=(date(2016, 1, 1), date(2016, 12, 31)))
 
-date_picker = DatePicker()
+date_picker = DatePicker(value=date(2017, 8, 1))
 
 paragraph = Paragraph(text="some text")
 


Test patch:
Repository: bokeh/bokeh

Issue:
Update docstring to reflect changes released in 0.12.0
`plot.title` has been deprecated in `0.12.0`. 

Update docstring in 
https://github.com/bokeh/bokeh/blob/master/bokeh/io.py#L492 appropriately.


Discussion:

Resolving patch:
diff --git a/bokeh/io.py b/bokeh/io.py
--- a/bokeh/io.py
+++ b/bokeh/io.py
@@ -484,7 +484,7 @@ def push_notebook(document=None, state=None, handle=None):
             handle = show(plot, notebook_handle=True)
 
             # Update the plot title in the earlier cell
-            plot.title = "New Title"
+            plot.title.text = "New Title"
             push_notebook(handle=handle)
 
     '''


Test patch: