dara-core 1.16.7a2__py3-none-any.whl → 1.16.9__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.
@@ -213,7 +213,7 @@ else:
213
213
 
214
214
  def get_jsonable_encoder() -> Dict[Type[Any], Callable[..., Any]]:
215
215
  """
216
- Get the encoder registry as a dict of {type: serialize} pairs
216
+ Get the encoder registry as a dict of `{type: serialize}` pairs
217
217
  """
218
218
  return {k: v['serialize'] for k, v in encoder_registry.items()}
219
219
 
@@ -12,6 +12,10 @@
12
12
  crossorigin="anonymous"
13
13
  ></script>
14
14
 
15
+ <script>
16
+ window.dara = {base_url: "$$baseUrl$$"};
17
+ </script>
18
+
15
19
  <!-- React/styled-components are included as UMD as they are not bundled inside each module -->
16
20
  <script crossorigin src="https://unpkg.com/react@18.2.0/umd/react.development.js"></script>
17
21
  <script crossorigin src="https://unpkg.com/react-dom@18.2.0/umd/react-dom.development.js"></script>
@@ -293,7 +293,8 @@ class BuildCache(BaseModel):
293
293
  'private': True,
294
294
  'version': '0.0.1',
295
295
  'main': 'dist/index.js',
296
- 'scripts': {'dev': 'vite', 'build': 'vite build'},
296
+ # --base needs to be set here due to the changes in how static urls are resolved
297
+ 'scripts': {'dev': 'vite --base=http://localhost:3000/static/', 'build': 'vite build'},
297
298
  'overrides': {'react': '^18.2.0', 'react-dom': '^18.2.0'},
298
299
  }
299
300
 
@@ -634,10 +635,8 @@ def build_autojs_template(html_template: str, build_cache: BuildCache, config: C
634
635
  for name, _ in importers_dict.items():
635
636
  importers_out += f'"{name}": () => Promise.resolve({name}),'
636
637
  importers_out = f'{importers_out[:-1]}}}'
637
- start_script = (
638
- entry_template_str.replace('$$importers$$', importers_out)
639
- .replace('$$baseUrl$$', settings.dara_base_url)
640
- .replace('$$extraJs$$', config.template_extra_js + '\n' + settings.dara_template_extra_js)
638
+ start_script = entry_template_str.replace('$$importers$$', importers_out).replace(
639
+ '$$extraJs$$', config.template_extra_js + '\n' + settings.dara_template_extra_js
641
640
  )
642
641
 
643
642
  package_tags: Dict[str, List[str]] = {
@@ -677,4 +676,4 @@ def build_autojs_template(html_template: str, build_cache: BuildCache, config: C
677
676
  f'<link id="favicon" rel="icon" type="image/x-icon" href="{settings.dara_base_url}/static/favicon.ico"></link>'
678
677
  )
679
678
 
680
- return html_template.replace('$$assets$$', '\n'.join(tags))
679
+ return html_template.replace('$$assets$$', '\n'.join(tags)).replace('$$baseUrl$$', settings.dara_base_url)
@@ -4,5 +4,5 @@
4
4
  window.onload = function () {
5
5
  $$extraJs$$;
6
6
 
7
- dara.core['default']($$importers$$, '$$baseUrl$$');
7
+ dara.core['default']($$importers$$);
8
8
  };
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.16.7a2
3
+ Version: 1.16.9
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -20,13 +20,14 @@ 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.7-alpha.2)
23
+ Requires-Dist: create-dara-app (==1.16.9)
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.7-alpha.2) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.16.9) ; 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)
30
+ Requires-Dist: h11 (>=0.16.0)
30
31
  Requires-Dist: httpx (>=0.23.0)
31
32
  Requires-Dist: jinja2 (>=2.1.1,<3.2.0)
32
33
  Requires-Dist: odfpy
@@ -52,7 +53,7 @@ Description-Content-Type: text/markdown
52
53
 
53
54
  # Dara Application Framework
54
55
 
55
- <img src="https://github.com/causalens/dara/blob/v1.16.7-alpha.2/img/dara_light.svg?raw=true">
56
+ <img src="https://github.com/causalens/dara/blob/v1.16.9/img/dara_light.svg?raw=true">
56
57
 
57
58
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
58
59
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -97,7 +98,7 @@ source .venv/bin/activate
97
98
  dara start
98
99
  ```
99
100
 
100
- ![Dara App](https://github.com/causalens/dara/blob/v1.16.7-alpha.2/img/components_gallery.png?raw=true)
101
+ ![Dara App](https://github.com/causalens/dara/blob/v1.16.9/img/components_gallery.png?raw=true)
101
102
 
102
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:
103
104
 
@@ -114,9 +115,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
114
115
 
115
116
  | Dara App | Description |
116
117
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.16.7-alpha.2/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
118
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.16.7-alpha.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 |
119
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.16.7-alpha.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. |
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. |
120
121
 
121
122
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
122
123
 
@@ -143,9 +144,9 @@ And the supporting UI packages and tools.
143
144
  - `ui-utils` - miscellaneous utility functions
144
145
  - `ui-widgets` - widget components
145
146
 
146
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.16.7-alpha.2/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.9/CONTRIBUTING.md) file.
147
148
 
148
149
  ## License
149
150
 
150
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.7-alpha.2/LICENSE).
151
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.16.9/LICENSE).
151
152
 
@@ -38,7 +38,7 @@ dara/core/internal/custom_response.py,sha256=aSPonh8AdRjioTk1MaPwdaJHkO4R4aG_osG
38
38
  dara/core/internal/dependency_resolution.py,sha256=y0CUop-RNNhwZLbafeqjhNEiTY549mLvDyNMTfvEl2Q,5456
39
39
  dara/core/internal/devtools.py,sha256=YmJdYKEqfxrpXFYAM5sJ2wUtUhfvaCMbb9PuDcqFdt4,2441
40
40
  dara/core/internal/download.py,sha256=2_fNIWDsV9f0BptTQRhBuIFXOO4th9pcYaIB7lsPcJU,3183
41
- dara/core/internal/encoder_registry.py,sha256=oxsk1liCkN2Oqp4a8EyUxZ5JxIyXly-_UnliAnAhvng,11275
41
+ dara/core/internal/encoder_registry.py,sha256=tq2ka9RjStEFsxTdsWF6kSOU7rycggEq8YfDlzSyzKk,11277
42
42
  dara/core/internal/execute_action.py,sha256=4lcU4ElyMlaybIv5oDlahsncJA4PM-6hLOKbtEpHPRI,7021
43
43
  dara/core/internal/hashing.py,sha256=bKskv9n7s83uYVRxva77EC9exMbMZudmWsrsTPmg8W8,1139
44
44
  dara/core/internal/import_discovery.py,sha256=rh9RS-NCkux_dShIe-XXjX2LiJQN8WiJ5cltrb0YlUE,7853
@@ -62,15 +62,15 @@ dara/core/internal/tasks.py,sha256=oCfmOMm3pVH0-dvZzJv4nspCRWc_u-J3J7lmNI_ys5E,2
62
62
  dara/core/internal/utils.py,sha256=b1YYkn8qHl6-GY6cCm2MS1NXRS9j_rElYCKMZOxJgrY,8232
63
63
  dara/core/internal/websocket.py,sha256=qeW7KOeJ_FPkpAJNZaVwxIN_DqDv7XK7uyjTxJ8HIno,22043
64
64
  dara/core/jinja/index.html,sha256=1gkCFiihXOUH7vp7tT5gH8mKeJB4KqNg394xO3a0usI,1208
65
- dara/core/jinja/index_autojs.html,sha256=MRF5J0vNfzZQm9kPEeLl23sbr08fVSRd_PAUD6Fkc_0,1253
65
+ dara/core/jinja/index_autojs.html,sha256=u1diDUnRT4djZqN1T6lIE01GhlfL6SJ_yLYcyapruss,1342
66
66
  dara/core/js_tooling/custom_js_scaffold/index.tsx,sha256=FEzSV5o5Nyzxw6eXvGLi7BkEBkXf3brV34_7ATLnY7o,68
67
67
  dara/core/js_tooling/custom_js_scaffold/local-js-component.tsx,sha256=Ojsyeh9MYJnH_XJXGkSc8PAUZIqJcqcGTu_uRITo_88,709
68
- dara/core/js_tooling/js_utils.py,sha256=nNlHNL5Rk0gydFKvR1_idqkWL6s8iEZVUbUA58e8EuM,26280
68
+ dara/core/js_tooling/js_utils.py,sha256=-PWve00dYve7wad3UxnNeXRTJTgL2myljJ8P-SKonvc,26390
69
69
  dara/core/js_tooling/statics/favicon.ico,sha256=CJP26erMMIwQB8FFmyhoUJ-Cx1cXEopiVGxFwyxcpo0,47068
70
70
  dara/core/js_tooling/statics/tsconfig.json,sha256=ubnFjwvPHbx2F7wVWsU2VHLDeEnnOwXkTIk7hLNY8ZM,446
71
71
  dara/core/js_tooling/templates/.npmrc,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
72
  dara/core/js_tooling/templates/_entry.template.tsx,sha256=oTeiSLDmq4J-2pM7qjA2RgUocT6Rla7BNwyEAJGvdCc,161
73
- dara/core/js_tooling/templates/_entry_autojs.template.tsx,sha256=OtdXqH4kshaMiTk7E6gvccbVKU1UN-ShRKA9gLpu22E,217
73
+ dara/core/js_tooling/templates/_entry_autojs.template.tsx,sha256=c9eNln0iLHUjhxsgXsF67hPcu4coloh0luvrhdM4ETM,202
74
74
  dara/core/js_tooling/templates/dara.config.json,sha256=RZG_R_xJv_5rYIoz2QZulcG49wD0JURTzshtAzG_di4,84
75
75
  dara/core/js_tooling/templates/vite.config.template.ts,sha256=-_GgbqPAcg_rTL2JsWjqYqZa4w6p2fKa2nyqGnjqj18,888
76
76
  dara/core/log_configs/logging.yaml,sha256=YJyD18psAmSVz6587dcEOyoulLuRFFu1g8yMXl1ylM0,706
@@ -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.7a2.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
108
- dara_core-1.16.7a2.dist-info/METADATA,sha256=hWSu_tI_ZZEtZYGzfhEAn1NKdJa92MKAhwFQsMf9gF4,7514
109
- dara_core-1.16.7a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
110
- dara_core-1.16.7a2.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
111
- dara_core-1.16.7a2.dist-info/RECORD,,
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,,