dara-core 1.16.17__py3-none-any.whl → 1.16.18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dara/core/interactivity/derived_variable.py +8 -2
- dara/core/interactivity/plain_variable.py +4 -3
- {dara_core-1.16.17.dist-info → dara_core-1.16.18.dist-info}/METADATA +10 -10
- {dara_core-1.16.17.dist-info → dara_core-1.16.18.dist-info}/RECORD +7 -7
- {dara_core-1.16.17.dist-info → dara_core-1.16.18.dist-info}/LICENSE +0 -0
- {dara_core-1.16.17.dist-info → dara_core-1.16.18.dist-info}/WHEEL +0 -0
- {dara_core-1.16.17.dist-info → dara_core-1.16.18.dist-info}/entry_points.txt +0 -0
|
@@ -84,7 +84,7 @@ class DerivedVariable(NonDataVariable, Generic[VariableType]):
|
|
|
84
84
|
variables: List[AnyVariable]
|
|
85
85
|
polling_interval: Optional[int]
|
|
86
86
|
deps: Optional[List[AnyVariable]] = Field(validate_default=True)
|
|
87
|
-
nested: List[str] =
|
|
87
|
+
nested: List[str] = Field(default_factory=list)
|
|
88
88
|
uid: str
|
|
89
89
|
model_config = ConfigDict(extra='forbid', use_enum_values=True)
|
|
90
90
|
|
|
@@ -97,6 +97,7 @@ class DerivedVariable(NonDataVariable, Generic[VariableType]):
|
|
|
97
97
|
polling_interval: Optional[int] = None,
|
|
98
98
|
deps: Optional[List[AnyVariable]] = None,
|
|
99
99
|
uid: Optional[str] = None,
|
|
100
|
+
nested: Optional[List[str]] = None,
|
|
100
101
|
_get_value: Optional[Callable[..., Awaitable[Any]]] = None,
|
|
101
102
|
):
|
|
102
103
|
"""
|
|
@@ -124,6 +125,9 @@ class DerivedVariable(NonDataVariable, Generic[VariableType]):
|
|
|
124
125
|
- `deps = [var1.get('nested_property')]` - `func` is ran only when the nested property changes, other changes to the variable are ignored
|
|
125
126
|
:param uid: the unique identifier for this variable; if not provided a random one is generated
|
|
126
127
|
"""
|
|
128
|
+
if nested is None:
|
|
129
|
+
nested = []
|
|
130
|
+
|
|
127
131
|
if cache is not None:
|
|
128
132
|
cache = Cache.Policy.from_arg(cache)
|
|
129
133
|
|
|
@@ -141,7 +145,9 @@ class DerivedVariable(NonDataVariable, Generic[VariableType]):
|
|
|
141
145
|
if get_ipython() is not None:
|
|
142
146
|
raise RuntimeError('run_as_task is not supported within a Jupyter environment')
|
|
143
147
|
|
|
144
|
-
super().__init__(
|
|
148
|
+
super().__init__(
|
|
149
|
+
cache=cache, uid=uid, variables=variables, polling_interval=polling_interval, deps=deps, nested=nested
|
|
150
|
+
)
|
|
145
151
|
|
|
146
152
|
# Import the registry of variables and register the function at import
|
|
147
153
|
from dara.core.internal.registries import derived_variable_registry
|
|
@@ -24,6 +24,7 @@ from typing import Any, Callable, Generic, List, Optional, TypeVar
|
|
|
24
24
|
from fastapi.encoders import jsonable_encoder
|
|
25
25
|
from pydantic import (
|
|
26
26
|
ConfigDict,
|
|
27
|
+
Field,
|
|
27
28
|
SerializerFunctionWrapHandler,
|
|
28
29
|
field_serializer,
|
|
29
30
|
model_serializer,
|
|
@@ -65,7 +66,7 @@ class Variable(NonDataVariable, Generic[VariableType]):
|
|
|
65
66
|
persist_value: bool = False
|
|
66
67
|
store: Optional[PersistenceStore] = None
|
|
67
68
|
uid: str
|
|
68
|
-
nested: List[str] =
|
|
69
|
+
nested: List[str] = Field(default_factory=list)
|
|
69
70
|
model_config = ConfigDict(extra='forbid')
|
|
70
71
|
|
|
71
72
|
def __init__(
|
|
@@ -86,7 +87,7 @@ class Variable(NonDataVariable, Generic[VariableType]):
|
|
|
86
87
|
"""
|
|
87
88
|
if nested is None:
|
|
88
89
|
nested = []
|
|
89
|
-
kwargs = {'default': default, 'persist_value': persist_value, 'uid': uid, 'store': store}
|
|
90
|
+
kwargs = {'default': default, 'persist_value': persist_value, 'uid': uid, 'store': store, 'nested': nested}
|
|
90
91
|
|
|
91
92
|
# If an override is active, run the kwargs through it
|
|
92
93
|
override = VARIABLE_INIT_OVERRIDE.get()
|
|
@@ -174,7 +175,7 @@ class Variable(NonDataVariable, Generic[VariableType]):
|
|
|
174
175
|
:param key: the key to access; must be a string
|
|
175
176
|
```
|
|
176
177
|
"""
|
|
177
|
-
return self.
|
|
178
|
+
return self.model_copy(update={'nested': [*self.nested, key]}, deep=True)
|
|
178
179
|
|
|
179
180
|
def sync(self):
|
|
180
181
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dara-core
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.18
|
|
4
4
|
Summary: Dara Framework Core
|
|
5
5
|
Home-page: https://dara.causalens.com/
|
|
6
6
|
License: Apache-2.0
|
|
@@ -20,10 +20,10 @@ Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
|
|
|
20
20
|
Requires-Dist: certifi (>=2024.7.4)
|
|
21
21
|
Requires-Dist: click (==8.1.3)
|
|
22
22
|
Requires-Dist: colorama (>=0.4.6,<0.5.0)
|
|
23
|
-
Requires-Dist: create-dara-app (==1.16.
|
|
23
|
+
Requires-Dist: create-dara-app (==1.16.18)
|
|
24
24
|
Requires-Dist: croniter (>=1.0.15,<3.0.0)
|
|
25
25
|
Requires-Dist: cryptography (>=42.0.4)
|
|
26
|
-
Requires-Dist: dara-components (==1.16.
|
|
26
|
+
Requires-Dist: dara-components (==1.16.18) ; extra == "all"
|
|
27
27
|
Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
|
|
28
28
|
Requires-Dist: fastapi (>=0.115.0,<0.116.0)
|
|
29
29
|
Requires-Dist: fastapi_vite_dara (==0.4.0)
|
|
@@ -53,7 +53,7 @@ Description-Content-Type: text/markdown
|
|
|
53
53
|
|
|
54
54
|
# Dara Application Framework
|
|
55
55
|
|
|
56
|
-
<img src="https://github.com/causalens/dara/blob/v1.16.
|
|
56
|
+
<img src="https://github.com/causalens/dara/blob/v1.16.18/img/dara_light.svg?raw=true">
|
|
57
57
|
|
|
58
58
|

|
|
59
59
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
@@ -98,7 +98,7 @@ source .venv/bin/activate
|
|
|
98
98
|
dara start
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-

|
|
102
102
|
|
|
103
103
|
Note: `pip` installation uses [PEP 660](https://peps.python.org/pep-0660/) `pyproject.toml`-based editable installs which require `pip >= 21.3` and `setuptools >= 64.0.0`. You can upgrade both with:
|
|
104
104
|
|
|
@@ -115,9 +115,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
|
|
|
115
115
|
|
|
116
116
|
| Dara App | Description |
|
|
117
117
|
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
118
|
-
|  | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
|
|
119
|
+
|  | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
|
|
120
|
+
|  | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
|
|
121
121
|
|
|
122
122
|
Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
|
|
123
123
|
|
|
@@ -144,9 +144,9 @@ And the supporting UI packages and tools.
|
|
|
144
144
|
- `ui-utils` - miscellaneous utility functions
|
|
145
145
|
- `ui-widgets` - widget components
|
|
146
146
|
|
|
147
|
-
More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.16.
|
|
147
|
+
More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.16.18/CONTRIBUTING.md) file.
|
|
148
148
|
|
|
149
149
|
## License
|
|
150
150
|
|
|
151
|
-
Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.
|
|
151
|
+
Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.18/LICENSE).
|
|
152
152
|
|
|
@@ -21,10 +21,10 @@ dara/core/interactivity/any_variable.py,sha256=LOGhbDdYffujlRxF4LR9ZuWdai03R-EXu
|
|
|
21
21
|
dara/core/interactivity/condition.py,sha256=q_RDDt-DtZEUQL054Mc7zHyJIJIGACljJ2gOFygCHQc,1309
|
|
22
22
|
dara/core/interactivity/data_variable.py,sha256=pvPOx6SMxHWDxoo5Ea5xqLwrBTrWN68x8lnBiblYSGg,11760
|
|
23
23
|
dara/core/interactivity/derived_data_variable.py,sha256=u2HOts5rtmzK3D1K383YfYYQnb4pHZF3rTu1lfwMpPA,15323
|
|
24
|
-
dara/core/interactivity/derived_variable.py,sha256=
|
|
24
|
+
dara/core/interactivity/derived_variable.py,sha256=7ActxJISTI-EdYUaoqioi8SPznpfCPlqDYlFJO43a38,21886
|
|
25
25
|
dara/core/interactivity/filtering.py,sha256=BZsWsQvXPhn6WUoAFpAtgN6hXlGDudPbi4h97Qao2ic,9197
|
|
26
26
|
dara/core/interactivity/non_data_variable.py,sha256=ewPaNaTpMixR5YCVY1pjmyHgeC53K0CsjQxMusbJsiw,1147
|
|
27
|
-
dara/core/interactivity/plain_variable.py,sha256=
|
|
27
|
+
dara/core/interactivity/plain_variable.py,sha256=yCm-gBoxNiWsJ43KS4Fr7WCPXIOaChn8FCjXh8IWMUA,9592
|
|
28
28
|
dara/core/interactivity/url_variable.py,sha256=1ZPFHO3gq7ZuATHt4S9x5ijmk4GBVlUv5KJN6DkM49w,4357
|
|
29
29
|
dara/core/internal/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
|
|
30
30
|
dara/core/internal/cache_store/__init__.py,sha256=7JCmQwNIMzfyLZGnsk0BbT1EdDFO_PRZz86E9ATcC6c,139
|
|
@@ -104,8 +104,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
|
|
|
104
104
|
dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
|
|
105
105
|
dara/core/visual/themes/definitions.py,sha256=nS_gQvOzCt5hTmj74d0_siq_9QWuj6wNuir4VCHy0Dk,2779
|
|
106
106
|
dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
|
|
107
|
-
dara_core-1.16.
|
|
108
|
-
dara_core-1.16.
|
|
109
|
-
dara_core-1.16.
|
|
110
|
-
dara_core-1.16.
|
|
111
|
-
dara_core-1.16.
|
|
107
|
+
dara_core-1.16.18.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
|
|
108
|
+
dara_core-1.16.18.dist-info/METADATA,sha256=WVQoBM6q1efUGCVit3Cn4z_-eoyGyQh9vV_Raq9bWE4,7473
|
|
109
|
+
dara_core-1.16.18.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
110
|
+
dara_core-1.16.18.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
|
|
111
|
+
dara_core-1.16.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|