@mat3ra/esse 2024.1.7-0 → 2024.1.23-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/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[](https://badge.fury.io/py/esse)
|
|
2
|
-
[](https://badge.fury.io/js/@mat3ra%2Fesse)
|
|
3
3
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
4
4
|
|
|
5
5
|
# ESSE
|
|
6
6
|
|
|
7
|
-
Essential Source of Schemas and Examples (ESSE) contains data formats and examples for common entities used in digital materials science (see refs. [1, 2]
|
|
7
|
+
Essential Source of Schemas and Examples (ESSE) contains data formats and examples for common entities used in digital materials science (see refs. [^1], [^2] below).
|
|
8
8
|
|
|
9
9
|
Although, the schemas are used to facilitate the operations of [mat3ra.com](https://mat3ra.com), they are designed to be generic and can be used in other applications. The open-source packages developed by Mat3ra.com use the schemas available in this repository.
|
|
10
10
|
|
|
@@ -38,7 +38,7 @@ pip install -e PATH_TO_ESSE_REPOSITORY
|
|
|
38
38
|
#### 1.2.1. NPM
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npm install @
|
|
41
|
+
npm install @mat3ra/esse
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
|
|
@@ -59,7 +59,7 @@ schema = helper.get_schema_by_id("material")
|
|
|
59
59
|
### 2.2. Usage in Node/JS/TS
|
|
60
60
|
|
|
61
61
|
```javascript
|
|
62
|
-
|
|
62
|
+
const { ESSE } = require("@mat3ra/esse/lib/js/esse");
|
|
63
63
|
|
|
64
64
|
const helper = new ESSE();
|
|
65
65
|
const schema = helper.getSchemaById("material");
|
|
@@ -108,10 +108,10 @@ The following outlines the development process workflow:
|
|
|
108
108
|
5. GH workflow is used to generate the fully resolved file (without "$ref"s and "$allOf" etc.) and examples and publish them to [schemas.mat3ra.com](http://schemas.mat3ra.com/).
|
|
109
109
|
6. Publish the new version of the package to PyPI and npm.
|
|
110
110
|
|
|
111
|
-
The [pre-commit](.husky/pre-commit) is using both JS and PY runtime(s) to regenerate the schemas and examples.
|
|
111
|
+
The [pre-commit](.husky/pre-commit) is using both JS and PY runtime(s) to regenerate the schemas and examples.
|
|
112
112
|
|
|
113
113
|
[//]: # (TODO: consider reusing JS runtime and schemas build script for PY modules for consistency)
|
|
114
|
-
NOTE: The PY and JS modules are built from the same JSON sources, but using different runtimes (scripts) and thus may still be different. Only for JS the fully resolved schemas (with merged "$allOf") are created. They are used for the docs website.
|
|
114
|
+
NOTE: The PY and JS modules are built from the same JSON sources, but using different runtimes (scripts) and thus may still be different. Only for JS the fully resolved schemas (with merged "$allOf") are created. They are used for the docs website.
|
|
115
115
|
|
|
116
116
|
### 5.1. Development in Python
|
|
117
117
|
|
|
@@ -129,7 +129,7 @@ When developing in python the following should be taken into account:
|
|
|
129
129
|
virtualenv .venv
|
|
130
130
|
source .venv/bin/activate
|
|
131
131
|
pip install ."[tests]"
|
|
132
|
-
python -m unittest discover --verbose --catch --start-directory tests/py/esse/
|
|
132
|
+
python -m unittest discover --verbose --catch --start-directory tests/py/esse/
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
### 5.2. Development in Javascript/Typescript
|
|
@@ -142,7 +142,7 @@ npm run transpile
|
|
|
142
142
|
|
|
143
143
|
### 5.3. General Dev Suggestions
|
|
144
144
|
|
|
145
|
-
This repository is an [open-source](LICENSE.md) work-in-progress and we welcome contributions. We suggest forking this repository and introducing the adjustments there, the changes in the fork can further be considered for merging into this repository as it is commonly done on GitHub (see [3]
|
|
145
|
+
This repository is an [open-source](LICENSE.md) work-in-progress and we welcome contributions. We suggest forking this repository and introducing the adjustments there, the changes in the fork can further be considered for merging into this repository as it is commonly done on GitHub (see [^3] below).
|
|
146
146
|
|
|
147
147
|
Other suggestions:
|
|
148
148
|
|
|
@@ -152,6 +152,6 @@ Other suggestions:
|
|
|
152
152
|
|
|
153
153
|
## 6. Links
|
|
154
154
|
|
|
155
|
-
1: [Data-centric online ecosystem for digital materials science](https://arxiv.org/pdf/1902.10838.pdf)
|
|
156
|
-
2: [CateCom: A Practical Data-Centric Approach to Categorization of Computational Models](https://pubs.acs.org/doi/abs/10.1021/acs.jcim.2c00112)
|
|
157
|
-
3: [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
|
|
155
|
+
[^1]: [Data-centric online ecosystem for digital materials science](https://arxiv.org/pdf/1902.10838.pdf)
|
|
156
|
+
[^2]: [CateCom: A Practical Data-Centric Approach to Categorization of Computational Models](https://pubs.acs.org/doi/abs/10.1021/acs.jcim.2c00112)
|
|
157
|
+
[^3]: [GitHub Standard Fork & Pull Request Workflow](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mat3ra/esse",
|
|
3
|
-
"version": "2024.1.
|
|
3
|
+
"version": "2024.1.23-0",
|
|
4
4
|
"description": "Mat3ra's Excellent Source of Schemas and Examples (ESSE) for Digital Materials R&D",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepublishOnly": "rm -rf lib; npm run transpile",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"exports": {
|
|
72
72
|
"./schema": "./schema.js",
|
|
73
|
+
"./lib/js/esse": "./lib/js/esse/index.js",
|
|
73
74
|
"./lib/js/esse/schemaUtils": "./lib/js/esse/schemaUtils.js"
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"statement": {
|
|
18
|
-
"type": "string"
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The statement to be evaluated"
|
|
19
20
|
},
|
|
20
21
|
"errorMessage": {
|
|
21
|
-
"type": "string"
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The error message to be displayed if the assertion fails"
|
|
22
24
|
}
|
|
23
25
|
},
|
|
24
26
|
"required": [
|