@datagrok/helm 2.0.1 → 2.0.2
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
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"beta": false,
|
|
4
4
|
"friendlyName": "Helm",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.2",
|
|
6
6
|
"description": "",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"datagrok-api": "^1.
|
|
8
|
+
"datagrok-api": "^1.5.0",
|
|
9
9
|
"cash-dom": "latest",
|
|
10
10
|
"dayjs": "latest",
|
|
11
11
|
"@datagrok-libraries/utils": "^1.4.0",
|
|
12
|
-
"@datagrok-libraries/bio": "^
|
|
12
|
+
"@datagrok-libraries/bio": "^3.0.1",
|
|
13
13
|
"ts-loader": "^9.2.5",
|
|
14
14
|
"typescript": "^4.4.2"
|
|
15
15
|
},
|
package/src/package.ts
CHANGED
|
@@ -3,7 +3,8 @@ import * as grok from 'datagrok-api/grok';
|
|
|
3
3
|
import * as ui from 'datagrok-api/ui';
|
|
4
4
|
import * as DG from 'datagrok-api/dg';
|
|
5
5
|
//import {lru} from '../../Bio/src/utils/cell-renderer';
|
|
6
|
-
import {NotationConverter
|
|
6
|
+
import {NotationConverter} from '@datagrok-libraries/bio/src/utils/notation-converter';
|
|
7
|
+
import {NOTATION} from '@datagrok-libraries/bio/src/utils/units-handler';
|
|
7
8
|
import {WebLogo} from '@datagrok-libraries/bio/src/viewers/web-logo';
|
|
8
9
|
import {createJsonMonomerLibFromSdf} from './utils';
|
|
9
10
|
import {MONOMER_MANAGER_MAP, RGROUPS, RGROUP_CAP_GROUP_NAME, RGROUP_LABEL, SMILES} from './constants';
|
|
@@ -27,7 +28,7 @@ export async function initHelm(): Promise<void> {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
//name: initHelp
|
|
30
|
-
export function initHelp(){
|
|
31
|
+
export function initHelp() {
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -134,19 +135,36 @@ export async function libraryPanel(helmColumn: DG.Column) {
|
|
|
134
135
|
//@ts-ignore
|
|
135
136
|
let loadButton = ui.button('Load Library');
|
|
136
137
|
loadButton.addEventListener('click', loadDialog);
|
|
138
|
+
//@ts-ignore
|
|
139
|
+
let filesButton = ui.button('Manage');
|
|
140
|
+
filesButton.addEventListener('click', manageFiles);
|
|
137
141
|
let list = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
138
142
|
let usedLibraries = [];
|
|
139
143
|
for (let j = 0; j <= i; j++) {
|
|
140
144
|
usedLibraries.push(await grok.dapi.userDataStorage.getValue(STORAGE_NAME, j.toString(), true));
|
|
141
145
|
}
|
|
142
146
|
let unusedLibraries = list.filter(x => !usedLibraries.includes(x));
|
|
143
|
-
return new DG.Widget(
|
|
144
|
-
ui.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
return new DG.Widget(ui.splitV([
|
|
148
|
+
ui.splitH([
|
|
149
|
+
ui.tableFromMap({
|
|
150
|
+
'Uploaded libraries': ui.divText(usedLibraries.toString()),
|
|
151
|
+
'Not used libraries': ui.divText(unusedLibraries.toString()),
|
|
152
|
+
})
|
|
153
|
+
]),
|
|
154
|
+
ui.splitH([
|
|
155
|
+
ui.divH([loadButton]),
|
|
156
|
+
ui.divH([filesButton]),
|
|
157
|
+
])
|
|
158
|
+
]));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//name: manageFiles
|
|
162
|
+
function manageFiles() {
|
|
163
|
+
const a = ui.dialog({title: 'Manage files'})
|
|
164
|
+
//@ts-ignore
|
|
165
|
+
.add(ui.fileBrowser({path: 'System:AppData/Helm/libraries'}).root)
|
|
166
|
+
.addButton('OK', () => a.close())
|
|
167
|
+
.show();
|
|
150
168
|
}
|
|
151
169
|
|
|
152
170
|
async function accessServer(url: string, key: string) {
|
|
@@ -301,3 +319,10 @@ class HelmCellRenderer extends DG.GridCellRenderer {
|
|
|
301
319
|
lru.set(gridCell.cell.value, result);
|
|
302
320
|
}
|
|
303
321
|
}
|
|
322
|
+
|
|
323
|
+
//name: getMonomerLib
|
|
324
|
+
//input: string type
|
|
325
|
+
//output: string monomerSetJSON
|
|
326
|
+
export function getMonomerLib(type: string): string {
|
|
327
|
+
return JSON.stringify(scil.helm.Monomers.getMonomerSet(type));
|
|
328
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=4f0c8bae6479. Commit
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=4f0c8bae6479. Commit a2fd943e.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,7 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=4f0c8bae6479. Commit
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=4f0c8bae6479. Commit a2fd943e.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-08-04 07:38:43</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts</div><div class="suite-time warn">14.855s</div></div><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">failed</div><div class="test-duration">0.393s</div></div><div class="failureMessages"> <pre class="failureMsg">Error: Evaluation failed: TypeError: Cannot read properties of null (reading 'columns')
|
|
233
233
|
at __puppeteer_evaluation_script__:4:34
|
|
234
234
|
at ExecutionContext._evaluateInternal (/home/runner/work/public/public/packages/Helm/node_modules/puppeteer/src/common/ExecutionContext.ts:273:13)
|
|
235
235
|
at processTicksAndRejections (internal/process/task_queues.js:97:5)
|