dara-core 1.18.1__py3-none-any.whl → 1.18.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.
@@ -19,6 +19,7 @@ from __future__ import annotations
19
19
 
20
20
  import os
21
21
  from collections.abc import Awaitable
22
+ from contextvars import ContextVar
22
23
  from typing import Callable, Optional, Tuple
23
24
  from uuid import uuid4
24
25
 
@@ -73,6 +74,13 @@ async def download(data_entry: DownloadDataEntry) -> Tuple[anyio.AsyncFile, Call
73
74
  return (async_file, cleanup)
74
75
 
75
76
 
77
+ GENERATE_CODE_OVERRIDE = ContextVar[Optional[Callable[[str], str]]]('GENERATE_CODE_OVERRIDE', default=None)
78
+ """
79
+ Optional context variable which can be used to override the default behaviour of code generation.
80
+ Invoked with the file path to generate a download code for.
81
+ """
82
+
83
+
76
84
  async def generate_download_code(file_path: str, cleanup_file: bool) -> str:
77
85
  """
78
86
  Generate a one-time download code for a given dataset.
@@ -88,7 +96,7 @@ async def generate_download_code(file_path: str, cleanup_file: bool) -> str:
88
96
  user = USER.get()
89
97
 
90
98
  # Unique download id
91
- uid = str(uuid4())
99
+ uid = override(file_path) if (override := GENERATE_CODE_OVERRIDE.get()) else str(uuid4())
92
100
 
93
101
  # Put it in the store under the registry entry with TTL configured
94
102
  await store.set(
@@ -52783,7 +52783,11 @@ Inferred class string: "${iconClasses}."`
52783
52783
  Recoil_index_8({
52784
52784
  default: variable.default,
52785
52785
  effects: [
52786
- RecoilSync_index_6({ history: "push", itemKey: variable.query, refine: Refine_index_6(), syncDefault: true })
52786
+ RecoilSync_index_6({
52787
+ history: "push",
52788
+ itemKey: variable.query,
52789
+ refine: Refine_index_6()
52790
+ })
52787
52791
  ],
52788
52792
  key: variable.uid
52789
52793
  })
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.18.1
3
+ Version: 1.18.3
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.1)
24
+ Requires-Dist: create-dara-app (==1.18.3)
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.1) ; extra == "all"
27
+ Requires-Dist: dara-components (==1.18.3) ; 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)
@@ -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.1/img/dara_light.svg?raw=true">
58
+ <img src="https://github.com/causalens/dara/blob/v1.18.3/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.1/img/components_gallery.png?raw=true)
103
+ ![Dara App](https://github.com/causalens/dara/blob/v1.18.3/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.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.18.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.18.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. |
120
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.18.3/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.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 |
122
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.18.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. |
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.1/CONTRIBUTING.md) file.
149
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.18.3/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.1/LICENSE).
153
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.18.3/LICENSE).
154
154
 
@@ -39,7 +39,7 @@ dara/core/internal/cgroup.py,sha256=yKCTY8RxyxnNy-Mw4tfzeZew1dL8qw381gHBVE96-OA,
39
39
  dara/core/internal/custom_response.py,sha256=aSPonh8AdRjioTk1MaPwdaJHkO4R4aG_osGAGCIHbtg,1341
40
40
  dara/core/internal/dependency_resolution.py,sha256=FSy4sb4EtMv7P8KrPeWAo_VPb3stdg09DE1kefzCrEQ,11817
41
41
  dara/core/internal/devtools.py,sha256=gqDT6laqe3rgTjTweswDLMiQ-EwEr5psyBJbygQtWPg,2378
42
- dara/core/internal/download.py,sha256=F2LOsdkX98rpMeefSm2WeMMnMF9xkGlVh0ZUFFAktpI,3207
42
+ dara/core/internal/download.py,sha256=_AciKp4ZsJxq60LRnvhLsA7KNWMDAXRbSKpin8-vBmU,3589
43
43
  dara/core/internal/encoder_registry.py,sha256=KTYBLIGHpJDOLzCp_9899D7EIISK0zxCKbn4Gktllxk,11200
44
44
  dara/core/internal/execute_action.py,sha256=V5JmAkh-PoXHCNr0xcTtdw4UMOeY6VEOVvW_U8CeuS4,6779
45
45
  dara/core/internal/hashing.py,sha256=Iz3FyiroHc_bC8AEtSUFFAIHh6j4Bq_EvxLqInIkAUM,1124
@@ -83,7 +83,7 @@ dara/core/metrics/cache.py,sha256=c1PSst_oZZvuVzBXYWdpf8Sbb97u6q0HS2dlsEVLpQU,26
83
83
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
84
84
  dara/core/metrics/utils.py,sha256=inR1Ab5hmWZY2lsgGwLCQOEdyhCD9PumU52X2JbwlKY,2251
85
85
  dara/core/persistence.py,sha256=qINdOxpyvlPGBB9Vy09TPWQnmk0ej4SzUx03AV1YbX0,18561
86
- dara/core/umd/dara.core.umd.js,sha256=fBk-dRpmRI3MPqm2cnBsnVEbsgJOUoWFBac80kW8gvc,4731416
86
+ dara/core/umd/dara.core.umd.js,sha256=koX9V-qRF-UNTpPCc9iC140JQeGll8IqwkFJquksDDI,4731451
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=wuGRk8bogiLWPOXAF-Fo4F6_L__0tBrI2p2SqgH2lnE,2385
@@ -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.18.1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
- dara_core-1.18.1.dist-info/METADATA,sha256=Mquy66nz99ooJLG6musPzK5Q2m0uB9Lw-2VmNN1UWsI,7540
112
- dara_core-1.18.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
- dara_core-1.18.1.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
- dara_core-1.18.1.dist-info/RECORD,,
110
+ dara_core-1.18.3.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
111
+ dara_core-1.18.3.dist-info/METADATA,sha256=PVtoeJucZs35kgQtOso1ClOKI0gCncuTRyojcHonceU,7540
112
+ dara_core-1.18.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
113
+ dara_core-1.18.3.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
114
+ dara_core-1.18.3.dist-info/RECORD,,