@datagrok/helm 1.0.8 → 2.0.0
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,13 +2,13 @@
|
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"beta": false,
|
|
4
4
|
"friendlyName": "Helm",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
6
|
"description": "",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"datagrok-api": "^1.4.12",
|
|
9
9
|
"cash-dom": "latest",
|
|
10
10
|
"dayjs": "latest",
|
|
11
|
-
"@datagrok-libraries/utils": "
|
|
11
|
+
"@datagrok-libraries/utils": "^1.4.0",
|
|
12
12
|
"@datagrok-libraries/bio": "^2.8.4",
|
|
13
13
|
"ts-loader": "^9.2.5",
|
|
14
14
|
"typescript": "^4.4.2"
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"build": "webpack",
|
|
46
46
|
"debug-local": "grok publish local",
|
|
47
47
|
"release-local": "grok publish local --release",
|
|
48
|
-
"debug-helm-dev": "grok publish dev
|
|
49
|
-
"release-helm-dev": "grok publish dev --
|
|
50
|
-
"debug-helm-public": "grok publish public
|
|
51
|
-
"release-helm-public": "grok publish public --
|
|
48
|
+
"debug-helm-dev": "grok publish dev",
|
|
49
|
+
"release-helm-dev": "grok publish dev --release",
|
|
50
|
+
"debug-helm-public": "grok publish public",
|
|
51
|
+
"release-helm-public": "grok publish public --release",
|
|
52
52
|
"lint": "eslint \"./src/**/*.ts\"",
|
|
53
53
|
"lint-fix": "eslint \"./src/**/*.ts\" --fix",
|
|
54
54
|
"test": "set HOST=dev && jest",
|
package/src/package.ts
CHANGED
|
@@ -26,6 +26,16 @@ export async function initHelm(): Promise<void> {
|
|
|
26
26
|
grid.invalidate();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
//name: initHelp
|
|
30
|
+
export function initHelp(){
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//name: getLru
|
|
35
|
+
export async function getLru() {
|
|
36
|
+
return await grok.functions.call('Bio:Lru');
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
//tags: cellEditor
|
|
30
40
|
//description: Macromolecule
|
|
31
41
|
//input: grid_cell cell
|
|
@@ -43,8 +53,8 @@ export function editMoleculeCell(cell: DG.GridCell): void {
|
|
|
43
53
|
mexfilter: true
|
|
44
54
|
});
|
|
45
55
|
var sizes = app.calculateSizes();
|
|
46
|
-
app.canvas.resize(sizes.rightwidth, sizes.topheight - 210);
|
|
47
|
-
var s = {width: sizes.rightwidth + 'px', height: sizes.bottomheight + 'px'};
|
|
56
|
+
app.canvas.resize(sizes.rightwidth - 100, sizes.topheight - 210);
|
|
57
|
+
var s = {width: sizes.rightwidth - 100 + 'px', height: sizes.bottomheight + 'px'};
|
|
48
58
|
//@ts-ignore
|
|
49
59
|
scil.apply(app.sequence.style, s);
|
|
50
60
|
//@ts-ignore
|
|
@@ -84,8 +94,8 @@ export function editMoleculeCell(cell: DG.GridCell): void {
|
|
|
84
94
|
//tags: panel, widgets
|
|
85
95
|
//input: string helmString {semType: Macromolecule}
|
|
86
96
|
//output: widget result
|
|
87
|
-
export function detailsPanel(helmString: string) {
|
|
88
|
-
|
|
97
|
+
export async function detailsPanel(helmString: string) {
|
|
98
|
+
const lru = await getLru();
|
|
89
99
|
const result = lru.get(helmString).split(',');
|
|
90
100
|
return new DG.Widget(
|
|
91
101
|
ui.tableFromMap({
|
|
@@ -102,7 +112,7 @@ export function detailsPanel(helmString: string) {
|
|
|
102
112
|
}
|
|
103
113
|
|
|
104
114
|
|
|
105
|
-
async function loadDialog
|
|
115
|
+
async function loadDialog() {
|
|
106
116
|
let res = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
107
117
|
let FilesList = await ui.choiceInput('Monomer Libraries', ' ', res);
|
|
108
118
|
let grid = grok.shell.tv.grid;
|
|
@@ -124,7 +134,7 @@ export async function libraryPanel(helmColumn: DG.Column) {
|
|
|
124
134
|
//@ts-ignore
|
|
125
135
|
let loadButton = ui.button('Load Library');
|
|
126
136
|
loadButton.addEventListener('click', loadDialog);
|
|
127
|
-
let list = (await
|
|
137
|
+
let list = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
128
138
|
let usedLibraries = [];
|
|
129
139
|
for (let j = 0; j <= i; j++) {
|
|
130
140
|
usedLibraries.push(await grok.dapi.userDataStorage.getValue(STORAGE_NAME, j.toString(), true));
|
|
@@ -212,11 +222,10 @@ function getRS(smiles: string) {
|
|
|
212
222
|
|
|
213
223
|
async function monomerManager(value: string) {
|
|
214
224
|
let df: any[];
|
|
215
|
-
if(value.endsWith('.sdf')) {
|
|
225
|
+
if (value.endsWith('.sdf')) {
|
|
216
226
|
const file = await _package.files.readAsBytes(`${LIB_PATH}${value}`);
|
|
217
227
|
const dfSdf = await grok.functions.call('Chem:importSdf', {bytes: file});
|
|
218
228
|
df = createJsonMonomerLibFromSdf(dfSdf[0]);
|
|
219
|
-
|
|
220
229
|
} else {
|
|
221
230
|
const file = await _package.files.readAsText(`${LIB_PATH}${value}`);
|
|
222
231
|
df = JSON.parse(file);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=4f0c8bae6479. Commit 529c5bce.</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=
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=4f0c8bae6479. Commit 529c5bce.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-08-01 16:04:09</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">15.037s</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">1.207s</div></div><div class="failureMessages"> <pre class="failureMsg">Error: Test result : Helm.Helm.detectMacromolecule : Error: Expected "Macromolecule", got "null"
|
|
233
233
|
Test result : Helm.Helm.detectHelm : Error: Expected "HELM", got "null"
|
|
234
234
|
|
|
235
235
|
at /home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:67:20
|
package/npmignore
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Developer keys
|
|
2
|
-
upload.keys.json
|
|
3
|
-
|
|
4
|
-
# Dependency directories
|
|
5
|
-
node_modules/
|
|
6
|
-
|
|
7
|
-
# IDEs
|
|
8
|
-
# VS Code (https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore)
|
|
9
|
-
.vscode/*
|
|
10
|
-
!.vscode/settings.json
|
|
11
|
-
!.vscode/tasks.json
|
|
12
|
-
!.vscode/launch.json
|
|
13
|
-
!.vscode/extensions.json
|
|
14
|
-
*.code-workspace
|
|
15
|
-
.history/
|
|
16
|
-
|
|
17
|
-
# Intellij IDEA/WebStorm (https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore)
|
|
18
|
-
.idea/inspectionProfiles/
|
|
19
|
-
.idea/**/compiler.xml
|
|
20
|
-
.idea/**/encodings.xml
|
|
21
|
-
.idea/**/workspace.xml
|
|
22
|
-
.idea/**/tasks.xml
|
|
23
|
-
.idea/**/usage.statistics.xml
|
|
24
|
-
.idea/**/dictionaries
|
|
25
|
-
.idea/**/shelf
|
|
26
|
-
.idea/codeStyles/
|