Skip to content

Commit

Permalink
deploy: eb5d75a
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 24, 2024
0 parents commit 7750c6e
Show file tree
Hide file tree
Showing 26 changed files with 8,112 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
641 changes: 641 additions & 0 deletions comm.html

Large diffs are not rendered by default.

588 changes: 588 additions & 0 deletions index.html

Large diffs are not rendered by default.

647 changes: 647 additions & 0 deletions ipywatch.html

Large diffs are not rendered by default.

635 changes: 635 additions & 0 deletions reacton.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sitemap: https://itepifanio.github.io/ipywatch/sitemap.xml
92 changes: 92 additions & 0 deletions search.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[
{
"objectID": "ipywatch.html",
"href": "ipywatch.html",
"title": "Ipywatch",
"section": "",
"text": "Widget to watch comm events\nimport solara\nsource",
"crumbs": [
"Ipywatch"
]
},
{
"objectID": "ipywatch.html#ipywidgets-usage",
"href": "ipywatch.html#ipywidgets-usage",
"title": "Ipywatch",
"section": "Ipywidgets usage",
"text": "Ipywidgets usage\n\nipywatch = Ipywatch(width='100%', height='200px')\nslider = ipywidgets.IntSlider(value=7, min=0, max=10, step=1, description='Test Slider:')\nHBox([slider, ipywatch])",
"crumbs": [
"Ipywatch"
]
},
{
"objectID": "comm.html",
"href": "comm.html",
"title": "Comm",
"section": "",
"text": "Ipykernel employs the Comm class for facilitating communication between the front-end and back-end. It builds on a base Comm implementation, which includes a send function for messaging the front-end. Monkey-patching this send function presents a direct approach to intercept Comm communications.\n_original_send = BaseComm.send\n\ndef _patched_send(self, data=None, metadata=None, buffers=None):\n widget = widget_module._instances.get(self.comm_id)\n widget_type = type(widget).__name__ if widget else \"Unknown\"\n print(f\"Comm message sent by {widget_type} ({self.comm_id}): {data}\")\n\n _original_send(self, data, metadata, buffers)\n\nBaseComm.send = _patched_send",
"crumbs": [
"Comm"
]
},
{
"objectID": "comm.html#testing",
"href": "comm.html#testing",
"title": "Comm",
"section": "Testing",
"text": "Testing\nThe following cells displays ipywidgets and solara example of monitoring state changes. Interact with the following widgets to intercept its state changes.\n\nslider = widgets.IntSlider(value=7, min=0, max=10, step=1, description='Test Slider:')\ndisplay(slider)\n\n\nint_value = solara.reactive(42)\nsolara.SliderInt(\"Another Test Slider:\", value=int_value, min=-10, max=120)",
"crumbs": [
"Comm"
]
},
{
"objectID": "widget_history.html",
"href": "widget_history.html",
"title": "Widget history",
"section": "",
"text": "Store a fixed number of stored states in-memory\n\nsource\n\nWidgetStateHistory\n\n WidgetStateHistory (history_size:int=5)\n\nInitialize self. See help(type(self)) for accurate signature.\n\nwidget_states = WidgetStateHistory(history_size=5)\n\nwidget_states[\"widget_1\"] = {\"value\": 10}\nwidget_states[\"widget_1\"] = {\"value\": 20}\nassert len(widget_states) == 1\nassert widget_states['widget_1'] == {\"value\": 20}\n\ndel widget_states[\"widget_1\"] \nassert len(widget_states) == 0",
"crumbs": [
"Widget history"
]
},
{
"objectID": "index.html",
"href": "index.html",
"title": "Ipywatch",
"section": "",
"text": "Welcome to the Ipywatch project a debugging solution for developers working with IPyWidgets, Reacton, and Solara.\nThe lib monitors state changes at ipywidgets level by listening to the Comm API",
"crumbs": [
"Ipywatch"
]
},
{
"objectID": "index.html#installing",
"href": "index.html#installing",
"title": "Ipywatch",
"section": "Installing",
"text": "Installing\npip install ipywatch",
"crumbs": [
"Ipywatch"
]
},
{
"objectID": "reacton.html",
"href": "reacton.html",
"title": "Reacton",
"section": "",
"text": "Adding a pre_render hook to reacton codebase we’re able to track each state change at component level.\n_original_render = _RenderContext.render\n\ndef pre_render(self, element: Element, container: widgets.Widget = None):\n print(f'state::{self.state_get()}\\n')\n print(f'element: {element.component} --- {element.component.name}, {element.component.value_name}, {element.component.widget}\\n')\n if container is not None:\n print(f'model_id::{container.model_id}')\n\ndef _patched_render(self, element: Element, container: widgets.Widget = None):\n pre_render(self, element, container)\n \n _original_render(self, element, container)\n\n_RenderContext.render = _patched_render",
"crumbs": [
"Reacton"
]
},
{
"objectID": "reacton.html#testing",
"href": "reacton.html#testing",
"title": "Reacton",
"section": "Testing",
"text": "Testing\nThe following cells displays ipywidgets an solara example of monitoring state changes. Interact with the following widgets to intercept its state changes.\n\nint_value = solara.reactive(0)\nslider = solara.SliderInt(\"Another Test Slider:\", value=int_value, min=0, max=10)",
"crumbs": [
"Reacton"
]
}
]
Loading

0 comments on commit 7750c6e

Please sign in to comment.