@mat3ra/wode 2026.8.29-0 → 2026.10.8-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/dist/js/Subworkflow.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ type ConvergenceConfig = {
|
|
|
25
25
|
maxOccurrences: number;
|
|
26
26
|
externalContext: SubworkflowExternalContext;
|
|
27
27
|
};
|
|
28
|
-
interface Subworkflow extends Defaultable, NamedEntity, SubworkflowSchemaMixin, HashedEntity,
|
|
28
|
+
interface Subworkflow extends Defaultable, NamedEntity, SubworkflowSchemaMixin, HashedEntity, ComputedEntityMixin<SubworkflowSchemaMixin["compute"]> {
|
|
29
29
|
}
|
|
30
30
|
type SubworkflowExternalContext = WorkflowRenderContext & WorkflowExternalContext;
|
|
31
31
|
export type SubworkflowEntity = SubworkflowSchema & BaseInMemoryEntitySchema;
|
package/dist/js/Workflow.d.ts
CHANGED
|
@@ -20,8 +20,7 @@ import { type AnyWorkflowUnit } from "./units/factory";
|
|
|
20
20
|
import type { WorkflowSchema } from "./workflows/types";
|
|
21
21
|
export type WorkflowEntity = WorkflowSchema & BaseInMemoryEntitySchema;
|
|
22
22
|
type Schema = WorkflowEntity;
|
|
23
|
-
interface Workflow extends Defaultable, NamedEntity, WorkflowSchemaMixin, Taggable, HashedEntity, ComputedEntityMixin
|
|
24
|
-
compute: WorkflowSchema["compute"];
|
|
23
|
+
interface Workflow extends Defaultable, NamedEntity, WorkflowSchemaMixin, Taggable, HashedEntity, ComputedEntityMixin<WorkflowSchema["compute"]>, HasDescription {
|
|
25
24
|
}
|
|
26
25
|
/** Context passed to Workflow.render(); subworkflows also receive `workflowHasRelaxation`. */
|
|
27
26
|
export type WorkflowRenderContext = MaterialExternalContext & MaterialsExternalContext & MaterialsSetExternalContext & JobExternalContext & {
|
package/dist/js/Workflow.js
CHANGED
|
@@ -246,7 +246,12 @@ class Workflow extends entity_1.InMemoryEntity {
|
|
|
246
246
|
else {
|
|
247
247
|
const vcRelax = this.getStandataRelaxationSubworkflow();
|
|
248
248
|
if (vcRelax) {
|
|
249
|
-
this.
|
|
249
|
+
const application = structuredClone(this.subworkflowInstances[0].application);
|
|
250
|
+
this.addSubworkflow(new Subworkflow_1.default({
|
|
251
|
+
...vcRelax,
|
|
252
|
+
application,
|
|
253
|
+
units: vcRelax.units.map((unit) => unit.type === enums_1.UnitType.execution ? { ...unit, application } : unit),
|
|
254
|
+
}), true);
|
|
250
255
|
}
|
|
251
256
|
}
|
|
252
257
|
}
|
|
@@ -263,14 +268,11 @@ class Workflow extends entity_1.InMemoryEntity {
|
|
|
263
268
|
if (!subworkflow) {
|
|
264
269
|
return undefined;
|
|
265
270
|
}
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
271
|
+
const hasExecutionUnit = subworkflow.units.some((unit) => unit.type === enums_1.UnitType.execution);
|
|
272
|
+
if (!hasExecutionUnit) {
|
|
268
273
|
throw new Error("Relaxation subworkflow is missing an execution unit");
|
|
269
274
|
}
|
|
270
|
-
return
|
|
271
|
-
...subworkflow,
|
|
272
|
-
application: executionUnit.application,
|
|
273
|
-
};
|
|
275
|
+
return subworkflow;
|
|
274
276
|
}
|
|
275
277
|
getRelaxationSubworkflow() {
|
|
276
278
|
const standataSubworkflow = this.getStandataRelaxationSubworkflow();
|
|
@@ -8,9 +8,9 @@ const defaultWorkflowConfig = {
|
|
|
8
8
|
_id: "c6e9dbbee8929de01f4e76ee",
|
|
9
9
|
application: {
|
|
10
10
|
name: "espresso",
|
|
11
|
-
shortName: "
|
|
12
|
-
summary: "Quantum
|
|
13
|
-
build: "
|
|
11
|
+
shortName: "qe",
|
|
12
|
+
summary: "Quantum ESPRESSO",
|
|
13
|
+
build: "GNU",
|
|
14
14
|
version: "6.3",
|
|
15
15
|
},
|
|
16
16
|
model: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mat3ra/wode",
|
|
3
|
-
"version": "2026.8
|
|
3
|
+
"version": "2026.10.8-0",
|
|
4
4
|
"description": "WOrkflow DEfinitions",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "mocha --recursive --bail --require ts-node/register 'tests/js/**/*.ts'",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@mat3ra/ade": "2026.8.18-0",
|
|
45
45
|
"@mat3ra/code": "2026.8.18-0",
|
|
46
46
|
"@mat3ra/esse": "2026.8.18-2",
|
|
47
|
-
"@mat3ra/ide": "2026.8
|
|
47
|
+
"@mat3ra/ide": "2026.10.8-0",
|
|
48
48
|
"@mat3ra/made": "2026.8.18-0",
|
|
49
49
|
"@mat3ra/mode": "2026.8.18-0",
|
|
50
50
|
"@mat3ra/prode": "2026.8.18-0",
|
package/src/js/Subworkflow.ts
CHANGED
|
@@ -56,7 +56,7 @@ interface Subworkflow
|
|
|
56
56
|
NamedEntity,
|
|
57
57
|
SubworkflowSchemaMixin,
|
|
58
58
|
HashedEntity,
|
|
59
|
-
|
|
59
|
+
ComputedEntityMixin<SubworkflowSchemaMixin["compute"]> {}
|
|
60
60
|
|
|
61
61
|
type SubworkflowExternalContext = WorkflowRenderContext & WorkflowExternalContext;
|
|
62
62
|
|
package/src/js/Workflow.ts
CHANGED
|
@@ -59,11 +59,8 @@ interface Workflow
|
|
|
59
59
|
WorkflowSchemaMixin,
|
|
60
60
|
Taggable,
|
|
61
61
|
HashedEntity,
|
|
62
|
-
ComputedEntityMixin
|
|
63
|
-
HasDescription {
|
|
64
|
-
// TODO: fix ComputedEntityMixin and remove this
|
|
65
|
-
compute: WorkflowSchema["compute"];
|
|
66
|
-
}
|
|
62
|
+
ComputedEntityMixin<WorkflowSchema["compute"]>,
|
|
63
|
+
HasDescription {}
|
|
67
64
|
|
|
68
65
|
/** Context passed to Workflow.render(); subworkflows also receive `workflowHasRelaxation`. */
|
|
69
66
|
export type WorkflowRenderContext = MaterialExternalContext &
|
|
@@ -347,7 +344,17 @@ class Workflow<S extends Schema = Schema> extends InMemoryEntity<S> implements W
|
|
|
347
344
|
} else {
|
|
348
345
|
const vcRelax = this.getStandataRelaxationSubworkflow();
|
|
349
346
|
if (vcRelax) {
|
|
350
|
-
this.
|
|
347
|
+
const application = structuredClone(this.subworkflowInstances[0].application);
|
|
348
|
+
this.addSubworkflow(
|
|
349
|
+
new Subworkflow({
|
|
350
|
+
...vcRelax,
|
|
351
|
+
application,
|
|
352
|
+
units: vcRelax.units.map((unit) =>
|
|
353
|
+
unit.type === UnitType.execution ? { ...unit, application } : unit,
|
|
354
|
+
),
|
|
355
|
+
}),
|
|
356
|
+
true,
|
|
357
|
+
);
|
|
351
358
|
}
|
|
352
359
|
}
|
|
353
360
|
}
|
|
@@ -370,15 +377,12 @@ class Workflow<S extends Schema = Schema> extends InMemoryEntity<S> implements W
|
|
|
370
377
|
return undefined;
|
|
371
378
|
}
|
|
372
379
|
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
380
|
+
const hasExecutionUnit = subworkflow.units.some((unit) => unit.type === UnitType.execution);
|
|
381
|
+
if (!hasExecutionUnit) {
|
|
375
382
|
throw new Error("Relaxation subworkflow is missing an execution unit");
|
|
376
383
|
}
|
|
377
384
|
|
|
378
|
-
return
|
|
379
|
-
...subworkflow,
|
|
380
|
-
application: executionUnit.application,
|
|
381
|
-
};
|
|
385
|
+
return subworkflow;
|
|
382
386
|
}
|
|
383
387
|
|
|
384
388
|
private getRelaxationSubworkflow() {
|
|
@@ -8,9 +8,9 @@ const defaultWorkflowConfig: WorkflowSchema = {
|
|
|
8
8
|
_id: "c6e9dbbee8929de01f4e76ee",
|
|
9
9
|
application: {
|
|
10
10
|
name: "espresso",
|
|
11
|
-
shortName: "
|
|
12
|
-
summary: "Quantum
|
|
13
|
-
build: "
|
|
11
|
+
shortName: "qe",
|
|
12
|
+
summary: "Quantum ESPRESSO",
|
|
13
|
+
build: "GNU",
|
|
14
14
|
version: "6.3",
|
|
15
15
|
},
|
|
16
16
|
model: {
|