@mat3ra/esse 2026.7.14-0 → 2026.8.13-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 (100) hide show
  1. package/.cursor/rules/resolve-generated-merge-conflicts.mdc +36 -0
  2. package/dist/js/esse/JSONSchemasInterface.d.ts +4 -0
  3. package/dist/js/esse/JSONSchemasInterface.js +10 -0
  4. package/dist/js/example/properties_directory/scalar/defect_formation_energy.json +5 -0
  5. package/dist/js/schema/job.json +147 -176
  6. package/dist/js/schema/material/material_properties.json +0 -4
  7. package/dist/js/schema/material.json +0 -4
  8. package/dist/js/schema/material_enhanced.json +889 -0
  9. package/dist/js/schema/material_enhanced_hashed.json +898 -0
  10. package/dist/js/schema/material_hashed.json +858 -0
  11. package/dist/js/schema/materials_category/compound_pristine_structures/two_dimensional/interface/configuration.json +0 -36
  12. package/dist/js/schema/materials_category/defective_structures/one_dimensional/grain_boundary_linear/configuration.json +0 -36
  13. package/dist/js/schema/materials_category/defective_structures/three_dimensional/solid_solution/configuration.json +0 -12
  14. package/dist/js/schema/materials_category/defective_structures/two_dimensional/adatom/configuration.json +0 -16
  15. package/dist/js/schema/materials_category/defective_structures/two_dimensional/grain_boundary_planar/configuration.json +0 -36
  16. package/dist/js/schema/materials_category/defective_structures/two_dimensional/island/configuration.json +0 -24
  17. package/dist/js/schema/materials_category/defective_structures/two_dimensional/terrace/configuration.json +0 -24
  18. package/dist/js/schema/materials_category/defective_structures/zero_dimensional/point_defect/base_configuration.json +0 -4
  19. package/dist/js/schema/materials_category/defective_structures/zero_dimensional/point_defect/interstitial.json +0 -8
  20. package/dist/js/schema/materials_category/defective_structures/zero_dimensional/point_defect/substitutional.json +0 -8
  21. package/dist/js/schema/materials_category/defective_structures/zero_dimensional/point_defect/vacancy.json +0 -4
  22. package/dist/js/schema/materials_category/pristine_structures/three_dimensional/ideal_crystal.json +0 -4
  23. package/dist/js/schema/materials_category/pristine_structures/two_dimensional/nanoribbon.json +0 -12
  24. package/dist/js/schema/materials_category/pristine_structures/two_dimensional/nanotape.json +0 -8
  25. package/dist/js/schema/materials_category/pristine_structures/two_dimensional/slab.json +0 -8
  26. package/dist/js/schema/materials_category/pristine_structures/two_dimensional/slab_strained_supercell.json +0 -8
  27. package/dist/js/schema/materials_category/processed_structures/two_dimensional/passivation/configuration.json +0 -8
  28. package/dist/js/schema/materials_category_components/entities/auxiliary/zero_dimensional/crystal_site.json +0 -4
  29. package/dist/js/schema/materials_category_components/entities/auxiliary/zero_dimensional/point_defect_site.json +0 -4
  30. package/dist/js/schema/materials_category_components/entities/auxiliary/zero_dimensional/void_region.json +0 -4
  31. package/dist/js/schema/materials_category_components/entities/core/three_dimensional/crystal.json +0 -4
  32. package/dist/js/schema/materials_category_components/entities/core/two_dimensional/vacuum.json +0 -4
  33. package/dist/js/schema/materials_category_components/entities/reusable/one_dimensional/crystal_lattice_lines.json +0 -4
  34. package/dist/js/schema/materials_category_components/entities/reusable/one_dimensional/crystal_lattice_lines_unique_repeated.json +0 -4
  35. package/dist/js/schema/materials_category_components/entities/reusable/three_dimensional/crystal_lattice_base.json +0 -4
  36. package/dist/js/schema/materials_category_components/entities/reusable/three_dimensional/strained_non_uniform.json +0 -4
  37. package/dist/js/schema/materials_category_components/entities/reusable/three_dimensional/strained_uniform.json +0 -4
  38. package/dist/js/schema/materials_category_components/entities/reusable/three_dimensional/supercell.json +0 -4
  39. package/dist/js/schema/materials_category_components/entities/reusable/two_dimensional/atomic_layers.json +0 -4
  40. package/dist/js/schema/materials_category_components/entities/reusable/two_dimensional/atomic_layers_unique.json +0 -4
  41. package/dist/js/schema/materials_category_components/entities/reusable/two_dimensional/atomic_layers_unique_repeated.json +0 -4
  42. package/dist/js/schema/materials_category_components/entities/reusable/two_dimensional/crystal_lattice_planes.json +0 -4
  43. package/dist/js/schema/materials_category_components/entities/reusable/two_dimensional/slab_stack_configuration.json +0 -12
  44. package/dist/js/schema/materials_category_components/operations/core/modifications/perturb.json +0 -4
  45. package/dist/js/schema/properties_directory/enum_options.json +1 -0
  46. package/dist/js/schema/properties_directory/non_scalar/workflow.json +147 -176
  47. package/dist/js/schema/properties_directory/scalar/defect_formation_energy.json +43 -0
  48. package/dist/js/schema/properties_directory/structural/basis_constrained.json +292 -0
  49. package/dist/js/schema/property/holder.json +189 -176
  50. package/dist/js/schema/software_directory/modeling/unit/execution.json +14 -16
  51. package/dist/js/schema/software_directory/scripting/unit/execution.json +14 -16
  52. package/dist/js/schema/system/bankable.json +1 -6
  53. package/dist/js/schema/system/hashed.json +15 -0
  54. package/dist/js/schema/system/status_track.json +29 -0
  55. package/dist/js/schema/workflow/base.json +147 -176
  56. package/dist/js/schema/workflow/subworkflow/mixin.json +88 -105
  57. package/dist/js/schema/workflow/subworkflow/unit.json +88 -105
  58. package/dist/js/schema/workflow/subworkflow.json +88 -105
  59. package/dist/js/schema/workflow/unit/assertion.json +15 -18
  60. package/dist/js/schema/workflow/unit/assignment.json +14 -17
  61. package/dist/js/schema/workflow/unit/base.json +12 -17
  62. package/dist/js/schema/workflow/unit/condition.json +15 -18
  63. package/dist/js/schema/workflow/unit/error.json +15 -18
  64. package/dist/js/schema/workflow/unit/execution.json +14 -16
  65. package/dist/js/schema/workflow/unit/io.json +15 -18
  66. package/dist/js/schema/workflow/unit/map.json +14 -17
  67. package/dist/js/schema/workflow/unit/mixins/base.json +11 -20
  68. package/dist/js/schema/workflow/unit/reduce.json +15 -18
  69. package/dist/js/schema/workflow/unit/subworkflow.json +15 -18
  70. package/dist/js/schema/workflow/unit.json +59 -71
  71. package/dist/js/schema/workflow.json +147 -176
  72. package/dist/js/schemas.json +1 -1
  73. package/dist/js/types.d.ts +1603 -1247
  74. package/dist/js/utils/ajv.d.ts +6 -5
  75. package/dist/js/utils/ajv.js +22 -9
  76. package/dist/js/utils/ajvKeywords/jsonSchemaToTypescriptKeywords.d.ts +7 -0
  77. package/dist/js/utils/ajvKeywords/jsonSchemaToTypescriptKeywords.js +21 -0
  78. package/dist/js/utils/removeEmptyAndNullProperties.d.ts +9 -0
  79. package/dist/js/utils/removeEmptyAndNullProperties.js +29 -0
  80. package/example/properties_directory/scalar/defect_formation_energy.json +5 -0
  81. package/manifest/properties.yaml +6 -0
  82. package/package.json +1 -1
  83. package/schema/material/material_properties.json +0 -4
  84. package/schema/material_enhanced.json +18 -0
  85. package/schema/material_enhanced_hashed.json +14 -0
  86. package/schema/material_hashed.json +22 -0
  87. package/schema/properties_directory/enum_options.json +1 -0
  88. package/schema/properties_directory/scalar/defect_formation_energy.json +21 -0
  89. package/schema/properties_directory/structural/basis_constrained.json +19 -0
  90. package/schema/property/holder.json +3 -0
  91. package/schema/system/bankable.json +1 -6
  92. package/schema/system/hashed.json +15 -0
  93. package/schema/system/status.json +5 -21
  94. package/schema/system/status_track.json +29 -0
  95. package/schema/workflow/unit/base.json +1 -1
  96. package/schema/workflow/unit/mixins/base.json +11 -20
  97. package/src/js/esse/JSONSchemasInterface.ts +11 -0
  98. package/src/js/utils/ajv.ts +22 -9
  99. package/src/js/utils/ajvKeywords/jsonSchemaToTypescriptKeywords.ts +22 -0
  100. package/src/js/utils/removeEmptyAndNullProperties.ts +32 -0
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Resolve ESSE merge conflicts by merging source schemas and regenerating derived artifacts
3
+ globs: "{schema,example,manifest,dist/js,src/py}/**/*"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # ESSE generated merge conflicts
8
+
9
+ Treat `schema/**`, `example/**`, and `manifest/**` as sources of truth. These outputs are generated:
10
+
11
+ - `dist/js/**`
12
+ - `src/py/mat3ra/esse/data/**`
13
+ - `src/py/mat3ra/esse/models/**` (`dist/py` points here)
14
+
15
+ When merging:
16
+
17
+ 1. Merge source schemas, examples, and manifests first, preserving intentional changes from both branches.
18
+ 2. Do not hand-merge generated Python enum suffixes such as `Name631`, `Units284`, or `Value137`; their numbering is unstable and regeneration determines it.
19
+ 3. Resolve generated files temporarily if Git requires it, then regenerate all derived artifacts from the merged sources:
20
+
21
+ ```bash
22
+ npm run transpile-and-build-assets
23
+ pre-commit run generate-python-modules --all-files
24
+ ```
25
+
26
+ The Python hook only runs when a staged path contains `schema`, so stage the resolved source schema changes before invoking it. Its canonical command and pinned generator options live in `.pre-commit-config.yaml`.
27
+
28
+ After generation, stage the generated outputs and verify:
29
+
30
+ ```bash
31
+ git diff --name-only --diff-filter=U
32
+ rg -n '^(<<<<<<<|=======|>>>>>>>)' .
33
+ git diff --check
34
+ ```
35
+
36
+ Do not blindly choose `ours` or `theirs` for generated files when source schemas differ. A side may contain real additions (for example, a new property) while the other contains unrelated schema fixes; the regenerated result must include both.
@@ -9,6 +9,10 @@ export default class JSONSchemasInterface {
9
9
  static setSchemas(schema: JSONSchema[]): void;
10
10
  static addSchema(schema: JSONSchema): void;
11
11
  static getSchemaById(schemaId: string): import("json-schema").JSONSchema7 | undefined;
12
+ /**
13
+ * Like {@link getSchemaById}, but throws if the schema is not registered.
14
+ */
15
+ static getRequiredSchemaById(schemaId: string): JSONSchema;
12
16
  /**
13
17
  * @example <caption>Search by $id regex</caption>
14
18
  * JSONSchemasInterface.matchSchema({
@@ -13,6 +13,16 @@ class JSONSchemasInterface {
13
13
  static getSchemaById(schemaId) {
14
14
  return this.schemasCache.get(schemaId);
15
15
  }
16
+ /**
17
+ * Like {@link getSchemaById}, but throws if the schema is not registered.
18
+ */
19
+ static getRequiredSchemaById(schemaId) {
20
+ const schema = this.getSchemaById(schemaId);
21
+ if (!schema) {
22
+ throw new Error(`ESSE schema not found: ${schemaId}`);
23
+ }
24
+ return schema;
25
+ }
16
26
  /**
17
27
  * @example <caption>Search by $id regex</caption>
18
28
  * JSONSchemasInterface.matchSchema({
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "defect_formation_energy",
3
+ "units": "eV",
4
+ "value": 3.5
5
+ }