Skip to content

Commit

Permalink
Port changes in 1.10.8 hotfix back to master (#3113)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored and jlstevens committed Oct 29, 2018
1 parent 98b5e96 commit 87ce8da
Show file tree
Hide file tree
Showing 11 changed files with 213 additions and 14 deletions.
92 changes: 89 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,95 @@
Version 1.11.0
Version 1.10.8
==============

Backward incompatible changes:
This a likely the last hotfix release in the 1.10.x series containing
fixes for compatibility with bokeh 1.0 and matplotlib 3.0. It also
contains a wide array of fixes contributed and reported by users:

Special thanks for the contributions by Andrew Huang (@ahuang11),
Julia Signell (@jsignell), and Zachary Barry (@zbarry).

Enhancements:

- Add support for labels, choord, hextiles and area in `.to` interface
([#2924](https://github.com/ioam/holoviews/pull/2923))
- Allow defining default bokeh themes as strings on Renderer
([#2972](https://github.com/ioam/holoviews/pull/2972))
- Allow specifying fontsize for categorical axis ticks in bokeh
([#3047](https://github.com/ioam/holoviews/pull/3047))
- Allow hiding toolbar without disabling tools
([#3074](https://github.com/ioam/holoviews/pull/3074))
- Allow specifying explicit colormapping on non-categorical data
([#3071](https://github.com/ioam/holoviews/pull/3071))
- Support for displaying xarray without explicit coordinates
([#2968](https://github.com/ioam/holoviews/pull/2968))

Fixes:

- Ensured that objects are garbage collected when using
linked streams ([#2111](https://github.com/ioam/holoviews/issues/2111))
- Allow dictionary data to reference values which are not dimensions
([#2855](https://github.com/ioam/holoviews/pull/2855),
[#2859](https://github.com/ioam/holoviews/pull/2859))
- Fixes for zero and non-finite ranges in datashader operation
([#2860](https://github.com/ioam/holoviews/pull/2860),
[#2863](https://github.com/ioam/holoviews/pull/2863),
[#2869](https://github.com/ioam/holoviews/pull/2869))
- Fixes for CDSStream and drawing tools on bokeh server
([#2915](https://github.com/ioam/holoviews/pull/2915))
- Fixed issues with nans, datetimes and streaming on Area and Spread
elements ([#2951](https://github.com/ioam/holoviews/pull/2951),
[c55b044](https://github.com/ioam/holoviews/commit/c55b044))
- General fixes for datetime handling
([#3005](https://github.com/ioam/holoviews/pull/3005),
[#3045](https://github.com/ioam/holoviews/pull/3045),
[#3075](https://github.com/ioam/holoviews/pull/3074))
- Fixed handling of curvilinear and datetime coordinates on QuadMesh
([#3017](https://github.com/ioam/holoviews/pull/3017),
[#3081](https://github.com/ioam/holoviews/pull/3081))
- Fixed issue when inverting a shared axis in bokeh
([#3083](https://github.com/ioam/holoviews/pull/3083))
- Fixed formatting of values in HoloMap widgets
([#2954](https://github.com/ioam/holoviews/pull/2954))
- Fixed setting fontsize for z-axis label
([#2967](https://github.com/ioam/holoviews/pull/2967))

Compatibility:

- Suppress warnings about rcParams in matplotlib 3.0
([#3013](https://github.com/ioam/holoviews/pull/3013),
[#3058](https://github.com/ioam/holoviews/pull/3058),
[#3104](https://github.com/ioam/holoviews/pull/3104))
- Fixed incompatibility with Python <=3.5
([#3073](https://github.com/ioam/holoviews/pull/3073))
- Fixed incompatibility with bokeh >=1.0
([#3051](https://github.com/ioam/holoviews/pull/3051))

Documentation:

- Completely overhauled the FAQ
([#2928](https://github.com/ioam/holoviews/pull/2928),
[#2941](https://github.com/ioam/holoviews/pull/2941),
[#2959](https://github.com/ioam/holoviews/pull/2959),
[#3025](https://github.com/ioam/holoviews/pull/3025))

Version 1.10.7
==============

This a very minor hotfix release mostly containing fixes for datashader
aggregation of empty datasets:

Fixes:

- Fix datashader aggregation of empty and zero-range data
([#2860](https://github.com/ioam/holoviews/pull/2860),
[#2863](https://github.com/ioam/holoviews/pull/2863))
- Disable validation for additional, non-referenced keys in the
DictInterface ([#2860](https://github.com/ioam/holoviews/pull/2860))
- Fixed frame lookup for non-overlapping dimensions
([#2861](https://github.com/ioam/holoviews/pull/2861))
- Fixed ticks on log Colorbar if low value <= 0
([#2865](https://github.com/ioam/holoviews/pull/2865))

- The `.to` interface no longer sorts `Curve` data by default ([#3001](https://github.com/ioam/holoviews/pull/3001))

Version 1.10.6
==============
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The `User Guide <user_guide>`_ goes more deeply into key concepts from HoloViews

The `API <Reference_Manual>`_ is the definitive guide to each HoloViews object, but the same information is available more conveniently via the `hv.help()` command and tab completion in the Jupyter notebook.

If you have any `issues <https://github.com/ioam/holoviews/issues>`_ or wish to `contribute code <https://help.github.com/articles/about-pull-requests>`_, you can visit our `GitHub site <https://github.com/ioam/holoviews>`_ or chat with the developers on `gitter <https://gitter.im/ioam/holoviews>`_.
If you have any `issues <https://github.com/ioam/holoviews/issues>`_ or wish to `contribute code <https://help.github.com/articles/about-pull-requests>`_, you can visit our `GitHub site <https://github.com/ioam/holoviews>`_ or chat with the developers on `gitter <https://gitter.im/pyviz/pyviz>`_.

.. raw:: html
:file: latest_news.html
Expand Down
92 changes: 92 additions & 0 deletions doc/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,98 @@ Release notes
*************


Version 1.10.8
==============

This a likely the last hotfix release in the 1.10.x series containing
fixes for compatibility with bokeh 1.0 and matplotlib 3.0. It also
contains a wide array of fixes contributed and reported by users:

Special thanks for the contributions by Andrew Huang (@ahuang11),
Julia Signell (@jsignell), and Zachary Barry (@zbarry).

Enhancements:

- Add support for labels, choord, hextiles and area in `.to` interface
(`#2924 <https://github.com/ioam/holoviews/pull/2923`_)
- Allow defining default bokeh themes as strings on Renderer
(`#2972 <https://github.com/ioam/holoviews/pull/2972`_)
- Allow specifying fontsize for categorical axis ticks in bokeh
(`#3047 <https://github.com/ioam/holoviews/pull/3047`_)
- Allow hiding toolbar without disabling tools
(`#3074 <https://github.com/ioam/holoviews/pull/3074`_)
- Allow specifying explicit colormapping on non-categorical data
(`#3071 <https://github.com/ioam/holoviews/pull/3071`_)
- Support for displaying xarray without explicit coordinates
(`#2968 <https://github.com/ioam/holoviews/pull/2968`_)

Fixes:

- Allow dictionary data to reference values which are not dimensions
(`#2855 <https://github.com/ioam/holoviews/pull/2855`_,
`#2859 <https://github.com/ioam/holoviews/pull/2859`_)
- Fixes for zero and non-finite ranges in datashader operation
(`#2860 <https://github.com/ioam/holoviews/pull/2860`_,
`#2863 <https://github.com/ioam/holoviews/pull/2863`_,
`#2869 <https://github.com/ioam/holoviews/pull/2869`_)
- Fixes for CDSStream and drawing tools on bokeh server
(`#2915 <https://github.com/ioam/holoviews/pull/2915`_)
- Fixed issues with nans, datetimes and streaming on Area and Spread
elements (`#2951 <https://github.com/ioam/holoviews/pull/2951`_,
`c55b044 <https://github.com/ioam/holoviews/commit/c55b044`_)
- General fixes for datetime handling
(`#3005 <https://github.com/ioam/holoviews/pull/3005`_,
`#3045 <https://github.com/ioam/holoviews/pull/3045`_,
`#3075 <https://github.com/ioam/holoviews/pull/3074`_)
- Fixed handling of curvilinear and datetime coordinates on QuadMesh
(`#3017 <https://github.com/ioam/holoviews/pull/3017`_,
`#3081 <https://github.com/ioam/holoviews/pull/3081`_)
- Fixed issue when inverting a shared axis in bokeh
(`#3083 <https://github.com/ioam/holoviews/pull/3083`_)
- Fixed formatting of values in HoloMap widgets
(`#2954 <https://github.com/ioam/holoviews/pull/2954`_)
- Fixed setting fontsize for z-axis label
(`#2967 <https://github.com/ioam/holoviews/pull/2967`_)

Compatibility:

- Suppress warnings about rcParams in matplotlib 3.0
(`#3013 <https://github.com/ioam/holoviews/pull/3013`_,
`#3058 <https://github.com/ioam/holoviews/pull/3058`_,
`#3104 <https://github.com/ioam/holoviews/pull/3104`_)
- Fixed incompatibility with Python <=3.5
(`#3073 <https://github.com/ioam/holoviews/pull/3073`_)
- Fixed incompatibility with bokeh >=1.0
(`#3051 <https://github.com/ioam/holoviews/pull/3051`_)

Documentation:

- Completely overhauled the FAQ
(`#2928 <https://github.com/ioam/holoviews/pull/2928`_,
`#2941 <https://github.com/ioam/holoviews/pull/2941`_,
`#2959 <https://github.com/ioam/holoviews/pull/2959`_,
`#3025 <https://github.com/ioam/holoviews/pull/3025`_)


Version 1.10.7
==============

This a very minor hotfix release mostly containing fixes for datashader
aggregation of empty datasets:

Fixes:

- Fix datashader aggregation of empty and zero-range data
(`#2860 <https://github.com/ioam/holoviews/pull/2860>`_,
`#2863 <https://github.com/ioam/holoviews/pull/2863>`_)
- Disable validation for additional, non-referenced keys in the
DictInterface (`#2860 <https://github.com/ioam/holoviews/pull/2860>`_)
- Fixed frame lookup for non-overlapping dimensions
(`#2861 <https://github.com/ioam/holoviews/pull/2861>`_)
- Fixed ticks on log Colorbar if low value <= 0
(`#2865 <https://github.com/ioam/holoviews/pull/2865>`_)


Version 1.10.6
==============

Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/demos/bokeh/boxplot_chart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"from bokeh.sampledata.autompg import autompg as df\n",
"\n",
"title = \"MPG by Cylinders and Data Source, Colored by Cylinders\"\n",
"boxwhisker = hv.BoxWhisker(df, ['cyl', 'origin'], 'mpg', label=title).options(color_index=0)"
"boxwhisker = hv.BoxWhisker(df, ['cyl', 'origin'], 'mpg', label=title)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/demos/matplotlib/boxplot_chart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"from bokeh.sampledata.autompg import autompg as df\n",
"\n",
"title = \"MPG by Cylinders and Data Source, Colored by Cylinders\"\n",
"boxwhisker = hv.BoxWhisker(df, ['cyl', 'origin'], 'mpg', label=title).options(color_index=0)"
"boxwhisker = hv.BoxWhisker(df, ['cyl', 'origin'], 'mpg', label=title)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def model_changed(self, model):
update on the backend.
"""
callbacks = [cb for cbs in self.traverse(lambda x: x.callbacks)
for cb in cbs]
for cb in cbs]
stream_metadata = [stream._metadata for cb in callbacks
for stream in cb.streams if stream._metadata]
return any(md['id'] == model.ref['id'] for models in stream_metadata
Expand Down
8 changes: 6 additions & 2 deletions holoviews/plotting/bokeh/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def document(self, doc):
self.root is self.handles.get('plot') and not isinstance(self, AdjointLayoutPlot)):
doc.on_session_destroyed(self._session_destroy)
if self._document:
self._document._session_destroyed_callbacks.pop(self._session_destroy, None)
if isinstance(self._document._session_destroyed_callbacks, set):
self._document._session_destroyed_callbacks.discard(self._session_destroy)
else:
self._document._session_destroyed_callbacks.pop(self._session_destroy, None)

self._document = doc
if self.subplots:
Expand Down Expand Up @@ -160,7 +163,8 @@ def _construct_callbacks(self):
streams = Stream.registry.get(source, [])
registry = Stream._callbacks['bokeh']
cb_classes |= {(registry[type(stream)], stream) for stream in streams
if type(stream) in registry and stream.linked}
if type(stream) in registry and stream.linked
and stream.source is not None}
cbs = []
sorted_cbs = sorted(cb_classes, key=lambda x: id(x[0]))
for cb, group in groupby(sorted_cbs, lambda x: x[0]):
Expand Down
1 change: 1 addition & 0 deletions holoviews/plotting/bokeh/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# Conversion between matplotlib and bokeh markers
markers = {'s': {'marker': 'square'},
'd': {'marker': 'diamond'},
'+': {'marker': 'cross'},
'^': {'marker': 'triangle', 'angle': 0},
'>': {'marker': 'triangle', 'angle': -np.pi/2},
'v': {'marker': 'triangle', 'angle': np.pi},
Expand Down
12 changes: 8 additions & 4 deletions holoviews/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __init__(self, rename={}, source=None, subscribers=[], linked=False,
"""

# Source is stored as a weakref to allow it to be garbage collected
self._source = weakref.ref(source) if source else None
self._source = None if source is None else weakref.ref(source)

self._subscribers = []
for subscriber in subscribers:
Expand Down Expand Up @@ -315,11 +315,15 @@ def source(self):

@source.setter
def source(self, source):
old_source = self._source() if self._source else None
if old_source:
source_list = self.registry[old_source]
if self.source:
source_list = self.registry[self.source]
if self in source_list:
source_list.remove(self)

if source is None:
self._source = None
return

self._source = weakref.ref(source)
if source in self.registry:
self.registry[source].append(self)
Expand Down
4 changes: 3 additions & 1 deletion holoviews/tests/plotting/bokeh/testcallbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ def test_reset_callback(self):
def record(resetting):
resets.append(resetting)
curve = Curve([])
PlotReset(source=curve).add_subscriber(record)
stream = PlotReset(source=curve)
stream.add_subscriber(record)
plot = bokeh_server_renderer.get_plot(curve)
plot.callbacks[0].on_msg({'reset': True})
self.assertEqual(resets, [True])
self.assertIs(stream.source, curve)


class TestEditToolCallbacks(CallbackTestCase):
Expand Down
10 changes: 10 additions & 0 deletions holoviews/tests/teststreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,16 @@ class TestStreamSource(ComparisonTestCase):
def tearDown(self):
Stream.registry = defaultdict(list)

def test_source_empty_element(self):
points = Points([])
stream = PointerX(source=points)
self.assertIs(stream.source, points)

def test_source_empty_dmap(self):
points_dmap = DynamicMap(lambda x: Points([]), kdims=['X'])
stream = PointerX(source=points_dmap)
self.assertIs(stream.source, points_dmap)

def test_source_registry(self):
points = Points([(0, 0)])
PointerX(source=points)
Expand Down

0 comments on commit 87ce8da

Please sign in to comment.