Skip to content

Commit 402bd45

Browse files
committed
releasing 0.0.11
1 parent 2313e22 commit 402bd45

File tree

5 files changed

+23
-8
lines changed

5 files changed

+23
-8
lines changed

dashi/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dashipopashi",
3-
"version": "0.0.9",
3+
"version": "0.0.11",
44
"description": "An experimental library for integrating interactive charts into existing JavaScript applications.",
55
"type": "module",
66
"files": [

dashipy/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@ python -m dashipy.server
1717
Implement the application-specific contributions that users
1818
can add to their extensions.
1919

20-
As an example, see [`panel.py` of the demo](dashipy/demo/contribs/panel.py).
20+
As an example, see [`panel.py` of the demo](dashipy/demo/contribs/panel.py):
21+
22+
```python
23+
from dashipy import Contribution
24+
25+
26+
class Panel(Contribution):
27+
"""Panel contribution"""
28+
29+
def __init__(self, name: str, title: str | None = None):
30+
super().__init__(name, title=title)
31+
```
2132

2233
### 2. Define the contributions points
2334

@@ -51,3 +62,9 @@ the controller implementations in `dashipy.controllers`.
5162

5263
As an example, see [`server.py` of the demo](dashipy/demo/server.py).
5364

65+
### 5. Consume the extensions
66+
67+
Use JavaScript package `dashi` in your frontend to implement the
68+
contribution lifecycle in your React application.
69+
70+
As an example, see [the demo application](../dashi/src/demo).

dashipy/dashipy/controllers/callback.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def get_callback_results(ext_ctx: ExtensionContext, data: dict[str, Any]):
1818
# TODO: validate data
1919
callback_requests: list[dict] = data.get("callbackRequests") or []
2020

21-
context = ext_ctx.app_ctx
22-
2321
# TODO: assert correctness, set status code on error
2422
state_change_requests: list[dict] = []
2523
for callback_request in callback_requests:
@@ -31,7 +29,7 @@ def get_callback_results(ext_ctx: ExtensionContext, data: dict[str, Any]):
3129
contributions = ext_ctx.contributions[contrib_point_name]
3230
contribution = contributions[contrib_index]
3331
callback = contribution.callbacks[callback_index]
34-
output_values = callback.invoke(context, input_values)
32+
output_values = callback.invoke(ext_ctx.app_ctx, input_values)
3533

3634
if len(callback.outputs) == 1:
3735
output_values = (output_values,)

dashipy/dashipy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.0.9"
1+
version = "0.0.11"

0 commit comments

Comments
 (0)