@mat3ra/wode 2026.8.29-0 → 2026.9.2-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.
@@ -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.addSubworkflow(new Subworkflow_1.default(vcRelax), true);
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 executionUnit = subworkflow.units.find((unit) => unit.type === enums_1.UnitType.execution);
267
- if (!executionUnit) {
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: "espresso",
12
- summary: "Quantum Espresso",
13
- build: "6.3",
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.29-0",
3
+ "version": "2026.9.2-0",
4
4
  "description": "WOrkflow DEfinitions",
5
5
  "scripts": {
6
6
  "test": "mocha --recursive --bail --require ts-node/register 'tests/js/**/*.ts'",
@@ -347,7 +347,17 @@ class Workflow<S extends Schema = Schema> extends InMemoryEntity<S> implements W
347
347
  } else {
348
348
  const vcRelax = this.getStandataRelaxationSubworkflow();
349
349
  if (vcRelax) {
350
- this.addSubworkflow(new Subworkflow(vcRelax), true);
350
+ const application = structuredClone(this.subworkflowInstances[0].application);
351
+ this.addSubworkflow(
352
+ new Subworkflow({
353
+ ...vcRelax,
354
+ application,
355
+ units: vcRelax.units.map((unit) =>
356
+ unit.type === UnitType.execution ? { ...unit, application } : unit,
357
+ ),
358
+ }),
359
+ true,
360
+ );
351
361
  }
352
362
  }
353
363
  }
@@ -370,15 +380,12 @@ class Workflow<S extends Schema = Schema> extends InMemoryEntity<S> implements W
370
380
  return undefined;
371
381
  }
372
382
 
373
- const executionUnit = subworkflow.units.find((unit) => unit.type === UnitType.execution);
374
- if (!executionUnit) {
383
+ const hasExecutionUnit = subworkflow.units.some((unit) => unit.type === UnitType.execution);
384
+ if (!hasExecutionUnit) {
375
385
  throw new Error("Relaxation subworkflow is missing an execution unit");
376
386
  }
377
387
 
378
- return {
379
- ...subworkflow,
380
- application: executionUnit.application,
381
- };
388
+ return subworkflow;
382
389
  }
383
390
 
384
391
  private getRelaxationSubworkflow() {
@@ -8,9 +8,9 @@ const defaultWorkflowConfig: WorkflowSchema = {
8
8
  _id: "c6e9dbbee8929de01f4e76ee",
9
9
  application: {
10
10
  name: "espresso",
11
- shortName: "espresso",
12
- summary: "Quantum Espresso",
13
- build: "6.3",
11
+ shortName: "qe",
12
+ summary: "Quantum ESPRESSO",
13
+ build: "GNU",
14
14
  version: "6.3",
15
15
  },
16
16
  model: {