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

Issue:
Add WebSource to reference docs
It's currently missing, which means e.g. the `adapter` property of `AjaxDataSource` is not documented. 



Discussion:

Resolving patch:
diff --git a/bokeh/models/sources.py b/bokeh/models/sources.py
--- a/bokeh/models/sources.py
+++ b/bokeh/models/sources.py
@@ -41,7 +41,6 @@
 #-----------------------------------------------------------------------------
 
 __all__ = (
-    'ServerSentDataSource',
     'AjaxDataSource',
     'CDSView',
     'ColumnarDataSource',
@@ -49,6 +48,8 @@
     'DataSource',
     'GeoJSONDataSource',
     'RemoteSource',
+    'ServerSentDataSource',
+    'WebSource',
 )
 
 #-----------------------------------------------------------------------------


Test patch:
Repository: bokeh/bokeh

Issue:
[BUG] Update license id to use the proper SPDX short license id
https://github.com/bokeh/bokeh/issues/8174

The current value `New BSD` does not match any of the valid SPDX licenses:
https://github.com/bokeh/bokeh/blob/d30171fcb0217a9eaa2729110f17444c70494efd/setup.py#L128

Can you please update it to `BSD-3-Clause` ?
https://spdx.org/licenses/BSD-3-Clause.html

$ pip show bokeh
Name: bokeh
Version: 0.13.0
License: New BSD



Discussion:
Hi @bryevdv , I tried pushing the change for the license update but got 403. 

Can you please add me as a collaborator so I can create a PR? 
@sabgit You need to make your own personal fork of the repo, and submit the PR from your fork. We would be happy to add you to @bokeh/dev [after making a few PRs that way](https://github.com/bokeh/bokeh/wiki/BEP-4:-Project-Roles#development-team)

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -125,7 +125,7 @@
     description='Interactive plots and applications in the browser from Python',
     long_description=open("README.md").read(),
     long_description_content_type="text/markdown",
-    license='New BSD',
+    license='BSD-3-Clause',
     author='Bokeh Team',
     author_email='info@bokeh.org',
     url='http://github.com/bokeh/bokeh',


Test patch:
Repository: bokeh/bokeh

Issue:
[DOCS] page for selection tools does not tell users how to get the values/indices of the selection
I've been talking with another bokeh user at Scipy 2019 and found we shared very similar frustrations when starting to work with bokeh selections. The problem is the [documentation page for selection tools](https://bokeh.pydata.org/en/latest/docs/user_guide/tools.html#boxselecttool
) at bokeh.pydata.org does not include information on how you can get the indices/values after you have selected something.

(It's not that there's no documentation on this, the problem is that it's split up & scattered around the place, plus is difficult to surface on google.)


Discussion:
Is it this one https://bokeh.pydata.org/en/latest/docs/reference/events.html?
I would suggest the "Data Sources? chapter is a good place to add docs for selections:

* they live on data sources
* that chapter is not already too-overly-long like some others
OK I am just going to add a very minimal sentence to each tool that mentions that the selections are stored on `source.selected` and links to 

https://docs.bokeh.org/en/latest/docs/reference/models/selections.html#bokeh.models.selections.Selection

which I will also expand to state which selection properties are used in which cases. 

Resolving patch:
diff --git a/bokeh/models/selections.py b/bokeh/models/selections.py
--- a/bokeh/models/selections.py
+++ b/bokeh/models/selections.py
@@ -49,16 +49,37 @@ class Selection(Model):
     Selections are typically created by selecting points in a plot with
     a ``SelectTool``, but can also be programmatically specified.
 
+    For most glyphs, the ``indices`` property is the relevant value to use.
+
     '''
 
     indices = Seq(Int, default=[], help="""
-    The indices included in a selection.
+    The "scatter" level indices included in a selection. For example, for a
+    selection on a ``Circle`` glyph, this list records the indices of whicn
+    individual circles are selected.
+
+    For "multi" glyphs such as ``Patches``, ``MultiLine``, ``MultiPolygons``,
+    etc, this list records the indices of which entire sub-items are selected.
+    For example, which indidual polygons of a ``MultiPolygon`` are selected.
     """)
 
     line_indices = Seq(Int, default=[], help="""
+    The point indices included in a selection on a ``Line`` glyph.
+
+    This value records the indices of the individual points on a ``Line`` that
+    were selected by a selection tool.
     """)
 
     multiline_indices = Dict(String, Seq(Int), default={}, help="""
+    The detailed point indices included in a selection on a ``MultiLine``.
+
+    This value records which points, on which lines, are part of a seletion on
+    a ``MulitLine``. The keys are the top level indices (i.e., which line)
+    which map to lists of indices (i.e. which points on that line).
+
+    If you only need to know which lines are selected, without knowing what
+    individual points on those lines are selected, then you can look at the
+    keys of this dictionary (converted to ints).
     """)
 
     # TODO (bev) image_indicies


Test patch:
Repository: bokeh/bokeh

Issue:
CDN invalidations too narrow
Need a wildcard, e.g. 
```
aws cloudfront create-invalidation --distribution-id <<distid>> --paths '/en/dev/*'
```



Discussion:
@bryevdv Would this wildcard invalidate all files in the `/en/dev` directory or files in it and its subdirectory?

Resolving patch:
diff --git a/scripts/build_upload.py b/scripts/build_upload.py
--- a/scripts/build_upload.py
+++ b/scripts/build_upload.py
@@ -387,11 +387,11 @@ def upload_docs():
 
     if V(CONFIG.version).is_prerelease:
         run(sync_cmd % "dev")
-        run(invalidate_cmd % "/en/dev")
+        run(invalidate_cmd % '"/en/dev*"')
     else:
         run(sync_cmd % CONFIG.version)
         run(sync_cmd % "latest")
-        paths =  "/en/latest /versions.json" % CONFIG.version
+        paths = '"/en/latest*" /versions.json'
         run(invalidate_cmd % paths)
     cd("..")
 


Test patch:
Repository: bokeh/bokeh

Issue:
If import of channels fails, improve error message to install it via pip
Running `pytest tests/codebase/test_python_execution_with_OO.py`fails if channels is not installed:
```
tests/codebase/test_python_execution_with_OO.py:77: AssertionError
------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/mav/dev/python/bokeh/bokeh/util/dependencies.py", line 87, in import_required
    return import_module(mod_name)
  File "/Users/mav/anaconda3/envs/bokeh-dev/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'channels'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 163, in <module>
  File "/Users/mav/dev/python/bokeh/bokeh/server/django/__init__.py", line 9, in <module>
    import_required("channels", "channels is required by bokeh.server.django")
  File "/Users/mav/dev/python/bokeh/bokeh/util/dependencies.py", line 89, in import_required
    raise RuntimeError(error_msg) from e
RuntimeError: channels is required by bokeh.server.django
```

channels cannot be installed via conda at the moment, but should be installed via pip.
The error message should indicate that


Discussion:

Resolving patch:
diff --git a/bokeh/server/django/__init__.py b/bokeh/server/django/__init__.py
--- a/bokeh/server/django/__init__.py
+++ b/bokeh/server/django/__init__.py
@@ -6,7 +6,8 @@
 from bokeh.util.dependencies import import_required
 
 import_required("django", "django is required by bokeh.server.django")
-import_required("channels", "channels is required by bokeh.server.django")
+import_required("channels", "The package channels is required by bokeh.server.django. "
+                            "and must be installed'")
 
 from .apps import DjangoBokehConfig
 default_app_config = "bokeh.server.django.DjangoBokehConfig"


Test patch:
Repository: bokeh/bokeh

Issue:
[BUG] Documentation panels empty
Hello,

I was looking for documentation on Tabs and I went to the page :

https://docs.bokeh.org/en/latest/docs/reference/models/widgets.panels.html
However it display a blank page :
![image](https://user-images.githubusercontent.com/18531147/67140166-fcde1480-f257-11e9-9c5a-a0bd3bbe2ad7.png)

The last time the page was ot empty was on:

https://docs.bokeh.org/en/1.0.4/docs/reference/models/widgets.panels.html




Discussion:
I suppose it's because Panel and Tabs where moved from models.widgets.panels into models.layout and none of the `__all__` variable reference it.
I can make a PR however I don't know what is the recommanded way to correct it.
Remove the `panels.rst` and add `Panels` and `Tabs` to the `__all__` of layout.py.
Or just add the `__all__` varible in `panels.py`
> Remove the `panels.rst` and add `Panel` and `Tab` to the` __all__` of layout.py.

That's the correct approach.

Resolving patch:
diff --git a/bokeh/models/layouts.py b/bokeh/models/layouts.py
--- a/bokeh/models/layouts.py
+++ b/bokeh/models/layouts.py
@@ -46,8 +46,10 @@
     'GridBox',
     'HTMLBox',
     'LayoutDOM',
+    'Panel',
     'Row',
     'Spacer',
+    'Tabs',
     'WidgetBox',
 )
 


Test patch:
Repository: bokeh/bokeh

Issue:
[BUG] Splattable lists no longer allow using list-like methods
On current master and since https://github.com/bokeh/bokeh/pull/9307 the `_list_attr_splat.__getattribute__` method raises AttributeErrors when trying to access list-like methods such as ``pop``, ``index``, etc.


Discussion:

Resolving patch:
diff --git a/bokeh/models/plots.py b/bokeh/models/plots.py
--- a/bokeh/models/plots.py
+++ b/bokeh/models/plots.py
@@ -738,6 +738,8 @@ def __setattr__(self, attr, value):
         for x in self:
             setattr(x, attr, value)
     def __getattribute__(self, attr):
+        if attr in dir(list):
+            return list.__getattribute__(self, attr)
         if len(self) == 0:
             raise AttributeError("Trying to access %r attribute on an empty 'splattable' list" % attr)
         if len(self) == 1:


Test patch:
diff --git a/bokeh/models/tests/test_plots.py b/bokeh/models/tests/test_plots.py
--- a/bokeh/models/tests/test_plots.py
+++ b/bokeh/models/tests/test_plots.py
@@ -376,6 +376,15 @@ def test_get_empty(self):
             obj.start
         assert str(e.value).endswith("Trying to access %r attribute on an empty 'splattable' list" % "start")
 
+    def test_get_index(self):
+        obj = bmp._list_attr_splat([1, 2, 3])
+        assert obj.index(2) == 1
+
+    def test_pop_value(self):
+        obj = bmp._list_attr_splat([1, 2, 3])
+        obj.pop(1)
+        assert obj == [1, 3]
+
 #-----------------------------------------------------------------------------
 # Code
 #-----------------------------------------------------------------------------
Repository: bokeh/bokeh

Issue:
[BUG] Server examples with custom models do not work
@mattpap neither spectrogram nor surface3d work for me (and another person) with 1.4.0rc2 on OSX. 

Fails with 

> Error: Model 'waterfall.WaterfallRenderer' does not exist. This could be due to a widget or a custom model not being registered before first usage.

needless, I have not made the release yet. 


Discussion:
I had thought perhaps `bokeh build` had been made mandatory by default (which I would not prefer) but running `bokeh build` in the app directory did not fix anything.

Resolving patch:
diff --git a/examples/app/spectrogram/waterfall.py b/examples/app/spectrogram/waterfall.py
--- a/examples/app/spectrogram/waterfall.py
+++ b/examples/app/spectrogram/waterfall.py
@@ -1,8 +1,12 @@
+from os.path import dirname, join
+
 from bokeh.core.properties import Color, Float, Int, Override, Seq
 from bokeh.models import Renderer
 
 class WaterfallRenderer(Renderer):
 
+    __implementation__ = join(dirname(__file__), "waterfall.ts")
+
     latest = Seq(Float)
 
     palette = Seq(Color)
diff --git a/examples/app/surface3d/surface3d.py b/examples/app/surface3d/surface3d.py
--- a/examples/app/surface3d/surface3d.py
+++ b/examples/app/surface3d/surface3d.py
@@ -27,6 +27,11 @@
 # wanted to create a custom glyph, etc.
 class Surface3d(LayoutDOM):
 
+    # The special class attribute ``__implementation__`` should contain a string
+    # of JavaScript (or TypeScript) code that implements the JavaScript side
+    # of the custom extension model.
+    __implementation__ = "surface3d.ts"
+
     # Below are all the "properties" for this model. Bokeh properties are
     # class attributes that define the fields (and their types) that can be
     # communicated automatically between Python and the browser. Properties


Test patch:
Repository: bokeh/bokeh

Issue:
Use `npm ci` to force usage of the lock file
`npm ci` should be used in situations where any update of dependencies is undesired, especially in CI. `npm ci` installs dependencies exactly as specified in `package-lock.json`. On the other hand `npm install` can still perform minor updates.



Discussion:

Resolving patch:
diff --git a/_setup_support.py b/_setup_support.py
--- a/_setup_support.py
+++ b/_setup_support.py
@@ -406,7 +406,7 @@ def package_path(path, filters=()):
 
     %s
 
-Have you run `npm install --no-save` from the bokehjs subdirectory?
+Have you run `npm ci` from the bokehjs subdirectory?
 For more information, see the Dev Guide:
 
     https://docs.bokeh.org/en/latest/docs/dev_guide.html


Test patch:
Repository: bokeh/bokeh

Issue:
Deprecate WidgetBox
Propose to deprecate `WidgetBox` at 2.0 and also to simply have it return `Column` instances at that time. 

cc @mattpap 



Discussion:
FYI I have removed all usage of `widgetbox` in the repo and examples as of 1.4
no feedback but this seems uncontroversial so marking as `task`
I overlooked this. Sure, `WidgetBox` is already a `Column`, so apart from name, there will be no breakage.

Resolving patch:
diff --git a/bokeh/models/layouts.py b/bokeh/models/layouts.py
--- a/bokeh/models/layouts.py
+++ b/bokeh/models/layouts.py
@@ -32,6 +32,7 @@
     FIXED_SIZING_MODE, FIXED_WIDTH_POLICY, FIXED_HEIGHT_POLICY)
 from ..core.validation.errors import MIN_PREFERRED_MAX_WIDTH, MIN_PREFERRED_MAX_HEIGHT
 from ..model import Model
+from ..util.deprecation import deprecated
 from .callbacks import Callback
 
 #-----------------------------------------------------------------------------
@@ -410,10 +411,14 @@ class Column(Box):
 
     """)
 
+# TODO (bev) deprecation: 3.0
 class WidgetBox(Column):
     ''' Create a column of bokeh widgets with predefined styling.
 
     '''
+    def __init__(self, *args, **kw):
+        super().__init__(*args, **kw)
+        deprecated("'WidgetBox' is deprecated and will be removed in Bokeh 3.0, use 'Column' instead")
 
 class Panel(Model):
     ''' A single-widget container with title bar and controls.


Test patch:
Repository: bokeh/bokeh

Issue:
Misname/copypasta: login_hander?
Are these supposed to be `login_handler` and `logout_handler` instead of `hander`?
https://github.com/bokeh/bokeh/blob/master/bokeh/server/auth_provider.py#L110


Discussion:
WOW yes 😮 Can you submit a PR to change them?
@bryevdv yep will do tonight (@ceball)

Resolving patch:
diff --git a/bokeh/server/auth_provider.py b/bokeh/server/auth_provider.py
--- a/bokeh/server/auth_provider.py
+++ b/bokeh/server/auth_provider.py
@@ -46,7 +46,7 @@ class AuthProvider(object):
     Optionally, if ``login_url`` provides a relative URL, then ``login_handler``
     may also be supplied.
 
-    The properties ``logout_url`` and ``get_logout_hander`` are analogous to
+    The properties ``logout_url`` and ``get_logout_handler`` are analogous to
     the corresponding login properties, and are optional.
 
     '''
@@ -107,7 +107,7 @@ def get_user_async(self):
         pass
 
     @property
-    def login_hander(self):
+    def login_handler(self):
         ''' A request handler class for a login page.
 
         This property may return None, if ``login_url`` is supplied
@@ -130,7 +130,7 @@ def login_url(self):
         pass
 
     @property
-    def logout_hander(self):
+    def logout_handler(self):
         ''' A request handler class for a logout page.
 
         This property may return None.
diff --git a/bokeh/server/views/ws.py b/bokeh/server/views/ws.py
--- a/bokeh/server/views/ws.py
+++ b/bokeh/server/views/ws.py
@@ -138,7 +138,7 @@ async def _async_open(self, session_id):
         Specifically, this method coordinates:
 
         * Getting a session for a session ID (creating a new one if needed)
-        * Creating a protocol receiver and hander
+        * Creating a protocol receiver and handler
         * Opening a new ServerConnection and sending it an ACK
 
         Args:


Test patch:
Repository: bokeh/bokeh

Issue:
bokeh.palettes refguide page header mis-renders
Add lots of space, changes font size, for some reason (just this page)

https://docs.bokeh.org/en/latest/docs/reference/palettes.html



Discussion:

Resolving patch:
diff --git a/bokeh/sphinxext/bokeh_palette_group.py b/bokeh/sphinxext/bokeh_palette_group.py
--- a/bokeh/sphinxext/bokeh_palette_group.py
+++ b/bokeh/sphinxext/bokeh_palette_group.py
@@ -21,6 +21,11 @@
 
     .. bokeh-palette-group:: mpl
 
+.. note::
+   This extension assumes both Bootstrap and JQuery are present (which is the
+   case for the Bokeh documentation theme). If using this theme outside the
+   Bokeh documentation, be sure to include those resources by hand.
+
 '''
 
 #-----------------------------------------------------------------------------
@@ -75,8 +80,9 @@ def run(self):
         node['group'] = self.arguments[0]
         return [node]
 
+# NOTE: This extension now *assumes* both Bootstrap and JQuery are present
+# (which is now the case for the Bokeh docs theme).
 def html_visit_bokeh_palette_group(self, node):
-    self.body.append(_BOOTSTRAP_CSS)
     self.body.append('<div class="container-fluid"><div class="row">"')
     group = getattr(bp, node['group'], None)
     if not isinstance(group, dict):
@@ -89,7 +95,6 @@ def html_visit_bokeh_palette_group(self, node):
         html = PALETTE_GROUP_DETAIL.render(name=name, numbers=numbers, palettes=palettes)
         self.body.append(html)
     self.body.append('</div></div>')
-    self.body.append(_BOOTSTRAP_JS)
     raise nodes.SkipNode
 
 def setup(app):
@@ -101,15 +106,6 @@ def setup(app):
 # Private API
 #-----------------------------------------------------------------------------
 
-_BOOTSTRAP_CSS = """
-<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
-"""
-
-_BOOTSTRAP_JS = """
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
-"""
-
 #-----------------------------------------------------------------------------
 # Code
 #-----------------------------------------------------------------------------


Test patch:
Repository: bokeh/bokeh

Issue:
[Fix] Hover Icon - Documentation
Just a small fix to display the correct hover icon in the HoverTool class instead of crosshair in the documentation https://docs.bokeh.org/en/latest/docs/reference/models/tools.html

In `bokeh/bokeh/models/tools.py` line 934 instead of
`    ''' *toolbar icon*: |crosshair_icon|`
we need
`    ''' *toolbar icon*: |hover_icon|`

I wanted to create a small PR but it seems I'm lacking permission ❌ 
Edit: I'm just stupid and forgot about forks 🙄 


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
@@ -931,7 +931,7 @@ class CustomJSHover(Model):
     """)
 
 class HoverTool(Inspection):
-    ''' *toolbar icon*: |crosshair_icon|
+    ''' *toolbar icon*: |hover_icon|
 
     The hover tool is a passive inspector tool. It is generally on at all
     times, but can be configured in the inspector's menu associated with the


Test patch:
Repository: bokeh/bokeh

Issue:
[FEATURE] BokehJS embed_item should return a reference to the plot. 
Bokeh.embed.embed_item currently returns nothing. I propose it should return a reference to the plot object so I don't have to go fishing (Bokeh.index[plotData.root_id]) in Bokeh.index to do things like call resize_layout() manually.

Honestly any sort of 'official' method for doing this would be super useful.



Discussion:
This seems reasonable to me, as well as simple to implement. 
In fact I did this in PR #9499, by turning `embed_item()` and `embed_items()` in to async functions, but had to backtrack. Using async functions alone was insufficient to keep the semantics intact. Those functions were designed to create a pause between loading bokehjs and initializing an object graph, specifically to allow a full GC. There are two options. Either move the logic elsewhere or make `defer()` function return a `Promise`. I put defer logic in those two functions on purpose, so that we don't have to remember about this on each use site, complicating already complex templates, so the former isn't a good option. I will see if the later maintains the required semantics.

Resolving patch:
diff --git a/examples/embed/json_item.py b/examples/embed/json_item.py
--- a/examples/embed/json_item.py
+++ b/examples/embed/json_item.py
@@ -23,12 +23,12 @@
   <script>
   fetch('/plot')
     .then(function(response) { return response.json(); })
-    .then(function(item) { Bokeh.embed.embed_item(item); })
+    .then(function(item) { return Bokeh.embed.embed_item(item); })
   </script>
   <script>
   fetch('/plot2')
     .then(function(response) { return response.json(); })
-    .then(function(item) { Bokeh.embed.embed_item(item, "myplot2"); })
+    .then(function(item) { return Bokeh.embed.embed_item(item, "myplot2"); })
   </script>
 </body>
 """)


Test patch:
Repository: bokeh/bokeh

Issue:
[BUG] a typo in bokeh/server/tornado.py
A ValueError description for 'unused_session_lifetime_milliseconds' check in bokeh/server/tornado.py mentions a wrong variable name.


Discussion:

Resolving patch:
diff --git a/bokeh/server/tornado.py b/bokeh/server/tornado.py
--- a/bokeh/server/tornado.py
+++ b/bokeh/server/tornado.py
@@ -226,7 +226,7 @@ def __init__(self,
         self._check_unused_sessions_milliseconds = check_unused_sessions_milliseconds
 
         if unused_session_lifetime_milliseconds <= 0:
-            raise ValueError("check_unused_sessions_milliseconds must be > 0")
+            raise ValueError("unused_session_lifetime_milliseconds must be > 0")
         elif unused_session_lifetime_milliseconds != DEFAULT_UNUSED_LIFETIME_MS:
             log.info("Unused sessions last for %d milliseconds", unused_session_lifetime_milliseconds)
         self._unused_session_lifetime_milliseconds = unused_session_lifetime_milliseconds


Test patch:
Repository: bokeh/bokeh

Issue:
[DOCUMENTATION] typo in texas.py
Superfluous parenthesis on [line 34 of texas.py](https://github.com/bokeh/bokeh/blob/aa60b9c9d554fbd349a21da37d616c5b8eda8c09/examples/plotting/file/texas.py#L34). Shows up in the hover tool tip.

Not sure whether you want a PR for something so small? So far I haven't found any other corrections that could be added in.


Discussion:

Resolving patch:
diff --git a/examples/plotting/file/texas.py b/examples/plotting/file/texas.py
--- a/examples/plotting/file/texas.py
+++ b/examples/plotting/file/texas.py
@@ -31,7 +31,7 @@
     title="Texas Unemployment, 2009", tools=TOOLS,
     x_axis_location=None, y_axis_location=None,
     tooltips=[
-        ("Name", "@name"), ("Unemployment rate)", "@rate%"), ("(Long, Lat)", "($x, $y)")
+        ("Name", "@name"), ("Unemployment rate", "@rate%"), ("(Long, Lat)", "($x, $y)")
     ])
 p.grid.grid_line_color = None
 p.hover.point_policy = "follow_mouse"


Test patch: