dara-core 1.18.5__py3-none-any.whl → 1.18.7__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.
- dara/core/internal/pool/task_pool.py +8 -5
- dara/core/internal/pool/utils.py +19 -14
- dara/core/umd/dara.core.umd.js +164 -100
- {dara_core-1.18.5.dist-info → dara_core-1.18.7.dist-info}/METADATA +10 -10
- {dara_core-1.18.5.dist-info → dara_core-1.18.7.dist-info}/RECORD +8 -8
- {dara_core-1.18.5.dist-info → dara_core-1.18.7.dist-info}/LICENSE +0 -0
- {dara_core-1.18.5.dist-info → dara_core-1.18.7.dist-info}/WHEEL +0 -0
- {dara_core-1.18.5.dist-info → dara_core-1.18.7.dist-info}/entry_points.txt +0 -0
|
@@ -499,11 +499,14 @@ class TaskPool:
|
|
|
499
499
|
while self.status not in (PoolStatus.ERROR, PoolStatus.STOPPED):
|
|
500
500
|
await anyio.sleep(0.1)
|
|
501
501
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
502
|
+
try:
|
|
503
|
+
self._handle_excess_workers()
|
|
504
|
+
self._handle_orphaned_workers()
|
|
505
|
+
self._handle_dead_workers()
|
|
506
|
+
self._create_workers()
|
|
507
|
+
await self._process_next_worker_message()
|
|
508
|
+
except Exception as e:
|
|
509
|
+
dev_logger.error('Error in task pool', e)
|
|
507
510
|
finally:
|
|
508
511
|
self.loop_stopped.set()
|
|
509
512
|
|
dara/core/internal/pool/utils.py
CHANGED
|
@@ -27,6 +27,8 @@ from typing import Any, Callable, Optional, Tuple
|
|
|
27
27
|
import anyio
|
|
28
28
|
from tblib import Traceback
|
|
29
29
|
|
|
30
|
+
from dara.core.logging import dev_logger
|
|
31
|
+
|
|
30
32
|
|
|
31
33
|
class SubprocessException:
|
|
32
34
|
"""
|
|
@@ -131,20 +133,23 @@ async def stop_process_async(process: BaseProcess, timeout: float = 3):
|
|
|
131
133
|
# Terminate and wait for it to shutdown
|
|
132
134
|
process.terminate()
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
try:
|
|
137
|
+
# mimic process.join() in an async way to not block
|
|
138
|
+
await wait_while(process.is_alive, timeout)
|
|
139
|
+
|
|
140
|
+
# If it's still alive
|
|
141
|
+
if process.is_alive():
|
|
142
|
+
try:
|
|
143
|
+
os.kill(process.pid, signal.SIGKILL)
|
|
144
|
+
await wait_while(process.is_alive, timeout)
|
|
145
|
+
except OSError as e:
|
|
146
|
+
raise RuntimeError(f'Unable to terminate subprocess with PID {process.pid}') from e
|
|
147
|
+
|
|
148
|
+
# If it's still alive raise an exception
|
|
149
|
+
if process.is_alive():
|
|
150
|
+
raise RuntimeError(f'Unable to terminate subprocess with PID {process.pid}')
|
|
151
|
+
except Exception as e:
|
|
152
|
+
dev_logger.error('Error stopping process', e)
|
|
148
153
|
|
|
149
154
|
|
|
150
155
|
def stop_process(process: BaseProcess, timeout: float = 3):
|
dara/core/umd/dara.core.umd.js
CHANGED
|
@@ -39799,65 +39799,65 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
39799
39799
|
return f2 === null || f2 === void 0 ? void 0 : f2(...args);
|
|
39800
39800
|
}, []);
|
|
39801
39801
|
}
|
|
39802
|
-
const $b5e257d569688ac6$var$defaultContext = {
|
|
39802
|
+
const $b5e257d569688ac6$var$defaultContext$1 = {
|
|
39803
39803
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
39804
39804
|
current: 0
|
|
39805
39805
|
};
|
|
39806
|
-
const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.default.createContext($b5e257d569688ac6$var$defaultContext);
|
|
39807
|
-
const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.default.createContext(false);
|
|
39808
|
-
let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
39809
|
-
let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
39810
|
-
function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
|
|
39811
|
-
let ctx = React.useContext($b5e257d569688ac6$var$SSRContext);
|
|
39806
|
+
const $b5e257d569688ac6$var$SSRContext$1 = /* @__PURE__ */ React__default.default.createContext($b5e257d569688ac6$var$defaultContext$1);
|
|
39807
|
+
const $b5e257d569688ac6$var$IsSSRContext$1 = /* @__PURE__ */ React__default.default.createContext(false);
|
|
39808
|
+
let $b5e257d569688ac6$var$canUseDOM$1 = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
39809
|
+
let $b5e257d569688ac6$var$componentIds$1 = /* @__PURE__ */ new WeakMap();
|
|
39810
|
+
function $b5e257d569688ac6$var$useCounter$1(isDisabled = false) {
|
|
39811
|
+
let ctx = React.useContext($b5e257d569688ac6$var$SSRContext$1);
|
|
39812
39812
|
let ref = React.useRef(null);
|
|
39813
39813
|
if (ref.current === null && !isDisabled) {
|
|
39814
39814
|
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
39815
39815
|
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
|
|
39816
39816
|
if (currentOwner) {
|
|
39817
|
-
let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
|
|
39817
|
+
let prevComponentValue = $b5e257d569688ac6$var$componentIds$1.get(currentOwner);
|
|
39818
39818
|
if (prevComponentValue == null)
|
|
39819
|
-
$b5e257d569688ac6$var$componentIds.set(currentOwner, {
|
|
39819
|
+
$b5e257d569688ac6$var$componentIds$1.set(currentOwner, {
|
|
39820
39820
|
id: ctx.current,
|
|
39821
39821
|
state: currentOwner.memoizedState
|
|
39822
39822
|
});
|
|
39823
39823
|
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
39824
39824
|
ctx.current = prevComponentValue.id;
|
|
39825
|
-
$b5e257d569688ac6$var$componentIds.delete(currentOwner);
|
|
39825
|
+
$b5e257d569688ac6$var$componentIds$1.delete(currentOwner);
|
|
39826
39826
|
}
|
|
39827
39827
|
}
|
|
39828
39828
|
ref.current = ++ctx.current;
|
|
39829
39829
|
}
|
|
39830
39830
|
return ref.current;
|
|
39831
39831
|
}
|
|
39832
|
-
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
39833
|
-
let ctx = React.useContext($b5e257d569688ac6$var$SSRContext);
|
|
39834
|
-
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && false)
|
|
39832
|
+
function $b5e257d569688ac6$var$useLegacySSRSafeId$1(defaultId) {
|
|
39833
|
+
let ctx = React.useContext($b5e257d569688ac6$var$SSRContext$1);
|
|
39834
|
+
if (ctx === $b5e257d569688ac6$var$defaultContext$1 && !$b5e257d569688ac6$var$canUseDOM$1 && false)
|
|
39835
39835
|
console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
39836
|
-
let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
|
|
39837
|
-
let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
39836
|
+
let counter = $b5e257d569688ac6$var$useCounter$1(!!defaultId);
|
|
39837
|
+
let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext$1 && false ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
39838
39838
|
return defaultId || `${prefix2}-${counter}`;
|
|
39839
39839
|
}
|
|
39840
|
-
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
39840
|
+
function $b5e257d569688ac6$var$useModernSSRSafeId$1(defaultId) {
|
|
39841
39841
|
let id = React__default.default.useId();
|
|
39842
|
-
let [didSSR] = React.useState($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
39843
|
-
let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
39842
|
+
let [didSSR] = React.useState($b5e257d569688ac6$export$535bd6ca7f90a273$1());
|
|
39843
|
+
let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext$1.prefix}`;
|
|
39844
39844
|
return defaultId || `${prefix2}-${id}`;
|
|
39845
39845
|
}
|
|
39846
|
-
const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default.default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
|
|
39847
|
-
function $b5e257d569688ac6$var$getSnapshot() {
|
|
39846
|
+
const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default.default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId$1 : $b5e257d569688ac6$var$useLegacySSRSafeId$1;
|
|
39847
|
+
function $b5e257d569688ac6$var$getSnapshot$1() {
|
|
39848
39848
|
return false;
|
|
39849
39849
|
}
|
|
39850
|
-
function $b5e257d569688ac6$var$getServerSnapshot() {
|
|
39850
|
+
function $b5e257d569688ac6$var$getServerSnapshot$1() {
|
|
39851
39851
|
return true;
|
|
39852
39852
|
}
|
|
39853
|
-
function $b5e257d569688ac6$var$subscribe(onStoreChange) {
|
|
39853
|
+
function $b5e257d569688ac6$var$subscribe$1(onStoreChange) {
|
|
39854
39854
|
return () => {
|
|
39855
39855
|
};
|
|
39856
39856
|
}
|
|
39857
|
-
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
39857
|
+
function $b5e257d569688ac6$export$535bd6ca7f90a273$1() {
|
|
39858
39858
|
if (typeof React__default.default["useSyncExternalStore"] === "function")
|
|
39859
|
-
return React__default.default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
39860
|
-
return React.useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
39859
|
+
return React__default.default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe$1, $b5e257d569688ac6$var$getSnapshot$1, $b5e257d569688ac6$var$getServerSnapshot$1);
|
|
39860
|
+
return React.useContext($b5e257d569688ac6$var$IsSSRContext$1);
|
|
39861
39861
|
}
|
|
39862
39862
|
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
39863
39863
|
let $bdb11010cef70236$export$d41a04c74483c6ef = /* @__PURE__ */ new Map();
|
|
@@ -40357,82 +40357,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
40357
40357
|
handleReset2
|
|
40358
40358
|
]);
|
|
40359
40359
|
}
|
|
40360
|
-
function $
|
|
40361
|
-
let [stateValue, setStateValue] = React.useState(value || defaultValue);
|
|
40362
|
-
let isControlledRef = React.useRef(value !== void 0);
|
|
40363
|
-
let isControlled = value !== void 0;
|
|
40364
|
-
React.useEffect(() => {
|
|
40365
|
-
let wasControlled = isControlledRef.current;
|
|
40366
|
-
if (wasControlled !== isControlled && false)
|
|
40367
|
-
console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
40368
|
-
isControlledRef.current = isControlled;
|
|
40369
|
-
}, [
|
|
40370
|
-
isControlled
|
|
40371
|
-
]);
|
|
40372
|
-
let currentValue = isControlled ? value : stateValue;
|
|
40373
|
-
let setValue = React.useCallback((value2, ...args) => {
|
|
40374
|
-
let onChangeCaller = (value3, ...onChangeArgs) => {
|
|
40375
|
-
if (onChange2) {
|
|
40376
|
-
if (!Object.is(currentValue, value3))
|
|
40377
|
-
onChange2(value3, ...onChangeArgs);
|
|
40378
|
-
}
|
|
40379
|
-
if (!isControlled)
|
|
40380
|
-
currentValue = value3;
|
|
40381
|
-
};
|
|
40382
|
-
if (typeof value2 === "function") {
|
|
40383
|
-
let updateFunction = (oldValue, ...functionArgs) => {
|
|
40384
|
-
let interceptedValue = value2(isControlled ? currentValue : oldValue, ...functionArgs);
|
|
40385
|
-
onChangeCaller(interceptedValue, ...args);
|
|
40386
|
-
if (!isControlled)
|
|
40387
|
-
return interceptedValue;
|
|
40388
|
-
return oldValue;
|
|
40389
|
-
};
|
|
40390
|
-
setStateValue(updateFunction);
|
|
40391
|
-
} else {
|
|
40392
|
-
if (!isControlled)
|
|
40393
|
-
setStateValue(value2);
|
|
40394
|
-
onChangeCaller(value2, ...args);
|
|
40395
|
-
}
|
|
40396
|
-
}, [
|
|
40397
|
-
isControlled,
|
|
40398
|
-
currentValue,
|
|
40399
|
-
onChange2
|
|
40400
|
-
]);
|
|
40401
|
-
return [
|
|
40402
|
-
currentValue,
|
|
40403
|
-
setValue
|
|
40404
|
-
];
|
|
40405
|
-
}
|
|
40406
|
-
function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min2 = -Infinity, max2 = Infinity) {
|
|
40360
|
+
function $9446cca9a3875146$export$7d15b64cf5a3a4c4$1(value, min2 = -Infinity, max2 = Infinity) {
|
|
40407
40361
|
let newValue = Math.min(Math.max(value, min2), max2);
|
|
40408
40362
|
return newValue;
|
|
40409
40363
|
}
|
|
40410
|
-
function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
|
|
40411
|
-
let roundedValue = value;
|
|
40412
|
-
let stepString = step.toString();
|
|
40413
|
-
let pointIndex = stepString.indexOf(".");
|
|
40414
|
-
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
|
|
40415
|
-
if (precision > 0) {
|
|
40416
|
-
let pow = Math.pow(10, precision);
|
|
40417
|
-
roundedValue = Math.round(roundedValue * pow) / pow;
|
|
40418
|
-
}
|
|
40419
|
-
return roundedValue;
|
|
40420
|
-
}
|
|
40421
|
-
function $9446cca9a3875146$export$cb6e0bb50bc19463(value, min2, max2, step) {
|
|
40422
|
-
min2 = Number(min2);
|
|
40423
|
-
max2 = Number(max2);
|
|
40424
|
-
let remainder = (value - (isNaN(min2) ? 0 : min2)) % step;
|
|
40425
|
-
let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
|
|
40426
|
-
if (!isNaN(min2)) {
|
|
40427
|
-
if (snappedValue < min2)
|
|
40428
|
-
snappedValue = min2;
|
|
40429
|
-
else if (!isNaN(max2) && snappedValue > max2)
|
|
40430
|
-
snappedValue = min2 + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max2 - min2) / step, step)) * step;
|
|
40431
|
-
} else if (!isNaN(max2) && snappedValue > max2)
|
|
40432
|
-
snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max2 / step, step)) * step;
|
|
40433
|
-
snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);
|
|
40434
|
-
return snappedValue;
|
|
40435
|
-
}
|
|
40436
40364
|
const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
|
|
40437
40365
|
function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
|
|
40438
40366
|
for (let [Context, value] of values)
|
|
@@ -40679,6 +40607,66 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
40679
40607
|
}
|
|
40680
40608
|
}
|
|
40681
40609
|
}
|
|
40610
|
+
const $b5e257d569688ac6$var$defaultContext = {
|
|
40611
|
+
prefix: String(Math.round(Math.random() * 1e10)),
|
|
40612
|
+
current: 0
|
|
40613
|
+
};
|
|
40614
|
+
const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.default.createContext($b5e257d569688ac6$var$defaultContext);
|
|
40615
|
+
const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.default.createContext(false);
|
|
40616
|
+
let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
40617
|
+
let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
|
|
40618
|
+
function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
|
|
40619
|
+
let ctx = React.useContext($b5e257d569688ac6$var$SSRContext);
|
|
40620
|
+
let ref = React.useRef(null);
|
|
40621
|
+
if (ref.current === null && !isDisabled) {
|
|
40622
|
+
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
40623
|
+
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
|
|
40624
|
+
if (currentOwner) {
|
|
40625
|
+
let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
|
|
40626
|
+
if (prevComponentValue == null)
|
|
40627
|
+
$b5e257d569688ac6$var$componentIds.set(currentOwner, {
|
|
40628
|
+
id: ctx.current,
|
|
40629
|
+
state: currentOwner.memoizedState
|
|
40630
|
+
});
|
|
40631
|
+
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
40632
|
+
ctx.current = prevComponentValue.id;
|
|
40633
|
+
$b5e257d569688ac6$var$componentIds.delete(currentOwner);
|
|
40634
|
+
}
|
|
40635
|
+
}
|
|
40636
|
+
ref.current = ++ctx.current;
|
|
40637
|
+
}
|
|
40638
|
+
return ref.current;
|
|
40639
|
+
}
|
|
40640
|
+
function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
|
|
40641
|
+
let ctx = React.useContext($b5e257d569688ac6$var$SSRContext);
|
|
40642
|
+
if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && false)
|
|
40643
|
+
console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
40644
|
+
let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
|
|
40645
|
+
let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
|
|
40646
|
+
return defaultId || `${prefix2}-${counter}`;
|
|
40647
|
+
}
|
|
40648
|
+
function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
|
|
40649
|
+
let id = React__default.default.useId();
|
|
40650
|
+
let [didSSR] = React.useState($b5e257d569688ac6$export$535bd6ca7f90a273());
|
|
40651
|
+
let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
|
|
40652
|
+
return defaultId || `${prefix2}-${id}`;
|
|
40653
|
+
}
|
|
40654
|
+
typeof React__default.default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
|
|
40655
|
+
function $b5e257d569688ac6$var$getSnapshot() {
|
|
40656
|
+
return false;
|
|
40657
|
+
}
|
|
40658
|
+
function $b5e257d569688ac6$var$getServerSnapshot() {
|
|
40659
|
+
return true;
|
|
40660
|
+
}
|
|
40661
|
+
function $b5e257d569688ac6$var$subscribe(onStoreChange) {
|
|
40662
|
+
return () => {
|
|
40663
|
+
};
|
|
40664
|
+
}
|
|
40665
|
+
function $b5e257d569688ac6$export$535bd6ca7f90a273() {
|
|
40666
|
+
if (typeof React__default.default["useSyncExternalStore"] === "function")
|
|
40667
|
+
return React__default.default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
|
|
40668
|
+
return React.useContext($b5e257d569688ac6$var$IsSSRContext);
|
|
40669
|
+
}
|
|
40682
40670
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
40683
40671
|
let $507fabe10e71c6fb$var$changeHandlers = /* @__PURE__ */ new Set();
|
|
40684
40672
|
let $507fabe10e71c6fb$export$d90243b58daecda7 = /* @__PURE__ */ new Map();
|
|
@@ -41665,6 +41653,82 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
41665
41653
|
fieldProps
|
|
41666
41654
|
};
|
|
41667
41655
|
}
|
|
41656
|
+
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange2) {
|
|
41657
|
+
let [stateValue, setStateValue] = React.useState(value || defaultValue);
|
|
41658
|
+
let isControlledRef = React.useRef(value !== void 0);
|
|
41659
|
+
let isControlled = value !== void 0;
|
|
41660
|
+
React.useEffect(() => {
|
|
41661
|
+
let wasControlled = isControlledRef.current;
|
|
41662
|
+
if (wasControlled !== isControlled && false)
|
|
41663
|
+
console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
41664
|
+
isControlledRef.current = isControlled;
|
|
41665
|
+
}, [
|
|
41666
|
+
isControlled
|
|
41667
|
+
]);
|
|
41668
|
+
let currentValue = isControlled ? value : stateValue;
|
|
41669
|
+
let setValue = React.useCallback((value2, ...args) => {
|
|
41670
|
+
let onChangeCaller = (value3, ...onChangeArgs) => {
|
|
41671
|
+
if (onChange2) {
|
|
41672
|
+
if (!Object.is(currentValue, value3))
|
|
41673
|
+
onChange2(value3, ...onChangeArgs);
|
|
41674
|
+
}
|
|
41675
|
+
if (!isControlled)
|
|
41676
|
+
currentValue = value3;
|
|
41677
|
+
};
|
|
41678
|
+
if (typeof value2 === "function") {
|
|
41679
|
+
let updateFunction = (oldValue, ...functionArgs) => {
|
|
41680
|
+
let interceptedValue = value2(isControlled ? currentValue : oldValue, ...functionArgs);
|
|
41681
|
+
onChangeCaller(interceptedValue, ...args);
|
|
41682
|
+
if (!isControlled)
|
|
41683
|
+
return interceptedValue;
|
|
41684
|
+
return oldValue;
|
|
41685
|
+
};
|
|
41686
|
+
setStateValue(updateFunction);
|
|
41687
|
+
} else {
|
|
41688
|
+
if (!isControlled)
|
|
41689
|
+
setStateValue(value2);
|
|
41690
|
+
onChangeCaller(value2, ...args);
|
|
41691
|
+
}
|
|
41692
|
+
}, [
|
|
41693
|
+
isControlled,
|
|
41694
|
+
currentValue,
|
|
41695
|
+
onChange2
|
|
41696
|
+
]);
|
|
41697
|
+
return [
|
|
41698
|
+
currentValue,
|
|
41699
|
+
setValue
|
|
41700
|
+
];
|
|
41701
|
+
}
|
|
41702
|
+
function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min2 = -Infinity, max2 = Infinity) {
|
|
41703
|
+
let newValue = Math.min(Math.max(value, min2), max2);
|
|
41704
|
+
return newValue;
|
|
41705
|
+
}
|
|
41706
|
+
function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
|
|
41707
|
+
let roundedValue = value;
|
|
41708
|
+
let stepString = step.toString();
|
|
41709
|
+
let pointIndex = stepString.indexOf(".");
|
|
41710
|
+
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
|
|
41711
|
+
if (precision > 0) {
|
|
41712
|
+
let pow = Math.pow(10, precision);
|
|
41713
|
+
roundedValue = Math.round(roundedValue * pow) / pow;
|
|
41714
|
+
}
|
|
41715
|
+
return roundedValue;
|
|
41716
|
+
}
|
|
41717
|
+
function $9446cca9a3875146$export$cb6e0bb50bc19463(value, min2, max2, step) {
|
|
41718
|
+
min2 = Number(min2);
|
|
41719
|
+
max2 = Number(max2);
|
|
41720
|
+
let remainder = (value - (isNaN(min2) ? 0 : min2)) % step;
|
|
41721
|
+
let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
|
|
41722
|
+
if (!isNaN(min2)) {
|
|
41723
|
+
if (snappedValue < min2)
|
|
41724
|
+
snappedValue = min2;
|
|
41725
|
+
else if (!isNaN(max2) && snappedValue > max2)
|
|
41726
|
+
snappedValue = min2 + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max2 - min2) / step, step)) * step;
|
|
41727
|
+
} else if (!isNaN(max2) && snappedValue > max2)
|
|
41728
|
+
snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max2 / step, step)) * step;
|
|
41729
|
+
snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);
|
|
41730
|
+
return snappedValue;
|
|
41731
|
+
}
|
|
41668
41732
|
const $28f99e3e86e6ec45$var$DEFAULT_MIN_VALUE = 0;
|
|
41669
41733
|
const $28f99e3e86e6ec45$var$DEFAULT_MAX_VALUE = 100;
|
|
41670
41734
|
const $28f99e3e86e6ec45$var$DEFAULT_STEP_VALUE = 1;
|
|
@@ -41903,7 +41967,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
41903
41967
|
delta = -delta;
|
|
41904
41968
|
currentPosition.current += delta;
|
|
41905
41969
|
if (realTimeTrackDraggingIndex.current != null && trackRef.current) {
|
|
41906
|
-
const percent = $9446cca9a3875146$export$7d15b64cf5a3a4c4(currentPosition.current / size2, 0, 1);
|
|
41970
|
+
const percent = $9446cca9a3875146$export$7d15b64cf5a3a4c4$1(currentPosition.current / size2, 0, 1);
|
|
41907
41971
|
state.setThumbPercent(realTimeTrackDraggingIndex.current, percent);
|
|
41908
41972
|
}
|
|
41909
41973
|
},
|
|
@@ -42086,7 +42150,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
42086
42150
|
if (isVertical || reverseX)
|
|
42087
42151
|
delta = -delta;
|
|
42088
42152
|
currentPosition.current += delta;
|
|
42089
|
-
setThumbPercent(index2, $9446cca9a3875146$export$7d15b64cf5a3a4c4(currentPosition.current / size2, 0, 1));
|
|
42153
|
+
setThumbPercent(index2, $9446cca9a3875146$export$7d15b64cf5a3a4c4$1(currentPosition.current / size2, 0, 1));
|
|
42090
42154
|
}
|
|
42091
42155
|
},
|
|
42092
42156
|
onMoveEnd() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dara-core
|
|
3
|
-
Version: 1.18.
|
|
3
|
+
Version: 1.18.7
|
|
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.
|
|
24
|
+
Requires-Dist: create-dara-app (==1.18.7)
|
|
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.
|
|
27
|
+
Requires-Dist: dara-components (==1.18.7) ; 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.
|
|
58
|
+
<img src="https://github.com/causalens/dara/blob/v1.18.7/img/dara_light.svg?raw=true">
|
|
59
59
|
|
|
60
60
|

|
|
61
61
|
[](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
|
-

|
|
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
|
-
|  | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
|
|
121
|
+
|  | 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
|
+
|  | 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.
|
|
149
|
+
More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.18.7/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.
|
|
153
|
+
Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.18.7/LICENSE).
|
|
154
154
|
|
|
@@ -49,8 +49,8 @@ dara/core/internal/pandas_utils.py,sha256=SQ6IzsphfSUYheOJSA-zzITRO8zVwVcjfQvsfx
|
|
|
49
49
|
dara/core/internal/pool/__init__.py,sha256=pBbXE5GR3abVC9Lg3i0QxfdmsrBDMJUYAYb0SiAEBkk,657
|
|
50
50
|
dara/core/internal/pool/channel.py,sha256=TbyIE-PnfzzsQYhl3INOs5UIHHbF_h9bMFne5FjbWlQ,4948
|
|
51
51
|
dara/core/internal/pool/definitions.py,sha256=ICw_Krf-ziVGkzKl4qvvIgKC0Z06bvUehELH5-VMjV0,4645
|
|
52
|
-
dara/core/internal/pool/task_pool.py,sha256=
|
|
53
|
-
dara/core/internal/pool/utils.py,sha256=
|
|
52
|
+
dara/core/internal/pool/task_pool.py,sha256=00idkLWSRfRnWcQxkMj2Jin60Z21aOvywV2mEEsWh68,17774
|
|
53
|
+
dara/core/internal/pool/utils.py,sha256=HoNlHy2V0VmX5Xm2cqsFbPIOV74E2MslzTFgyNRmiB0,5411
|
|
54
54
|
dara/core/internal/pool/worker.py,sha256=eBi3FS652goZxu9chaRT89eHDvqJW0aHjt8I5UgyESA,6808
|
|
55
55
|
dara/core/internal/port_utils.py,sha256=3NN94CubNrIYQKmPM4SEwstY-UMqsbbe1M_JhyPcncA,1654
|
|
56
56
|
dara/core/internal/registries.py,sha256=9D9pltnh-0UTuTr0nVccqGamPJtMt8bmGuOCa12-58Y,3591
|
|
@@ -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=
|
|
86
|
+
dara/core/umd/dara.core.umd.js,sha256=nMQ-tal0tJbvu9e3fVqzoF0_UEyY8LYrR8o4ser2390,4735977
|
|
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.
|
|
111
|
-
dara_core-1.18.
|
|
112
|
-
dara_core-1.18.
|
|
113
|
-
dara_core-1.18.
|
|
114
|
-
dara_core-1.18.
|
|
110
|
+
dara_core-1.18.7.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
|
|
111
|
+
dara_core-1.18.7.dist-info/METADATA,sha256=Pb4Q6n5xjwsVv2RvAxQZ6QB0RND6LqYBaqiLvrvTXac,7540
|
|
112
|
+
dara_core-1.18.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
113
|
+
dara_core-1.18.7.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
|
|
114
|
+
dara_core-1.18.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|