dara-core 1.11.2__py3-none-any.whl → 1.11.4__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.
@@ -31,6 +31,8 @@ def hash_object(obj: Union[BaseModel, dict, None]):
31
31
  if isinstance(obj, BaseModel):
32
32
  obj = obj.dict()
33
33
 
34
- filter_hash = hashlib.sha1() # nosec B303 # we don't use this for security purposes just as a cache key
34
+ filter_hash = hashlib.sha1(
35
+ usedforsecurity=False
36
+ ) # nosec B303 # we don't use this for security purposes just as a cache key
35
37
  filter_hash.update(json.dumps(obj or {}, sort_keys=True).encode())
36
38
  return filter_hash.hexdigest()
@@ -29550,6 +29550,73 @@ var __privateWrapper = (obj, member, setter, getter) => ({
29550
29550
  function validateTimezone$1(_hours, minutes) {
29551
29551
  return minutes >= 0 && minutes <= 59;
29552
29552
  }
29553
+ globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
29554
+ function adopt(value) {
29555
+ return value instanceof P ? value : new P(function(resolve) {
29556
+ resolve(value);
29557
+ });
29558
+ }
29559
+ return new (P || (P = Promise))(function(resolve, reject) {
29560
+ function fulfilled(value) {
29561
+ try {
29562
+ step(generator.next(value));
29563
+ } catch (e3) {
29564
+ reject(e3);
29565
+ }
29566
+ }
29567
+ function rejected(value) {
29568
+ try {
29569
+ step(generator["throw"](value));
29570
+ } catch (e3) {
29571
+ reject(e3);
29572
+ }
29573
+ }
29574
+ function step(result) {
29575
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
29576
+ }
29577
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
29578
+ });
29579
+ };
29580
+ styled__default.default.div`
29581
+ display: flex;
29582
+ flex: 1 1 100%;
29583
+ flex-direction: column;
29584
+ color: ${(props) => props.theme.colors.grey4};
29585
+ `;
29586
+ styled__default.default.div`
29587
+ display: flex;
29588
+ align-items: center;
29589
+ justify-content: space-between;
29590
+
29591
+ padding: 0.5rem 1rem;
29592
+
29593
+ font-size: 0.875rem;
29594
+
29595
+ background-color: ${(props) => props.$isLightTheme ? theme.colors.blue2 : darkTheme.colors.blue2} !important;
29596
+ border-radius: 0.25rem 0.25rem 0 0;
29597
+ `;
29598
+ styled__default.default.span`
29599
+ :hover {
29600
+ color: ${(props) => props.theme.colors.grey5};
29601
+ }
29602
+
29603
+ :active {
29604
+ color: ${(props) => props.theme.colors.grey6};
29605
+ }
29606
+ `;
29607
+ var CodeComponentThemes;
29608
+ (function(CodeComponentThemes2) {
29609
+ CodeComponentThemes2["DARK"] = "dark";
29610
+ CodeComponentThemes2["LIGHT"] = "light";
29611
+ })(CodeComponentThemes || (CodeComponentThemes = {}));
29612
+ styled__default.default.pre`
29613
+ min-width: fit-content;
29614
+ margin: 0;
29615
+ padding: 1rem;
29616
+
29617
+ background-color: ${(props) => props.$isLightTheme ? theme.colors.blue1 : darkTheme.colors.blue1} !important;
29618
+ border-radius: 0 0 0.25rem 0.25rem;
29619
+ `;
29553
29620
  globalThis && globalThis.__rest || function(s, e3) {
29554
29621
  var t2 = {};
29555
29622
  for (var p2 in s)
@@ -29671,7 +29738,17 @@ var __privateWrapper = (obj, member, setter, getter) => ({
29671
29738
  font-size: 0.9rem;
29672
29739
  }
29673
29740
 
29674
- pre {
29741
+ pre:first-child {
29742
+ margin-top: 0;
29743
+ }
29744
+
29745
+ pre:last-child {
29746
+ margin-bottom: 0;
29747
+ }
29748
+
29749
+ /* don't apply default styles if the pre block has the pretty code display */
29750
+ /* stylelint-disable-next-line */
29751
+ pre:not(.prism-code):not(:has(.prism-code)) {
29675
29752
  overflow-x: auto;
29676
29753
 
29677
29754
  margin-top: 1.7rem;
@@ -29792,7 +29869,6 @@ var __privateWrapper = (obj, member, setter, getter) => ({
29792
29869
  img:first-child,
29793
29870
  figure:first-child,
29794
29871
  video:first-child,
29795
- pre:first-child,
29796
29872
  hr:first-child {
29797
29873
  margin-top: 0;
29798
29874
  }
@@ -29810,7 +29886,6 @@ var __privateWrapper = (obj, member, setter, getter) => ({
29810
29886
  img:last-child,
29811
29887
  figure:last-child,
29812
29888
  video:last-child,
29813
- pre:last-child,
29814
29889
  hr:last-child {
29815
29890
  margin-bottom: 0;
29816
29891
  }
@@ -33755,7 +33830,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
33755
33830
  const InteractiveIcons = styled__default.default.div`
33756
33831
  position: absolute;
33757
33832
  top: 0.75rem;
33758
- left: 236px;
33833
+ right: 0.75rem;
33759
33834
 
33760
33835
  display: none;
33761
33836
  gap: 0.5rem;
@@ -33774,7 +33849,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
33774
33849
  width: 100%;
33775
33850
  padding: 1rem;
33776
33851
 
33777
- background-color: ${(props) => props.theme.colors.blue1};
33852
+ background-color: ${(props) => props.$messageFromActiveUser ? props.theme.colors.blue2 : props.theme.colors.blue1};
33778
33853
  border-radius: 0.25rem;
33779
33854
  box-shadow: ${(props) => props.theme.shadow.medium};
33780
33855
 
@@ -33792,7 +33867,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
33792
33867
  font-size: 0.75rem;
33793
33868
  color: ${(props) => props.theme.colors.grey5};
33794
33869
  `;
33795
- styled__default.default.span`
33870
+ styled__default.default.div`
33871
+ display: flex;
33872
+ flex-direction: column;
33873
+ gap: 0.5rem;
33796
33874
  width: 100%;
33797
33875
  color: ${(props) => props.theme.colors.text};
33798
33876
  overflow-wrap: break-word;
@@ -33855,27 +33933,24 @@ var __privateWrapper = (obj, member, setter, getter) => ({
33855
33933
  flex-direction: column;
33856
33934
  gap: 1rem;
33857
33935
 
33858
- width: 350px;
33859
- height: calc(100vh - 2rem);
33936
+ width: ${(props) => props.$isPopup ? "350px" : "100%"};
33937
+ height: ${(props) => props.$isPopup ? "calc(100vh - 2rem)" : "100%"};
33860
33938
  padding: 1.5rem;
33861
33939
 
33862
- background-color: ${(props) => props.theme.colors.background}e6;
33863
- border-radius: 0.4rem;
33940
+ background-color: ${(props) => props.$isPopup ? `${props.theme.colors.background}e6` : "inherit"};
33941
+ border-radius: ${(props) => props.$isPopup ? "0.4rem" : 0};
33864
33942
  box-shadow: ${(props) => props.theme.shadow.medium};
33865
33943
  `;
33866
33944
  styled__default.default.div`
33867
33945
  display: flex;
33868
- flex-direction: column;
33869
- gap: 1rem;
33870
- justify-self: flex-end;
33871
-
33872
- height: 8.6rem;
33946
+ gap: 0.5rem;
33947
+ align-items: end;
33873
33948
  margin-top: auto;
33874
33949
  `;
33875
33950
  styled__default.default.div`
33876
33951
  display: flex;
33877
33952
  gap: 1rem;
33878
- justify-content: flex-end;
33953
+ align-items: end;
33879
33954
  `;
33880
33955
  styled__default.default.div`
33881
33956
  overflow-y: auto;
@@ -33883,7 +33958,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
33883
33958
  flex-direction: column;
33884
33959
  gap: 1rem;
33885
33960
 
33886
- max-height: calc(100% - 10.225rem);
33961
+ max-height: calc(100% - 6.225rem);
33887
33962
  margin: -0.25rem;
33888
33963
  padding: 0.25rem;
33889
33964
  `;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.11.2
3
+ Version: 1.11.4
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -17,12 +17,13 @@ Provides-Extra: all
17
17
  Requires-Dist: aiorwlock (>=1.4.0,<2.0.0)
18
18
  Requires-Dist: anyio (>=4.0.0)
19
19
  Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
20
+ Requires-Dist: certifi (>=2024.7.4)
20
21
  Requires-Dist: click (==8.1.3)
21
22
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
22
- Requires-Dist: create-dara-app (==1.11.2)
23
+ Requires-Dist: create-dara-app (==1.11.4)
23
24
  Requires-Dist: croniter (>=1.0.15,<2.0.0)
24
25
  Requires-Dist: cryptography (>=42.0.4)
25
- Requires-Dist: dara-components (==1.11.2) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.11.4) ; extra == "all"
26
27
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
27
28
  Requires-Dist: fastapi (==0.109.0)
28
29
  Requires-Dist: fastapi-vite (==0.3.1)
@@ -50,7 +51,7 @@ Description-Content-Type: text/markdown
50
51
 
51
52
  # Dara Application Framework
52
53
 
53
- <img src="https://github.com/causalens/dara/blob/v1.11.2/img/dara_light.svg?raw=true">
54
+ <img src="https://github.com/causalens/dara/blob/v1.11.4/img/dara_light.svg?raw=true">
54
55
 
55
56
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
56
57
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -95,7 +96,7 @@ source .venv/bin/activate
95
96
  dara start
96
97
  ```
97
98
 
98
- ![Dara App](https://github.com/causalens/dara/blob/v1.11.2/img/components_gallery.png?raw=true)
99
+ ![Dara App](https://github.com/causalens/dara/blob/v1.11.4/img/components_gallery.png?raw=true)
99
100
 
100
101
  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:
101
102
 
@@ -112,9 +113,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
112
113
 
113
114
  | Dara App | Description |
114
115
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.11.2/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
116
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.11.2/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 |
117
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.11.2/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. |
116
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.11.4/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.11.4/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 |
118
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.11.4/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. |
118
119
 
119
120
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
120
121
 
@@ -126,9 +127,9 @@ This repository covers the Dara Application Framework first-party packages.
126
127
  - `dara-components`: Components for the Dara Framework.
127
128
  - `create-dara-app`: A CLI tool for creating new Dara applications.
128
129
 
129
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.11.2/CONTRIBUTING.md) file.
130
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.11.4/CONTRIBUTING.md) file.
130
131
 
131
132
  ## License
132
133
 
133
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.11.2/LICENSE).
134
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.11.4/LICENSE).
134
135
 
@@ -40,7 +40,7 @@ dara/core/internal/devtools.py,sha256=YmJdYKEqfxrpXFYAM5sJ2wUtUhfvaCMbb9PuDcqFdt
40
40
  dara/core/internal/download.py,sha256=in0H-AURTfouwje6Q-WpHAENO-_g9VXLWIVLQLRE5eA,3141
41
41
  dara/core/internal/encoder_registry.py,sha256=mcZWUQgsfB8WcfSrHzKP0O-H9qeBiHf767fAvvE6otQ,10372
42
42
  dara/core/internal/execute_action.py,sha256=4lcU4ElyMlaybIv5oDlahsncJA4PM-6hLOKbtEpHPRI,7021
43
- dara/core/internal/hashing.py,sha256=6HLkLDWS2bqQZGlm3VfwAQdDF2LNDmcSckzBUudADT8,1098
43
+ dara/core/internal/hashing.py,sha256=vDlChxGrmpVsyxN3Vg3Bu0GFF7_baIRkrz059kZa4Rk,1133
44
44
  dara/core/internal/import_discovery.py,sha256=rh9RS-NCkux_dShIe-XXjX2LiJQN8WiJ5cltrb0YlUE,7853
45
45
  dara/core/internal/normalization.py,sha256=eLr1X-5fazlVmPgq8j1Qw_dLVwkVwTF9CRtSa6y5pCk,6894
46
46
  dara/core/internal/pandas_utils.py,sha256=sUnV1ToKh7RE8daNh6IJ_rzMDqof4dD0MRwAcAPLJEo,1427
@@ -81,7 +81,7 @@ dara/core/metrics/cache.py,sha256=ybofUhZO0TCHeyhB_AtldWk1QTmTKh7GucTXpOkeTFA,25
81
81
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
82
82
  dara/core/metrics/utils.py,sha256=rYlBinxFc7VehFT5cTNXLk8gC74UEj7ZGq6vLgIDpSg,2247
83
83
  dara/core/persistence.py,sha256=TO94rPAN7jxZKVCC5YA4eE7GGDoNlCPe-BkkItV2VUE,10379
84
- dara/core/umd/dara.core.umd.js,sha256=twTea1tXTML5ysPkrSH5WsGSbGTCmJRk7uP0R3NVHgI,4872295
84
+ dara/core/umd/dara.core.umd.js,sha256=KK4txdL6uqsWIZ-PRer2GvSgQffusO5d-63GQJTlKvQ,4874664
85
85
  dara/core/umd/style.css,sha256=YQtQ4veiSktnyONl0CU1iU1kKfcQhreH4iASi1MP7Ak,4095007
86
86
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
87
87
  dara/core/visual/components/__init__.py,sha256=O-Em_glGdZNO0LLl2RWmJSrQiXKxliXg_PuhVXGT81I,1811
@@ -105,8 +105,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
105
105
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
106
106
  dara/core/visual/themes/definitions.py,sha256=m3oN0txs65MZepqjj7AKMMxybf2aq5fTjcTwJmHqEbk,2744
107
107
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
108
- dara_core-1.11.2.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
- dara_core-1.11.2.dist-info/METADATA,sha256=7K8KSLofyjTupZPtVyyfdK_uA5A7w5JMuUSrGSyPAiM,6735
110
- dara_core-1.11.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
- dara_core-1.11.2.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
- dara_core-1.11.2.dist-info/RECORD,,
108
+ dara_core-1.11.4.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
+ dara_core-1.11.4.dist-info/METADATA,sha256=z4yPhsahNIdjmwlaBMWxnXEWUsqtIXmzBVRBjjzdweM,6771
110
+ dara_core-1.11.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
+ dara_core-1.11.4.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
+ dara_core-1.11.4.dist-info/RECORD,,