dara-core 1.17.1__py3-none-any.whl → 1.17.3__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.
@@ -200,7 +200,10 @@ class DataVariable(AnyDataVariable):
200
200
  eng_logger.debug(
201
201
  f'Data Variable {_uid_short}',
202
202
  'retrieved from cache',
203
- {'uid': var_entry.uid, 'size': len(entry.data.index) if entry is not None else 0},
203
+ {
204
+ 'uid': var_entry.uid,
205
+ 'size': len(entry.data.index) if entry is not None and entry.data is not None else 0,
206
+ },
204
207
  )
205
208
 
206
209
  if entry is None:
@@ -52939,27 +52939,6 @@ Inferred class string: "${iconClasses}."`
52939
52939
  function isTaskResponse$1(dvResponse) {
52940
52940
  return "task_id" in dvResponse;
52941
52941
  }
52942
- function formatDerivedVariableRequest(values) {
52943
- return values.map((val) => {
52944
- if (isResolvedDerivedVariable(val) || isResolvedDerivedDataVariable(val)) {
52945
- const { deps, values: nestedValues, ...rest } = val;
52946
- return {
52947
- ...rest,
52948
- force: false,
52949
- values: formatDerivedVariableRequest(nestedValues)
52950
- };
52951
- }
52952
- if (isResolvedSwitchVariable(val)) {
52953
- return {
52954
- ...val,
52955
- value: formatDerivedVariableRequest([val.value])[0],
52956
- value_map: formatDerivedVariableRequest([val.value_map])[0],
52957
- default: formatDerivedVariableRequest([val.default])[0]
52958
- };
52959
- }
52960
- return val;
52961
- });
52962
- }
52963
52942
  async function fetchDerivedVariable({
52964
52943
  cache: cache2,
52965
52944
  force,
@@ -53158,10 +53137,7 @@ Inferred class string: "${iconClasses}."`
53158
53137
  force: derivedResult.force,
53159
53138
  is_data_variable: isDerivedDataVariable(variable),
53160
53139
  selectorKey,
53161
- values: normalizeRequest(
53162
- formatDerivedVariableRequest(derivedResult.values),
53163
- variable.variables
53164
- ),
53140
+ values: normalizeRequest(cleanArgs(derivedResult.values, false), variable.variables),
53165
53141
  variableUid: variable.uid,
53166
53142
  wsClient
53167
53143
  });
@@ -53427,6 +53403,38 @@ Inferred class string: "${iconClasses}."`
53427
53403
  }
53428
53404
  return resolver(getOrRegisterPlainVariable(variable, client, taskContext, extras));
53429
53405
  }
53406
+ function cleanValue(value, force) {
53407
+ if (isResolvedDerivedVariable(value) || isResolvedDerivedDataVariable(value)) {
53408
+ const { deps, ...rest } = value;
53409
+ const cleanedValues = value.values.map((v2) => cleanValue(v2, force));
53410
+ return {
53411
+ ...rest,
53412
+ force,
53413
+ values: cleanedValues
53414
+ };
53415
+ }
53416
+ if (isResolvedSwitchVariable(value)) {
53417
+ return {
53418
+ ...value,
53419
+ value: cleanValue(value.value, force),
53420
+ value_map: cleanValue(value.value_map, force),
53421
+ default: cleanValue(value.default, force)
53422
+ };
53423
+ }
53424
+ return value;
53425
+ }
53426
+ function cleanKwargs(kwargs, force) {
53427
+ return Object.keys(kwargs).reduce(
53428
+ (acc, k2) => {
53429
+ acc[k2] = cleanValue(kwargs[k2], force);
53430
+ return acc;
53431
+ },
53432
+ {}
53433
+ );
53434
+ }
53435
+ function cleanArgs(values, force) {
53436
+ return values.map((val) => cleanValue(val, force));
53437
+ }
53430
53438
  /*!
53431
53439
  * https://github.com/Starcounter-Jack/JSON-Patch
53432
53440
  * (c) 2017-2022 Joachim Wester
@@ -54685,7 +54693,7 @@ Inferred class string: "${iconClasses}."`
54685
54693
  execution_id: executionId,
54686
54694
  input,
54687
54695
  uid: annotatedAction.uid,
54688
- values: normalizeRequest(resolvedKwargs, annotatedAction.dynamic_kwargs),
54696
+ values: normalizeRequest(cleanKwargs(resolvedKwargs, false), annotatedAction.dynamic_kwargs),
54689
54697
  ws_channel
54690
54698
  }),
54691
54699
  method: HTTP_METHOD.POST
@@ -55028,7 +55036,7 @@ Inferred class string: "${iconClasses}."`
55028
55036
  force: false,
55029
55037
  selectorKey: resolved.uid,
55030
55038
  values: normalizeRequest(
55031
- formatDerivedVariableRequest(resolved.values),
55039
+ cleanArgs(resolved.values, false),
55032
55040
  variable.variables
55033
55041
  ),
55034
55042
  variableUid: resolved.uid,
@@ -55353,35 +55361,6 @@ Inferred class string: "${iconClasses}."`
55353
55361
  const result = await res.json();
55354
55362
  return result;
55355
55363
  }
55356
- function cleanValue(value, force) {
55357
- if (isResolvedDerivedVariable(value) || isResolvedDerivedDataVariable(value)) {
55358
- const { deps, ...rest } = value;
55359
- const cleanedValues = value.values.map((v2) => cleanValue(v2, force));
55360
- return {
55361
- ...rest,
55362
- force,
55363
- values: cleanedValues
55364
- };
55365
- }
55366
- if (isResolvedSwitchVariable(value)) {
55367
- return {
55368
- ...value,
55369
- value: cleanValue(value.value, force),
55370
- value_map: cleanValue(value.value_map, force),
55371
- default: cleanValue(value.default, force)
55372
- };
55373
- }
55374
- return value;
55375
- }
55376
- function cleanKwargs(kwargs, force) {
55377
- return Object.keys(kwargs).reduce(
55378
- (acc, k2) => {
55379
- acc[k2] = cleanValue(kwargs[k2], force);
55380
- return acc;
55381
- },
55382
- {}
55383
- );
55384
- }
55385
55364
  function getOrRegisterComponentTrigger(uid2, loop_instance_uid) {
55386
55365
  const triggerKey = getComponentRegistryKey(uid2, true, loop_instance_uid);
55387
55366
  if (!atomRegistry.has(triggerKey)) {
@@ -82671,7 +82650,6 @@ Inferred class string: "${iconClasses}."`
82671
82650
  exports.atomRegistry = atomRegistry;
82672
82651
  exports.cancelTask = cancelTask;
82673
82652
  exports.cleanSessionCache = cleanSessionCache;
82674
- exports.cleanValue = cleanValue;
82675
82653
  exports.clearActionHandlerCache_TEST = clearActionHandlerCache_TEST;
82676
82654
  exports.clearCaches_TEST = clearCaches_TEST;
82677
82655
  exports.clearRegistries_TEST = clearRegistries_TEST;
@@ -82681,7 +82659,6 @@ Inferred class string: "${iconClasses}."`
82681
82659
  exports.depsRegistry = depsRegistry;
82682
82660
  exports.fetchDerivedVariable = fetchDerivedVariable;
82683
82661
  exports.fetchTaskResult = fetchTaskResult;
82684
- exports.formatDerivedVariableRequest = formatDerivedVariableRequest;
82685
82662
  exports.getComponentRegistryKey = getComponentRegistryKey;
82686
82663
  exports.getDeps = getDeps;
82687
82664
  exports.getIcon = getIcon;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.17.1
3
+ Version: 1.17.3
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.17.1)
23
+ Requires-Dist: create-dara-app (==1.17.3)
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.17.1) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.17.3) ; 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)
@@ -54,7 +54,7 @@ Description-Content-Type: text/markdown
54
54
 
55
55
  # Dara Application Framework
56
56
 
57
- <img src="https://github.com/causalens/dara/blob/v1.17.1/img/dara_light.svg?raw=true">
57
+ <img src="https://github.com/causalens/dara/blob/v1.17.3/img/dara_light.svg?raw=true">
58
58
 
59
59
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
60
60
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -99,7 +99,7 @@ source .venv/bin/activate
99
99
  dara start
100
100
  ```
101
101
 
102
- ![Dara App](https://github.com/causalens/dara/blob/v1.17.1/img/components_gallery.png?raw=true)
102
+ ![Dara App](https://github.com/causalens/dara/blob/v1.17.3/img/components_gallery.png?raw=true)
103
103
 
104
104
  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:
105
105
 
@@ -116,9 +116,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
116
116
 
117
117
  | Dara App | Description |
118
118
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.17.1/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
120
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.17.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 |
121
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.17.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. |
119
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.17.3/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
120
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.17.3/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 |
121
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.17.3/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. |
122
122
 
123
123
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
124
124
 
@@ -145,9 +145,9 @@ And the supporting UI packages and tools.
145
145
  - `ui-utils` - miscellaneous utility functions
146
146
  - `ui-widgets` - widget components
147
147
 
148
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.17.1/CONTRIBUTING.md) file.
148
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.17.3/CONTRIBUTING.md) file.
149
149
 
150
150
  ## License
151
151
 
152
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.17.1/LICENSE).
152
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.17.3/LICENSE).
153
153
 
@@ -19,7 +19,7 @@ dara/core/interactivity/actions.py,sha256=niNMt-IE_YXTtLpYrueTNCT60KelmNCGpUn7-W
19
19
  dara/core/interactivity/any_data_variable.py,sha256=1dLLxLuDErRsgaFPSTXxZHvpVucKKty90twQE6N-_NI,5286
20
20
  dara/core/interactivity/any_variable.py,sha256=LOGhbDdYffujlRxF4LR9ZuWdai03R-EXuGsTEJAwfo0,13544
21
21
  dara/core/interactivity/condition.py,sha256=69tdxgLqNbU-AlwHTWFdp-hvxGDugNnb_McDrz0mDtE,1575
22
- dara/core/interactivity/data_variable.py,sha256=pvPOx6SMxHWDxoo5Ea5xqLwrBTrWN68x8lnBiblYSGg,11760
22
+ dara/core/interactivity/data_variable.py,sha256=lIn2v3MSSfbhTtR-9qCqUP8VSzjVj5_wMClpgS1-UZQ,11834
23
23
  dara/core/interactivity/derived_data_variable.py,sha256=u2HOts5rtmzK3D1K383YfYYQnb4pHZF3rTu1lfwMpPA,15323
24
24
  dara/core/interactivity/derived_variable.py,sha256=x_vdt8hvgubDEISX6GfpR5CS7n2Vxq3oZIkVd8Daiw0,21927
25
25
  dara/core/interactivity/filtering.py,sha256=BZsWsQvXPhn6WUoAFpAtgN6hXlGDudPbi4h97Qao2ic,9197
@@ -83,7 +83,7 @@ dara/core/metrics/cache.py,sha256=bGXwjO_rSc-FkS3PnPi1mvIZf1x-hvmG113dAUk1g-Y,26
83
83
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
84
84
  dara/core/metrics/utils.py,sha256=aKaa_hskV3M3h4xOGZYvegDLq_OWOEUlslkQKrrPQiI,2281
85
85
  dara/core/persistence.py,sha256=-lnksbGfHwabeRjbJkceoFd0kHfCu4gK2fud8dkeDTg,18538
86
- dara/core/umd/dara.core.umd.js,sha256=XNr43n2tSWqKbOCkZTqqffmkqTVhaz784rziVqPJdt8,4730577
86
+ dara/core/umd/dara.core.umd.js,sha256=eWUu19pFrZO4VigOLx3zrUGBADrgdQ_-o0D6zTY-HGE,4729818
87
87
  dara/core/umd/style.css,sha256=YQtQ4veiSktnyONl0CU1iU1kKfcQhreH4iASi1MP7Ak,4095007
88
88
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
89
89
  dara/core/visual/components/__init__.py,sha256=eg6M2YcH1o-I2H3IqLaD32ExfZcXhKuH5KTM52Ow6RM,2359
@@ -107,8 +107,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
107
107
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
108
108
  dara/core/visual/themes/definitions.py,sha256=nS_gQvOzCt5hTmj74d0_siq_9QWuj6wNuir4VCHy0Dk,2779
109
109
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
110
- dara_core-1.17.1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
- dara_core-1.17.1.dist-info/METADATA,sha256=a9khY4ezt2GchJVNB0oR7P-iu056WiStyCM71OmUDNs,7497
112
- dara_core-1.17.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
- dara_core-1.17.1.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
- dara_core-1.17.1.dist-info/RECORD,,
110
+ dara_core-1.17.3.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
+ dara_core-1.17.3.dist-info/METADATA,sha256=sHBcDoFrYNvL0uWZtXrdnopP-46eNjdegMk12ZQHM7c,7497
112
+ dara_core-1.17.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
+ dara_core-1.17.3.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
+ dara_core-1.17.3.dist-info/RECORD,,