dara-core 1.18.9__py3-none-any.whl → 1.19.1__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.
@@ -44,6 +44,7 @@ from dara.core.interactivity import (
44
44
  UrlVariable,
45
45
  Variable,
46
46
  )
47
+ from dara.core.interactivity.state_variable import StateVariable
47
48
  from dara.core.internal.cache_store import CacheStore
48
49
  from dara.core.internal.dependency_resolution import resolve_dependency
49
50
  from dara.core.internal.encoder_registry import deserialize
@@ -173,6 +174,12 @@ def py_component(
173
174
  dynamic_kwargs: Dict[str, AnyVariable] = {}
174
175
  static_kwargs: Dict[str, Any] = {}
175
176
  for key, kwarg in all_kwargs.items():
177
+ if isinstance(kwarg, StateVariable):
178
+ raise ValueError(
179
+ 'StateVariable cannot be used as input to py_component. '
180
+ 'StateVariables are internal variables for tracking DerivedVariable client state and using them as inputs would create complex dependencies that are '
181
+ 'difficult to debug. Consider using the StateVariable with an If component or SwitchVariable.'
182
+ )
176
183
  if isinstance(kwarg, AnyVariable):
177
184
  dynamic_kwargs[key] = kwarg
178
185
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.18.9
3
+ Version: 1.19.1
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -21,10 +21,10 @@ Requires-Dist: cachetools (>=5.0.0,<6.0.0)
21
21
  Requires-Dist: certifi (>=2024.7.4)
22
22
  Requires-Dist: click (==8.1.3)
23
23
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
24
- Requires-Dist: create-dara-app (==1.18.9)
24
+ Requires-Dist: create-dara-app (==1.19.1)
25
25
  Requires-Dist: croniter (>=1.0.15,<3.0.0)
26
26
  Requires-Dist: cryptography (>=42.0.4)
27
- Requires-Dist: dara-components (==1.18.9) ; extra == "all"
27
+ Requires-Dist: dara-components (==1.19.1) ; extra == "all"
28
28
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
29
29
  Requires-Dist: fastapi (>=0.115.0,<0.116.0)
30
30
  Requires-Dist: fastapi_vite_dara (==0.4.0)
@@ -34,7 +34,7 @@ Requires-Dist: jinja2 (>=2.1.1,<3.2.0)
34
34
  Requires-Dist: jsonpatch (>=1.33)
35
35
  Requires-Dist: odfpy
36
36
  Requires-Dist: openpyxl
37
- Requires-Dist: packaging (>=23.1,<24.0)
37
+ Requires-Dist: packaging (>=23.1)
38
38
  Requires-Dist: pandas (>=1.1.0,<3.0.0)
39
39
  Requires-Dist: prometheus-client (>=0.14.1,<0.15.0)
40
40
  Requires-Dist: pyarrow
@@ -55,7 +55,7 @@ Description-Content-Type: text/markdown
55
55
 
56
56
  # Dara Application Framework
57
57
 
58
- <img src="https://github.com/causalens/dara/blob/v1.18.9/img/dara_light.svg?raw=true">
58
+ <img src="https://github.com/causalens/dara/blob/v1.19.1/img/dara_light.svg?raw=true">
59
59
 
60
60
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
61
61
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -100,7 +100,7 @@ source .venv/bin/activate
100
100
  dara start
101
101
  ```
102
102
 
103
- ![Dara App](https://github.com/causalens/dara/blob/v1.18.9/img/components_gallery.png?raw=true)
103
+ ![Dara App](https://github.com/causalens/dara/blob/v1.19.1/img/components_gallery.png?raw=true)
104
104
 
105
105
  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:
106
106
 
@@ -117,9 +117,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
117
117
 
118
118
  | Dara App | Description |
119
119
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.18.9/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
121
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.18.9/img/plot_interactivity.png?raw=true) | 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 |
122
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.18.9/img/graph_viewer.png?raw=true) | 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. |
120
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.19.1/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
121
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.19.1/img/plot_interactivity.png?raw=true) | 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 |
122
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.19.1/img/graph_viewer.png?raw=true) | 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. |
123
123
 
124
124
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
125
125
 
@@ -146,9 +146,9 @@ And the supporting UI packages and tools.
146
146
  - `ui-utils` - miscellaneous utility functions
147
147
  - `ui-widgets` - widget components
148
148
 
149
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.18.9/CONTRIBUTING.md) file.
149
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.19.1/CONTRIBUTING.md) file.
150
150
 
151
151
  ## License
152
152
 
153
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.18.9/LICENSE).
153
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.19.1/LICENSE).
154
154
 
@@ -14,18 +14,19 @@ dara/core/data_utils.py,sha256=cQpaNoXrvwkhXUozfIMJNdvy1lAayr-zZGH8duNCy5I,12630
14
14
  dara/core/defaults.py,sha256=Sa7ZU4QvPndaJm-oXrVn9gRfkdUgFtsX8RkSRhf16JQ,4306
15
15
  dara/core/definitions.py,sha256=Kq0RaUdc_SLWbqpv0URUbZSHbSFLx0LZ1v5oxGDUep8,18851
16
16
  dara/core/http.py,sha256=-OzbCHlYSnfVnw2492C_UmaWOI5oSONfWk03eEGxSRI,4761
17
- dara/core/interactivity/__init__.py,sha256=4gD69m5nRf6lefKdNx9K_fRJOqmsAwjALZqKiPtvutk,2415
18
- dara/core/interactivity/actions.py,sha256=7CwHN2gmdzffQzggsWqWW7ppNfdJ0MGSChZiVP9-gbc,47973
17
+ dara/core/interactivity/__init__.py,sha256=h6T7cLL2a4BrxO1v1gNuf7dPTWBvsdt4zoMuIGmjOxQ,2501
18
+ dara/core/interactivity/actions.py,sha256=JGZU-32EzX40zz4qOnkbRZnwh5VRnc_PzrNRJe4atUg,48362
19
19
  dara/core/interactivity/any_data_variable.py,sha256=BftnTPSDjOAqxTz_p4L0n5ngk8dvDip8nu9RZeBDI-c,5323
20
20
  dara/core/interactivity/any_variable.py,sha256=8r9AIu6kBBFYsnTlYprEH8pxUM8RYXs0B2Hr09TrAuw,13678
21
21
  dara/core/interactivity/condition.py,sha256=69tdxgLqNbU-AlwHTWFdp-hvxGDugNnb_McDrz0mDtE,1575
22
22
  dara/core/interactivity/data_variable.py,sha256=VM1QSU1LBfzp-kOt80v6c4jKtTRwLko8R3UcoXDOuR0,11833
23
23
  dara/core/interactivity/derived_data_variable.py,sha256=XYAp3o6rAmGzrLBdrxvlgDSjqE7mzLcmxeiq6eQmCMA,15435
24
- dara/core/interactivity/derived_variable.py,sha256=fU0IE6u8mLJyozYl2s0jmxjwPmU0J_Z7vO7KMsYkCTg,24262
24
+ dara/core/interactivity/derived_variable.py,sha256=5Ehbt-RdtAG64Rd0NYBtUoqdkr5FO4vvDIuC2W4LbU0,26184
25
25
  dara/core/interactivity/filtering.py,sha256=Lce3YnBcC8T-DaLimH06zNcLun2iLm6dVTZerTJRrpA,9022
26
26
  dara/core/interactivity/loop_variable.py,sha256=EqZX3bMCwKmI2Yu4pQ7TJG9hf3PY2AlAIBLxEzHFbTw,2998
27
27
  dara/core/interactivity/non_data_variable.py,sha256=IMH5cNce2O6RUbu4HB_VLT-BBnDnGHr3lp09XU_lWa4,2378
28
28
  dara/core/interactivity/plain_variable.py,sha256=vNb8kqHhjy066dqB_kNfqBGq1fJgPhuSLSDl8N3i88Q,9247
29
+ dara/core/interactivity/state_variable.py,sha256=pO6ayc91OfCn05lGaj9zKNNdonEAEKT_OWIfEfWN4Y0,2491
29
30
  dara/core/interactivity/switch_variable.py,sha256=az4Fmksdv50YWW-9t8n8WxBim-2OnwRGFOW2Tz9fEUA,14194
30
31
  dara/core/interactivity/url_variable.py,sha256=1ZPFHO3gq7ZuATHt4S9x5ijmk4GBVlUv5KJN6DkM49w,4357
31
32
  dara/core/internal/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
@@ -67,14 +68,14 @@ dara/core/jinja/index.html,sha256=1gkCFiihXOUH7vp7tT5gH8mKeJB4KqNg394xO3a0usI,12
67
68
  dara/core/jinja/index_autojs.html,sha256=u1diDUnRT4djZqN1T6lIE01GhlfL6SJ_yLYcyapruss,1342
68
69
  dara/core/js_tooling/custom_js_scaffold/index.tsx,sha256=FEzSV5o5Nyzxw6eXvGLi7BkEBkXf3brV34_7ATLnY7o,68
69
70
  dara/core/js_tooling/custom_js_scaffold/local-js-component.tsx,sha256=Ojsyeh9MYJnH_XJXGkSc8PAUZIqJcqcGTu_uRITo_88,709
70
- dara/core/js_tooling/js_utils.py,sha256=sTNfVUoUl_UL5j200FWS6Nz8yJu-GVNTeCywqscUsy0,26781
71
+ dara/core/js_tooling/js_utils.py,sha256=70VqTjAC1PaSW2NYmJyd-raNZlf3dz77SPJdKSDrPlo,26833
71
72
  dara/core/js_tooling/statics/favicon.ico,sha256=CJP26erMMIwQB8FFmyhoUJ-Cx1cXEopiVGxFwyxcpo0,47068
72
73
  dara/core/js_tooling/statics/tsconfig.json,sha256=ubnFjwvPHbx2F7wVWsU2VHLDeEnnOwXkTIk7hLNY8ZM,446
73
74
  dara/core/js_tooling/templates/.npmrc,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
75
  dara/core/js_tooling/templates/_entry.template.tsx,sha256=oTeiSLDmq4J-2pM7qjA2RgUocT6Rla7BNwyEAJGvdCc,161
75
76
  dara/core/js_tooling/templates/_entry_autojs.template.tsx,sha256=c9eNln0iLHUjhxsgXsF67hPcu4coloh0luvrhdM4ETM,202
76
77
  dara/core/js_tooling/templates/dara.config.json,sha256=RZG_R_xJv_5rYIoz2QZulcG49wD0JURTzshtAzG_di4,84
77
- dara/core/js_tooling/templates/vite.config.template.ts,sha256=-_GgbqPAcg_rTL2JsWjqYqZa4w6p2fKa2nyqGnjqj18,888
78
+ dara/core/js_tooling/templates/vite.config.template.ts,sha256=W-R9LtXPMv7vQkqMawMmeFrjaQ22xrGU0iYyS_nHkh4,1199
78
79
  dara/core/log_configs/logging.yaml,sha256=YJyD18psAmSVz6587dcEOyoulLuRFFu1g8yMXl1ylM0,706
79
80
  dara/core/logging.py,sha256=kbq-PjRIWXWZ_x66-ZLrgp6oxvDlKrvkkJFwSRNo-us,12976
80
81
  dara/core/main.py,sha256=uw1BI4dSN-TowmnIUNLMDqL6I5t-3qeQsnVN9J73nGc,18507
@@ -83,7 +84,7 @@ dara/core/metrics/cache.py,sha256=c1PSst_oZZvuVzBXYWdpf8Sbb97u6q0HS2dlsEVLpQU,26
83
84
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
84
85
  dara/core/metrics/utils.py,sha256=inR1Ab5hmWZY2lsgGwLCQOEdyhCD9PumU52X2JbwlKY,2251
85
86
  dara/core/persistence.py,sha256=qINdOxpyvlPGBB9Vy09TPWQnmk0ej4SzUx03AV1YbX0,18561
86
- dara/core/umd/dara.core.umd.js,sha256=FdsaYHATm4kvD8FwBFj-Sx9sMuegFudl8tWhfArJfVo,4735810
87
+ dara/core/umd/dara.core.umd.js,sha256=B11ONbIN4UED_xOogT0dczE5WRnpntQSPnbgL6YqGQs,4777340
87
88
  dara/core/umd/style.css,sha256=YQtQ4veiSktnyONl0CU1iU1kKfcQhreH4iASi1MP7Ak,4095007
88
89
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
89
90
  dara/core/visual/components/__init__.py,sha256=wuGRk8bogiLWPOXAF-Fo4F6_L__0tBrI2p2SqgH2lnE,2385
@@ -100,15 +101,15 @@ dara/core/visual/components/topbar_frame.py,sha256=7L4Bi7Ba_gdfS6yoduXQ3k0-XQaNu
100
101
  dara/core/visual/components/types.py,sha256=uH2IGufr4-I8cNbZgnEd3YbqoPFgyqG91rfNXZVG7a0,686
101
102
  dara/core/visual/css/Property.py,sha256=XJzlMeASyrquhXmaQZvrsgin3xlVfm94dHRY9aJkhXk,43028
102
103
  dara/core/visual/css/__init__.py,sha256=r2W1B5yRQhmxBRoRyldzOopaobb2sgkEh_mUjWUvtko,367328
103
- dara/core/visual/dynamic_component.py,sha256=WzZoVRGaHVPUZ94D1-eihnCK1huEJh3T9eRUXtZ-4gg,13723
104
+ dara/core/visual/dynamic_component.py,sha256=xf9k06O0n0MJovKEO_6D8x4AAtOyOFKw_XkLFV_io3g,14277
104
105
  dara/core/visual/progress_updater.py,sha256=IdtWihnMYk8hqsHqDd0nzuuHeQu8wjnZT42s0oSq9ro,5895
105
106
  dara/core/visual/template.py,sha256=y0KJU2913Q10y1TVMpTVnIxIoUsabzYfpUHEGuX2QyM,5707
106
107
  dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmFIkyRKw,794
107
108
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
108
109
  dara/core/visual/themes/definitions.py,sha256=nS_gQvOzCt5hTmj74d0_siq_9QWuj6wNuir4VCHy0Dk,2779
109
110
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
110
- dara_core-1.18.9.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
- dara_core-1.18.9.dist-info/METADATA,sha256=Ur1nLewgg5uJ4VoDjG_TPK_5tCivB06wAHJ_w0wXf1M,7540
112
- dara_core-1.18.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
- dara_core-1.18.9.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
- dara_core-1.18.9.dist-info/RECORD,,
111
+ dara_core-1.19.1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
112
+ dara_core-1.19.1.dist-info/METADATA,sha256=-rw8HVnKBExaqyOyMlgo-kWoOxOteocS8IbTm_QueBc,7534
113
+ dara_core-1.19.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
114
+ dara_core-1.19.1.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
115
+ dara_core-1.19.1.dist-info/RECORD,,