Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
itepifanio committed Feb 24, 2024
1 parent e8bdff8 commit 046310c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ipywatch/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "0.0.3"
13 changes: 7 additions & 6 deletions ipywatch/ipywatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
__all__ = ['WidgetStateHistoryListener', 'Ipywatch']

# %% ../nbs/03_ipywatch.ipynb 3
from typing import Any, Callable, List
from typing import Any, Callable

import ipywidgets
from ipykernel.comm import Comm
from ipywidgets import HBox, VBox, Label, Output, Button, Text, Tab, Layout
from comm.base_comm import BaseComm
from ipywidgets.widgets import widget as widget_module
from ipywidgets import HBox, Output, Layout

from ipywatch.history import WidgetStateHistory

Expand All @@ -23,12 +24,12 @@ def __init__(
self.history = WidgetStateHistory(history_size)
self.on_state_change = on_state_change

_original_send = Comm.send
_original_send = BaseComm.send

def _patched_send(comm, data=None, metadata=None, buffers=None):
comm_id = comm.comm_id

widget = ipywidgets.Widget.widgets.get(comm_id)
widget = widget_module._instances.get(comm_id)

self.history.set_state(comm_id, data)

Expand All @@ -37,7 +38,7 @@ def _patched_send(comm, data=None, metadata=None, buffers=None):

_original_send(comm, data, metadata, buffers)

Comm.send = _patched_send
BaseComm.send = _patched_send

# %% ../nbs/03_ipywatch.ipynb 5
class Ipywatch(HBox):
Expand Down
34 changes: 14 additions & 20 deletions settings.ini
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
[DEFAULT]
# All sections below are required unless otherwise specified.
# See https://github.com/fastai/nbdev/blob/master/settings.ini for examples.

### Python library ###
repo = ipywatch
lib_name = %(repo)s
version = 0.0.2
lib_name = ipywatch
version = 0.0.3
min_python = 3.9
license = apache2
black_formatting = False

### nbdev ###
doc_path = _docs
lib_path = ipywatch
nbs_path = nbs
recursive = True
tst_flags = notest
put_version_in_init = True

### Docs ###
branch = main
custom_sidebar = False
doc_host = https://%(user)s.github.io
doc_baseurl = /%(repo)s
git_url = https://github.com/%(user)s/%(repo)s
title = %(lib_name)s

### PyPI ###
doc_host = https://itepifanio.github.io
doc_baseurl = /ipywatch
git_url = https://github.com/itepifanio/ipywatch
title = ipywatch
audience = Developers
author = Ítalo Epifânio
author_email = [email protected]
copyright = 2024 onwards, %(author)s
copyright = 2024 onwards, Ítalo Epifânio
description = A debugbar tool for ipywidgets/reacton/solara
keywords = nbdev jupyter notebook python
language = English
status = 3
user = itepifanio

### Optional ###
requirements = ipykernel>=6.20.1
dev_requirements = solara>=1.26.1
# console_scripts =
readme_nb = index.ipynb
allowed_metadata_keys =
allowed_cell_metadata_keys =
jupyter_hooks = True
clean_ids = True
clear_all = False

0 comments on commit 046310c

Please sign in to comment.