Skip to content

Bump ipytree from 0.2.1 to 0.2.2 #1112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 12, 2022
3 changes: 2 additions & 1 deletion requirements_dev_optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# bsddb3==6.2.6; sys_platform != 'win32'
lmdb==1.3.0; sys_platform != 'win32'
# optional library requirements for Jupyter
ipytree==0.2.1
ipytree==0.2.2
ipywidgets==8.0.2
# optional library requirements for services
# don't let pyup change pinning for azure-storage-blob, need to pin to older
# version to get compatibility with azure storage emulator on appveyor (FIXME)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
extras_require={
'jupyter': [
'notebook',
'ipytree',
'ipytree>=0.2.2',
'ipywidgets>=8.0.0',
],
},
python_requires='>=3.8, <4',
Expand Down
2 changes: 1 addition & 1 deletion zarr/tests/test_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ def _check_tree(g, expect_bytes, expect_text):
assert expect_repr == repr(g.tree())
if ipytree:
# noinspection PyProtectedMember
widget = g.tree()._ipython_display_()
widget = g.tree()._repr_mimebundle_()
isinstance(widget, ipytree.Tree)


Expand Down
5 changes: 2 additions & 3 deletions zarr/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,9 @@ def __unicode__(self):
def __repr__(self):
return self.__unicode__()

def _ipython_display_(self):
def _repr_mimebundle_(self, **kwargs):
tree = tree_widget(self.group, expand=self.expand, level=self.level)
tree._ipython_display_()
return tree
return tree._repr_mimebundle_(**kwargs)


def check_array_shape(param, array, shape):
Expand Down