@mat3ra/esse 2026.2.25-0 → 2026.3.7-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.
Files changed (58) hide show
  1. package/dist/js/schema/compute/nodes/base.json +57 -0
  2. package/dist/js/schema/compute/nodes/cluster.json +137 -0
  3. package/dist/js/schema/compute/queue.json +69 -0
  4. package/dist/js/schema/in_memory_entity/named_defaultable_runtime_items.json +4 -0
  5. package/dist/js/schema/job/base.json +0 -6
  6. package/dist/js/schema/job/compute.json +0 -6
  7. package/dist/js/schema/job.json +120 -30
  8. package/dist/js/schema/properties_directory/non_scalar/workflow.json +120 -24
  9. package/dist/js/schema/property/holder.json +120 -24
  10. package/dist/js/schema/software/application/build_config.json +39 -0
  11. package/dist/js/schema/software/application.json +5 -6
  12. package/dist/js/schema/software/application_with_build_config.json +95 -0
  13. package/dist/js/schema/software/executable.json +4 -0
  14. package/dist/js/schema/software/flavor.json +4 -0
  15. package/dist/js/schema/software/template.json +1 -0
  16. package/dist/js/schema/software_directory/modeling/deepmd.json +5 -6
  17. package/dist/js/schema/software_directory/modeling/nwchem.json +5 -6
  18. package/dist/js/schema/software_directory/modeling/unit/execution.json +17 -6
  19. package/dist/js/schema/software_directory/modeling/vasp.json +5 -6
  20. package/dist/js/schema/software_directory/scripting/jupyter_lab.json +5 -6
  21. package/dist/js/schema/software_directory/scripting/python.json +5 -6
  22. package/dist/js/schema/software_directory/scripting/shell.json +5 -6
  23. package/dist/js/schema/software_directory/scripting/unit/execution.json +17 -6
  24. package/dist/js/schema/workflow/base.json +21 -0
  25. package/dist/js/schema/workflow/base_flow.json +0 -6
  26. package/dist/js/schema/workflow/subworkflow/unit.json +41 -6
  27. package/dist/js/schema/workflow/subworkflow.json +50 -18
  28. package/dist/js/schema/workflow/unit/assertion.json +4 -0
  29. package/dist/js/schema/workflow/unit/assignment.json +4 -0
  30. package/dist/js/schema/workflow/unit/base.json +4 -0
  31. package/dist/js/schema/workflow/unit/condition.json +4 -0
  32. package/dist/js/schema/workflow/unit/execution.json +17 -6
  33. package/dist/js/schema/workflow/unit/io.json +4 -0
  34. package/dist/js/schema/workflow/unit/map.json +4 -0
  35. package/dist/js/schema/workflow/unit/processing.json +4 -0
  36. package/dist/js/schema/workflow/unit/reduce.json +4 -0
  37. package/dist/js/schema/workflow/unit/runtime/_runtime_item_name_object.json +1 -0
  38. package/dist/js/schema/workflow/unit/runtime/runtime_item.json +1 -0
  39. package/dist/js/schema/workflow/unit/runtime/runtime_items.json +4 -0
  40. package/dist/js/schema/workflow/unit/subworkflow.json +4 -0
  41. package/dist/js/schema/workflow/unit.json +49 -6
  42. package/dist/js/schema/workflow.json +120 -24
  43. package/dist/js/schemas.json +1 -1
  44. package/dist/js/types.d.ts +981 -136
  45. package/dist/js/utils/ajv.d.ts +4 -2
  46. package/dist/js/utils/ajv.js +22 -7
  47. package/package.json +2 -2
  48. package/schema/compute/nodes/base.json +57 -0
  49. package/schema/compute/nodes/cluster.json +29 -0
  50. package/schema/compute/queue.json +69 -0
  51. package/schema/job/compute.json +1 -29
  52. package/schema/software/application/build_config.json +39 -0
  53. package/schema/software/application.json +5 -2
  54. package/schema/software/application_with_build_config.json +18 -0
  55. package/schema/workflow/base.json +21 -0
  56. package/schema/workflow/subworkflow.json +4 -0
  57. package/schema/workflow/unit/runtime/_runtime_item_name_object.json +1 -0
  58. package/src/js/utils/ajv.ts +27 -7
@@ -4,8 +4,9 @@ import { AnyObject } from "../esse/types";
4
4
  interface AjvInstanceOptions {
5
5
  clean: boolean;
6
6
  coerceTypes: boolean;
7
+ useDefaults: boolean;
7
8
  }
8
- export declare function getValidator(jsonSchema: SchemaObject, { clean, coerceTypes }: AjvInstanceOptions): AnyValidateFunction;
9
+ export declare function getValidator(jsonSchema: SchemaObject, { clean, coerceTypes, useDefaults, }: Omit<AjvInstanceOptions, "useDefaults"> & Partial<Pick<AjvInstanceOptions, "useDefaults">>): AnyValidateFunction;
9
10
  /**
10
11
  * Validates a given example against the schema.
11
12
  * @param example example to validate.
@@ -22,8 +23,9 @@ export declare function validate(data: AnyObject, jsonSchema: SchemaObject): {
22
23
  * @param schema schema to validate the example with.
23
24
  * @returns whether example is valid.
24
25
  */
25
- export declare function validateAndClean(data: AnyObject, jsonSchema: SchemaObject, { coerceTypes }: {
26
+ export declare function validateAndClean(data: AnyObject, jsonSchema: SchemaObject, { coerceTypes, useDefaults }?: {
26
27
  coerceTypes?: boolean | undefined;
28
+ useDefaults?: boolean | undefined;
27
29
  }): {
28
30
  isValid: boolean | Promise<any>;
29
31
  errors: import("ajv").ErrorObject<string, Record<string, any>, unknown>[] | null | undefined;
@@ -33,26 +33,41 @@ const ajvConfig = {
33
33
  };
34
34
  const ajvValidator = new ajv_1.default({ ...ajvConfig });
35
35
  const ajvValidatorAndCleaner = new ajv_1.default({ ...ajvConfig, removeAdditional: true });
36
+ const ajvValidatorAndCleanerNoDefaults = new ajv_1.default({
37
+ ...ajvConfig,
38
+ removeAdditional: true,
39
+ useDefaults: false,
40
+ });
36
41
  const ajvValidatorAndCleanerWithCoercingTypes = new ajv_1.default({
37
42
  ...ajvConfig,
38
43
  removeAdditional: true,
39
44
  coerceTypes: true,
40
45
  });
46
+ const ajvValidatorAndCleanerWithCoercingTypesNoDefaults = new ajv_1.default({
47
+ ...ajvConfig,
48
+ removeAdditional: true,
49
+ coerceTypes: true,
50
+ useDefaults: false,
51
+ });
41
52
  (0, ajv_formats_1.default)(ajvValidator);
42
53
  (0, ajv_formats_1.default)(ajvValidatorAndCleaner);
54
+ (0, ajv_formats_1.default)(ajvValidatorAndCleanerNoDefaults);
43
55
  (0, ajv_formats_1.default)(ajvValidatorAndCleanerWithCoercingTypes);
44
- function getAjvInstance({ clean, coerceTypes }) {
56
+ (0, ajv_formats_1.default)(ajvValidatorAndCleanerWithCoercingTypesNoDefaults);
57
+ function getAjvInstance({ clean, coerceTypes, useDefaults }) {
45
58
  if (clean && coerceTypes) {
46
- return ajvValidatorAndCleanerWithCoercingTypes;
59
+ return useDefaults
60
+ ? ajvValidatorAndCleanerWithCoercingTypes
61
+ : ajvValidatorAndCleanerWithCoercingTypesNoDefaults;
47
62
  }
48
63
  if (clean) {
49
- return ajvValidatorAndCleaner;
64
+ return useDefaults ? ajvValidatorAndCleaner : ajvValidatorAndCleanerNoDefaults;
50
65
  }
51
66
  return ajvValidator;
52
67
  }
53
- function getValidator(jsonSchema, { clean, coerceTypes }) {
68
+ function getValidator(jsonSchema, { clean, coerceTypes, useDefaults = true, }) {
54
69
  const schemaKey = jsonSchema.$id;
55
- const ajv = getAjvInstance({ clean, coerceTypes });
70
+ const ajv = getAjvInstance({ clean, coerceTypes, useDefaults });
56
71
  let validate = ajv.getSchema(schemaKey);
57
72
  if (!validate) {
58
73
  // properties that were not defined in schema will be ignored when clean = false
@@ -87,8 +102,8 @@ exports.validate = validate;
87
102
  * @param schema schema to validate the example with.
88
103
  * @returns whether example is valid.
89
104
  */
90
- function validateAndClean(data, jsonSchema, { coerceTypes = false }) {
91
- const validator = getValidator(jsonSchema, { clean: true, coerceTypes });
105
+ function validateAndClean(data, jsonSchema, { coerceTypes = false, useDefaults = true } = {}) {
106
+ const validator = getValidator(jsonSchema, { clean: true, coerceTypes, useDefaults });
92
107
  const isValid = validator(data);
93
108
  return {
94
109
  isValid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mat3ra/esse",
3
- "version": "2026.2.25-0",
3
+ "version": "2026.3.7-0",
4
4
  "description": "Mat3ra's Excellent Source of Schemas and Examples (ESSE) for Digital Materials R&D",
5
5
  "scripts": {
6
6
  "transpile": "tsc -p tsconfig-transpile.json",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "license": "Apache-2.0",
60
60
  "dependencies": {
61
- "@mat3ra/utils": "^2025.11.20-0",
61
+ "@mat3ra/utils": "2026.3.7-0",
62
62
  "@babel/cli": "^7.27.0",
63
63
  "@babel/core": "^7.26.10",
64
64
  "@babel/eslint-parser": "^7.27.0",
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "compute/nodes/base",
4
+ "description": "Cloud Node - base schema for all backend node types",
5
+ "type": "object",
6
+ "title": "cloud node schema",
7
+ "properties": {
8
+ "hostname": {
9
+ "type": "string",
10
+ "title": "Hostname",
11
+ "description": "Fully qualified domain name of the node"
12
+ },
13
+ "alias": {
14
+ "type": "string",
15
+ "title": "Alias",
16
+ "description": "Human-readable display name for the node"
17
+ },
18
+ "timestamp": {
19
+ "type": "number",
20
+ "description": "Unix timestamp of last heartbeat from the node"
21
+ },
22
+ "type": {
23
+ "type": "string",
24
+ "enum": [
25
+ "cluster",
26
+ "gold",
27
+ "login"
28
+ ],
29
+ "description": "Type of cloud node: cluster (compute), gold (billing), or login (SSH access)"
30
+ },
31
+ "isDefault": {
32
+ "type": "boolean",
33
+ "description": "Whether this is the default node for its type"
34
+ },
35
+ "diskSpace": {
36
+ "type": "array",
37
+ "description": "Disk space information for mounted filesystems",
38
+ "items": {
39
+ "type": "object",
40
+ "properties": {
41
+ "name": {
42
+ "type": "string"
43
+ },
44
+ "size": {
45
+ "type": "number"
46
+ },
47
+ "avail": {
48
+ "type": "number"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "required": [
55
+ "hostname"
56
+ ]
57
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "compute/nodes/cluster",
4
+ "description": "Cluster Node - extends cloud node with compute-specific properties",
5
+ "type": "object",
6
+ "title": "cluster node schema",
7
+ "allOf": [
8
+ {
9
+ "$ref": "./base.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "nodes": {
14
+ "type": "array",
15
+ "description": "List of compute nodes in the cluster",
16
+ "items": {
17
+ "type": "object"
18
+ }
19
+ },
20
+ "queues": {
21
+ "type": "array",
22
+ "title": "Queues",
23
+ "description": "Available job submission queues on this cluster",
24
+ "items": {
25
+ "$ref": "../queue.json"
26
+ }
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$id": "compute/queue",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "Queue schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "description": "Name of the submission queues: https://docs.mat3ra.com/infrastructure/resource/queues/. Below enums are for Azure, then AWS circa 2022-08, hence the duplication.",
9
+ "type": "string",
10
+ "enum": [
11
+ "D",
12
+ "OR",
13
+ "OF",
14
+ "OFplus",
15
+ "SR",
16
+ "SF",
17
+ "SFplus",
18
+ "OR4",
19
+ "OR8",
20
+ "OR16",
21
+ "SR4",
22
+ "SR8",
23
+ "SR16",
24
+ "GOF",
25
+ "G4OF",
26
+ "G8OF",
27
+ "GSF",
28
+ "G4SF",
29
+ "G8SF"
30
+ ]
31
+ },
32
+ "maxPPN": {
33
+ "description": "Maximum processors per node.",
34
+ "type": "integer"
35
+ },
36
+ "maxNodes": {
37
+ "description": "Maximum number of nodes allowed for this queue.",
38
+ "type": "integer"
39
+ },
40
+ "availableNodes": {
41
+ "description": "Number of nodes currently available.",
42
+ "type": "integer"
43
+ },
44
+ "currentNodes": {
45
+ "description": "Number of nodes currently in use.",
46
+ "type": "integer"
47
+ },
48
+ "capacity": {
49
+ "description": "Capacity status of the queue.",
50
+ "type": "string",
51
+ "enum": [
52
+ "FULL",
53
+ "DEGRADED",
54
+ "UNAVAILABLE"
55
+ ]
56
+ },
57
+ "displayName": {
58
+ "type": "string",
59
+ "title": "Display name"
60
+ }
61
+ },
62
+ "required": [
63
+ "name",
64
+ "maxPPN",
65
+ "maxNodes",
66
+ "availableNodes",
67
+ "currentNodes"
68
+ ]
69
+ }
@@ -6,35 +6,7 @@
6
6
  "type": "object",
7
7
  "properties": {
8
8
  "queue": {
9
- "description": "Name of the submission queues: https://docs.mat3ra.com/infrastructure/resource/queues/. Below enums are for Azure, then AWS circa 2022-08, hence the duplication.",
10
- "type": "string",
11
- "enum": [
12
- "D",
13
- "OR",
14
- "OF",
15
- "OFplus",
16
- "SR",
17
- "SF",
18
- "SFplus",
19
- "GPOF",
20
- "GP2OF",
21
- "GP4OF",
22
- "GPSF",
23
- "GP2SF",
24
- "GP4SF",
25
- "OR4",
26
- "OR8",
27
- "OR16",
28
- "SR4",
29
- "SR8",
30
- "SR16",
31
- "GOF",
32
- "G4OF",
33
- "G8OF",
34
- "GSF",
35
- "G4SF",
36
- "G8SF"
37
- ]
9
+ "$ref": "../compute/queue.json#properties/name"
38
10
  },
39
11
  "nodes": {
40
12
  "description": "number of nodes used for the job inside the RMS.",
@@ -0,0 +1,39 @@
1
+ {
2
+ "$id": "software/application/build-config",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "application versions with build config schema",
5
+ "type": "object",
6
+ "properties": {
7
+ "bio": {
8
+ "description": "The bio description used for the module files.",
9
+ "type": "string"
10
+ },
11
+ "moduleName": {
12
+ "description": "Modulefile name specific to application version and build type.",
13
+ "type": "string"
14
+ },
15
+ "imageName": {
16
+ "description": "Apptainer image name.",
17
+ "type": "string"
18
+ },
19
+ "imageTag": {
20
+ "description": "Apptainer image tag.",
21
+ "type": "string"
22
+ },
23
+ "dependencies": {
24
+ "description": "List of modulefile dependencies.",
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "environmentVariables": {
31
+ "description": "Environment variables to be exported before running the application, containing the key and value pairs.",
32
+ "type": "object"
33
+ },
34
+ "prependVariables": {
35
+ "description": "Variables to be prepended to the existing environment variable before running the application, containing the key and value pairs, e.g., PATH, LD_LIBRARY_PATH, etc.",
36
+ "type": "object"
37
+ }
38
+ }
39
+ }
@@ -25,6 +25,10 @@
25
25
  "description": "Application build. e.g. VTST",
26
26
  "type": "string"
27
27
  },
28
+ "isDefault": {
29
+ "description": "Whether the build is the default build",
30
+ "type": "boolean"
31
+ },
28
32
  "hasAdvancedComputeOptions": {
29
33
  "description": "Whether advanced compute options are present",
30
34
  "type": "boolean"
@@ -33,6 +37,5 @@
33
37
  "description": "Whether licensing is present",
34
38
  "type": "boolean"
35
39
  }
36
- },
37
- "additionalProperties": true
40
+ }
38
41
  }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$id": "software/application-with-build-config",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "title": "application with build config schema",
5
+ "type": "object",
6
+ "allOf": [
7
+ {
8
+ "$ref": "application.json"
9
+ }
10
+ ],
11
+ "properties": {
12
+ "buildConfig": {
13
+ "description": "Build configuration for the application.",
14
+ "type": "object",
15
+ "$ref": "application/build_config.json"
16
+ }
17
+ }
18
+ }
@@ -28,12 +28,33 @@
28
28
  "description": "Whether to use the dataset tab in the job designer. Mutually exclusive with using the materials tab.",
29
29
  "type": "boolean"
30
30
  },
31
+ "isMultiMaterial": {
32
+ "description": "Defines whether the workflow is for a multi-material simulation",
33
+ "type": "boolean"
34
+ },
31
35
  "workflows": {
32
36
  "description": "Array of workflows with the same schema as the current one.",
33
37
  "type": "array",
34
38
  "items": {
35
39
  "type": "object"
36
40
  }
41
+ },
42
+ "application": {
43
+ "description": "information about the main application used for workflow categorization by application in standata.",
44
+ "type": "object",
45
+ "properties": {
46
+ "name": {
47
+ "description": "name of the application",
48
+ "type": "string"
49
+ }
50
+ }
51
+ },
52
+ "tags": {
53
+ "description": "tags for the workflow",
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string"
57
+ }
37
58
  }
38
59
  }
39
60
  }
@@ -28,6 +28,10 @@
28
28
  "description": "Defines whether to store the results/properties extracted in this unit to properties collection",
29
29
  "type": "boolean",
30
30
  "default": false
31
+ },
32
+ "systemName": {
33
+ "description": "system name of the subworkflow",
34
+ "type": "string"
31
35
  }
32
36
  },
33
37
  "required": [
@@ -9,6 +9,7 @@
9
9
  "type": "string"
10
10
  }
11
11
  },
12
+ "additionalProperties": true,
12
13
  "required": [
13
14
  "name"
14
15
  ]
@@ -37,28 +37,44 @@ const ajvConfig = {
37
37
 
38
38
  const ajvValidator = new Ajv({ ...ajvConfig });
39
39
  const ajvValidatorAndCleaner = new Ajv({ ...ajvConfig, removeAdditional: true });
40
+ const ajvValidatorAndCleanerNoDefaults = new Ajv({
41
+ ...ajvConfig,
42
+ removeAdditional: true,
43
+ useDefaults: false,
44
+ });
40
45
  const ajvValidatorAndCleanerWithCoercingTypes = new Ajv({
41
46
  ...ajvConfig,
42
47
  removeAdditional: true,
43
48
  coerceTypes: true,
44
49
  });
50
+ const ajvValidatorAndCleanerWithCoercingTypesNoDefaults = new Ajv({
51
+ ...ajvConfig,
52
+ removeAdditional: true,
53
+ coerceTypes: true,
54
+ useDefaults: false,
55
+ });
45
56
 
46
57
  addFormats(ajvValidator);
47
58
  addFormats(ajvValidatorAndCleaner);
59
+ addFormats(ajvValidatorAndCleanerNoDefaults);
48
60
  addFormats(ajvValidatorAndCleanerWithCoercingTypes);
61
+ addFormats(ajvValidatorAndCleanerWithCoercingTypesNoDefaults);
49
62
 
50
63
  interface AjvInstanceOptions {
51
64
  clean: boolean;
52
65
  coerceTypes: boolean;
66
+ useDefaults: boolean;
53
67
  }
54
68
 
55
- function getAjvInstance({ clean, coerceTypes }: AjvInstanceOptions) {
69
+ function getAjvInstance({ clean, coerceTypes, useDefaults }: AjvInstanceOptions) {
56
70
  if (clean && coerceTypes) {
57
- return ajvValidatorAndCleanerWithCoercingTypes;
71
+ return useDefaults
72
+ ? ajvValidatorAndCleanerWithCoercingTypes
73
+ : ajvValidatorAndCleanerWithCoercingTypesNoDefaults;
58
74
  }
59
75
 
60
76
  if (clean) {
61
- return ajvValidatorAndCleaner;
77
+ return useDefaults ? ajvValidatorAndCleaner : ajvValidatorAndCleanerNoDefaults;
62
78
  }
63
79
 
64
80
  return ajvValidator;
@@ -66,10 +82,14 @@ function getAjvInstance({ clean, coerceTypes }: AjvInstanceOptions) {
66
82
 
67
83
  export function getValidator(
68
84
  jsonSchema: SchemaObject,
69
- { clean, coerceTypes }: AjvInstanceOptions,
85
+ {
86
+ clean,
87
+ coerceTypes,
88
+ useDefaults = true,
89
+ }: Omit<AjvInstanceOptions, "useDefaults"> & Partial<Pick<AjvInstanceOptions, "useDefaults">>,
70
90
  ): AnyValidateFunction {
71
91
  const schemaKey = jsonSchema.$id as string;
72
- const ajv = getAjvInstance({ clean, coerceTypes });
92
+ const ajv = getAjvInstance({ clean, coerceTypes, useDefaults });
73
93
  let validate = ajv.getSchema(schemaKey);
74
94
 
75
95
  if (!validate) {
@@ -111,9 +131,9 @@ export function validate(data: AnyObject, jsonSchema: SchemaObject) {
111
131
  export function validateAndClean(
112
132
  data: AnyObject,
113
133
  jsonSchema: SchemaObject,
114
- { coerceTypes = false },
134
+ { coerceTypes = false, useDefaults = true } = {},
115
135
  ) {
116
- const validator = getValidator(jsonSchema, { clean: true, coerceTypes });
136
+ const validator = getValidator(jsonSchema, { clean: true, coerceTypes, useDefaults });
117
137
  const isValid = validator(data);
118
138
 
119
139
  return {