@datagrok/helm 1.0.7 → 1.0.10
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/dist/package-test.js +425 -0
- package/dist/package.js +2337 -0
- package/files/{HELMCoreLibrary.json → libraries/HELMCoreLibrary.json} +0 -0
- package/package.json +6 -6
- package/src/package.ts +12 -8
- package/{test-Helm-34f75e5127b8-30bac77e.html → test-Helm-34f75e5127b8-c2851674.html} +2 -2
- package/npmignore +0 -26
|
File without changes
|
package/package.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"beta": false,
|
|
4
4
|
"friendlyName": "Helm",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.10",
|
|
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,11 @@ export async function initHelm(): Promise<void> {
|
|
|
26
26
|
grid.invalidate();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
//name: getLru
|
|
30
|
+
export async function getLru() {
|
|
31
|
+
return await grok.functions.call('Bio:Lru');
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
//tags: cellEditor
|
|
30
35
|
//description: Macromolecule
|
|
31
36
|
//input: grid_cell cell
|
|
@@ -43,8 +48,8 @@ export function editMoleculeCell(cell: DG.GridCell): void {
|
|
|
43
48
|
mexfilter: true
|
|
44
49
|
});
|
|
45
50
|
var sizes = app.calculateSizes();
|
|
46
|
-
app.canvas.resize(sizes.rightwidth, sizes.topheight - 210);
|
|
47
|
-
var s = {width: sizes.rightwidth + 'px', height: sizes.bottomheight + 'px'};
|
|
51
|
+
app.canvas.resize(sizes.rightwidth - 100, sizes.topheight - 210);
|
|
52
|
+
var s = {width: sizes.rightwidth - 100 + 'px', height: sizes.bottomheight + 'px'};
|
|
48
53
|
//@ts-ignore
|
|
49
54
|
scil.apply(app.sequence.style, s);
|
|
50
55
|
//@ts-ignore
|
|
@@ -84,8 +89,8 @@ export function editMoleculeCell(cell: DG.GridCell): void {
|
|
|
84
89
|
//tags: panel, widgets
|
|
85
90
|
//input: string helmString {semType: Macromolecule}
|
|
86
91
|
//output: widget result
|
|
87
|
-
export function detailsPanel(helmString: string) {
|
|
88
|
-
|
|
92
|
+
export async function detailsPanel(helmString: string) {
|
|
93
|
+
const lru = await getLru();
|
|
89
94
|
const result = lru.get(helmString).split(',');
|
|
90
95
|
return new DG.Widget(
|
|
91
96
|
ui.tableFromMap({
|
|
@@ -102,7 +107,7 @@ export function detailsPanel(helmString: string) {
|
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
|
|
105
|
-
async function loadDialog
|
|
110
|
+
async function loadDialog() {
|
|
106
111
|
let res = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
107
112
|
let FilesList = await ui.choiceInput('Monomer Libraries', ' ', res);
|
|
108
113
|
let grid = grok.shell.tv.grid;
|
|
@@ -124,7 +129,7 @@ export async function libraryPanel(helmColumn: DG.Column) {
|
|
|
124
129
|
//@ts-ignore
|
|
125
130
|
let loadButton = ui.button('Load Library');
|
|
126
131
|
loadButton.addEventListener('click', loadDialog);
|
|
127
|
-
let list = (await
|
|
132
|
+
let list = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
128
133
|
let usedLibraries = [];
|
|
129
134
|
for (let j = 0; j <= i; j++) {
|
|
130
135
|
usedLibraries.push(await grok.dapi.userDataStorage.getValue(STORAGE_NAME, j.toString(), true));
|
|
@@ -212,11 +217,10 @@ function getRS(smiles: string) {
|
|
|
212
217
|
|
|
213
218
|
async function monomerManager(value: string) {
|
|
214
219
|
let df: any[];
|
|
215
|
-
if(value.endsWith('.sdf')) {
|
|
220
|
+
if (value.endsWith('.sdf')) {
|
|
216
221
|
const file = await _package.files.readAsBytes(`${LIB_PATH}${value}`);
|
|
217
222
|
const dfSdf = await grok.functions.call('Chem:importSdf', {bytes: file});
|
|
218
223
|
df = createJsonMonomerLibFromSdf(dfSdf[0]);
|
|
219
|
-
|
|
220
224
|
} else {
|
|
221
225
|
const file = await _package.files.readAsText(`${LIB_PATH}${value}`);
|
|
222
226
|
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=34f75e5127b8. Commit
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit c2851674.</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=34f75e5127b8. Commit
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit c2851674.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-07-27 13:34:55</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">12.359s</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.302s</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/
|