@datagrok/compute 1.43.1 → 1.43.5

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/compute",
3
3
  "friendlyName": "Compute",
4
- "version": "1.43.1",
4
+ "version": "1.43.5",
5
5
  "author": {
6
6
  "name": "Andrey Sharapov",
7
7
  "email": "andrey.sharapov@softwarecountry.com"
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@datagrok-libraries/compute-utils": "^1.43.2",
17
- "@datagrok-libraries/utils": "^4.5.0",
17
+ "@datagrok-libraries/utils": "^4.5.7",
18
18
  "cash-dom": "^8.1.5",
19
19
  "datagrok-api": "^1.25.0",
20
20
  "dayjs": "=1.11.10",
@@ -34,7 +34,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
34
34
 
35
35
  if (!inputData.columns.byName(IS_OUTLIER_COL_LABEL)) {
36
36
  inputData.columns
37
- .add(DG.Column.fromBitSet(IS_OUTLIER_COL_LABEL, DG.BitSet.create(inputData.rowCount, () => false)));
37
+ .add(DG.Column.fromList(DG.TYPE.STRING, IS_OUTLIER_COL_LABEL, new Array(inputData.rowCount).fill('Inlier')));
38
38
  }
39
39
 
40
40
  if (!inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL)) {
@@ -67,13 +67,16 @@ export class OutliersSelectionViewer extends DG.JsViewer {
67
67
  const confirmOutliers = () => {
68
68
  if (!groupsListGrid.dataFrame) return;
69
69
 
70
- inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('true', DG.MARKER_TYPE.OUTLIER);
70
+ inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Outlier', DG.MARKER_TYPE.OUTLIER);
71
+ inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Last Inlier', DG.MARKER_TYPE.STAR);
72
+ inputData.col(IS_OUTLIER_COL_LABEL)?.meta.colors.setCategorical({'Outlier': DG.Color.scatterPlotMarker,
73
+ 'Inlier': DG.Color.scatterPlotMarker, 'Last Inlier': DG.Color.red});
71
74
 
72
75
  const newRationale =
73
76
  groupsListGrid.dataFrame?.cell(groupsListGrid.dataFrame.rowCount-1, OUTLIER_RATIONALE_COL_LABEL).value;
74
77
 
75
78
  inputData.selection.getSelectedIndexes().forEach((selectedIndex: number) => {
76
- inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex, true, false);
79
+ inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex, 'Outlier', false);
77
80
  inputData.col(OUTLIER_RATIONALE_COL_LABEL)!.set(
78
81
  selectedIndex,
79
82
  newRationale,
@@ -89,7 +92,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
89
92
  const cancelOutliers = () => {
90
93
  if (!groupsListGrid.dataFrame) return;
91
94
 
92
- groupsListGrid.dataFrame.rows.removeAt(groupsListGrid.dataFrame.rowCount-1);
95
+ groupsListGrid.dataFrame.rows.removeAt(groupsListGrid.dataFrame.rowCount - 1);
93
96
  inputData.selection.setAll(false);
94
97
 
95
98
  $(getBalloonContainer()).empty();
@@ -113,7 +116,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
113
116
  for (let i = 0; i < inputData.rowCount; i++) {
114
117
  if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === rationale) {
115
118
  inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).set(i, '', false);
116
- inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i, false, false);
119
+ inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i, 'Inlier', false);
117
120
  }
118
121
  }
119
122
  inputData.fireValuesChanged();
@@ -153,7 +156,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
153
156
  const updateGroupsDf = () => {
154
157
  if ((inputData.columns as DG.ColumnList).byName(OUTLIER_RATIONALE_COL_LABEL)) {
155
158
  for (let i = 0; i < inputData.rowCount; i++) {
156
- if (inputData.columns.byName(IS_OUTLIER_COL_LABEL).get(i)) {
159
+ if (inputData.columns.byName(IS_OUTLIER_COL_LABEL).get(i) === 'Outlier') {
157
160
  if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === '')
158
161
  (inputData.columns as DG.ColumnList).byName(OUTLIER_RATIONALE_COL_LABEL).set(i, 'Manual', false);
159
162
  } else {
package/src/package.ts CHANGED
@@ -18,11 +18,6 @@ import {
18
18
  makeRevalidation as makeRevalidationInst,
19
19
  mergeValidationResults as mergeValidationResultsInst,
20
20
  } from '@datagrok-libraries/compute-utils/shared-utils/validation';
21
- export {
22
- makeValidationResult as makeValidationResult2,
23
- makeAdvice as makeAdvice2,
24
- mergeValidationResults as mergeValidationResults2,
25
- } from '@datagrok-libraries/compute-utils/reactive-tree-driver/src/utils';
26
21
  import {ModelCatalogView, ModelHandler, startModelCatalog, makeModelTreeBrowser, renderRestPanel, setModelCatalogEventHandlers, setModelCatalogHandler} from '@datagrok-libraries/compute-utils/model-catalog';
27
22
  import {
28
23
  testPipeline as testPipelineInst,
@@ -101,8 +96,8 @@ export function modelCatalog() {
101
96
 
102
97
  //input: dynamic treeNode
103
98
  //input: view browseView
104
- export async function modelCatalogTreeBrowser(treeNode: DG.TreeViewGroup) {
105
- await makeModelTreeBrowser(treeNode);
99
+ export function modelCatalogTreeBrowser(treeNode: DG.TreeViewGroup) {
100
+ makeModelTreeBrowser(treeNode);
106
101
  }
107
102
 
108
103
  ////
@@ -123,6 +118,10 @@ export const historyInput = UiUtils.historyInput;
123
118
  export const historyInputJSON = UiUtils.historyInputJSON;
124
119
  export const historyPanel = UiUtils.historyPanel;
125
120
 
121
+ // Compatibility for older compute-api
122
+ export const makeAdvice2 = makeAdviceInst;
123
+ export const makeValidationResult2 = makeValidationResultInst;
124
+
126
125
 
127
126
  ////
128
127
  // For testing only