dara-core 1.16.9__py3-none-any.whl → 1.16.11__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.
@@ -55082,13 +55082,25 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
55082
55082
  console.error("Failed to revoke session", e3);
55083
55083
  }
55084
55084
  }
55085
+ function resolveReferrer() {
55086
+ if (!window.dara.base_url) {
55087
+ return encodeURIComponent(window.location.pathname + window.location.search);
55088
+ }
55089
+ const base_url_path = new URL(window.dara.base_url).pathname;
55090
+ const referrer = window.location.pathname;
55091
+ let strippedReferrer = referrer.replace(base_url_path, "");
55092
+ if (!strippedReferrer.startsWith("/")) {
55093
+ strippedReferrer = `/${strippedReferrer}`;
55094
+ }
55095
+ return encodeURIComponent(strippedReferrer + window.location.search);
55096
+ }
55085
55097
  async function handleAuthErrors(res, toLogin = false, ignoreErrors = null) {
55086
55098
  var _a;
55087
55099
  const content = await res.clone().json();
55088
55100
  if (isAuthenticationError(content == null ? void 0 : content.detail) && !shouldIgnoreError(content == null ? void 0 : content.detail, ignoreErrors)) {
55089
55101
  localStorage.removeItem(getTokenKey());
55090
55102
  const queryParams = new URLSearchParams(window.location.search);
55091
- const referrer = (_a = queryParams.get("referrer")) != null ? _a : encodeURIComponent(window.location.pathname + window.location.search);
55103
+ const referrer = (_a = queryParams.get("referrer")) != null ? _a : resolveReferrer();
55092
55104
  const path = toLogin || shouldRedirectToLogin(content.detail) ? `/login?referrer=${referrer}` : `/error?code=${res.status}`;
55093
55105
  window.location.href = `${window.dara.base_url}${path}`;
55094
55106
  return true;
@@ -58796,7 +58808,7 @@ Inferred class string: "${iconClasses}."`
58796
58808
  onLoad();
58797
58809
  }, []);
58798
58810
  if (!token) {
58799
- const referrer = encodeURIComponent(window.location.pathname + window.location.search);
58811
+ const referrer = resolveReferrer();
58800
58812
  return /* @__PURE__ */ React__default.default.createElement(
58801
58813
  Redirect,
58802
58814
  {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.16.9
3
+ Version: 1.16.11
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.9)
23
+ Requires-Dist: create-dara-app (==1.16.11)
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.9) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.16.11) ; 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)
@@ -40,7 +40,7 @@ Requires-Dist: pydantic (>=2.10.0,<3.0.0)
40
40
  Requires-Dist: pydantic-settings (>=2.8.1,<3.0.0)
41
41
  Requires-Dist: pyjwt (>=2.0.1,<3.0.0)
42
42
  Requires-Dist: python-dotenv (>=0.19.2)
43
- Requires-Dist: python-multipart (>=0.0.7,<0.0.8)
43
+ Requires-Dist: python-multipart (>=0.0.7)
44
44
  Requires-Dist: pyxlsb
45
45
  Requires-Dist: responses (>=0.18.0,<0.19.0)
46
46
  Requires-Dist: tblib (>=1.7.0,<2.0.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.9/img/dara_light.svg?raw=true">
56
+ <img src="https://github.com/causalens/dara/blob/v1.16.11/img/dara_light.svg?raw=true">
57
57
 
58
58
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
59
59
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](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
- ![Dara App](https://github.com/causalens/dara/blob/v1.16.9/img/components_gallery.png?raw=true)
101
+ ![Dara App](https://github.com/causalens/dara/blob/v1.16.11/img/components_gallery.png?raw=true)
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
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.16.9/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
119
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.16.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 |
120
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.16.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. |
118
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.16.11/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
119
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.16.11/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 |
120
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.16.11/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. |
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.9/CONTRIBUTING.md) file.
147
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.16.11/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.9/LICENSE).
151
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.11/LICENSE).
152
152
 
@@ -81,7 +81,7 @@ dara/core/metrics/cache.py,sha256=bGXwjO_rSc-FkS3PnPi1mvIZf1x-hvmG113dAUk1g-Y,26
81
81
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
82
82
  dara/core/metrics/utils.py,sha256=aKaa_hskV3M3h4xOGZYvegDLq_OWOEUlslkQKrrPQiI,2281
83
83
  dara/core/persistence.py,sha256=RaGiGQE3oIzEH7kHC1ZXji2VJa0aP0ewMjt1wRWYWjI,10634
84
- dara/core/umd/dara.core.umd.js,sha256=Ctt85jvKT_3vIdLI77j31IplDWcGBecQN2KKALPgzRc,4869322
84
+ dara/core/umd/dara.core.umd.js,sha256=rmSffasPPrCogBEk8EVuHvCdFtfBfUL9OpP4HMEyH-A,4869727
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=4km21GLMLM2cr42SwehLUD7DJOlzvhwHl5hdG1OqmIM,2274
@@ -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.9.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
108
- dara_core-1.16.9.dist-info/METADATA,sha256=SLJiEjMYve8nbLJpZMuAlBvl2vT5wiSA-rPqAIMydJE,7470
109
- dara_core-1.16.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
- dara_core-1.16.9.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
111
- dara_core-1.16.9.dist-info/RECORD,,
107
+ dara_core-1.16.11.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
108
+ dara_core-1.16.11.dist-info/METADATA,sha256=qFsFG3iBa0mDCBvn7U9lzzEMkbfpjyVkvVSKrZpG63c,7473
109
+ dara_core-1.16.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
+ dara_core-1.16.11.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
111
+ dara_core-1.16.11.dist-info/RECORD,,