Commit d4f3e2a
Add JSON schema (#1426)
* Add JSON schema for openPMD
Written as .toml files for ease of documentation, maintailability and
readability.
* Add convert-json-toml tool
Needed for "compiling" the schema to JSON
Also add a Makefile to further simplify this
* Add script for checking openPMD file against the schema
Workflow documented in README.md
* Don't use spaces in SerialIOTest attribute names
The JSON schema verification package does not like that
* Fix bugs detected by this verifier
Both of the form "data not found in places where data was expected"
* Add GitHub workflow
Verify all JSON-openPMD files written by testing against the schema
* Shorthand attributes
* Add dataset template mode
* Fix path
* Fix reading from stdin
* toml11 4.0 compatibility
* Only check for existing Iterations in writeOnly mode
* Some additions to schema
1. Support UNDEFINED datasets in template mode
2. gridUnitSI may now be a vector
* Remove deprecated jsonschema.validators.RefResolver
Apparently it's better to make everything 100 times more complicated
* Use most recent version of jsonschema
* Allow empty variable-based series
* Use if-then-else for better-steered parsing
anyOf and oneOf now only used for trivial distinctions, this makes
schemas much more robust since errors can be caught early and error
messages become actually useful.
* hmm
* Remove json cfg after test
Otherwise CI thinks this is an openPMD file
* Update documentation, rename convert-toml-json tool
* Apply suggestions from code review
Co-authored-by: Axel Huebl <[email protected]>
* Add reference to openPMD-validator
* Update README.md
---------
Co-authored-by: Axel Huebl <[email protected]>1 parent 9f42a5f commit d4f3e2a
File tree
24 files changed
+1420
-34
lines changed- .github/workflows
- include/openPMD/auxiliary
- src
- auxiliary
- cli
- test
- python/unittest/API
24 files changed
+1420
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
278 | 294 | | |
279 | 295 | | |
280 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
| 694 | + | |
694 | 695 | | |
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
698 | | - | |
| 699 | + | |
699 | 700 | | |
700 | 701 | | |
701 | 702 | | |
| |||
900 | 901 | | |
901 | 902 | | |
902 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
903 | 907 | | |
904 | 908 | | |
905 | 909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
229 | 235 | | |
230 | | - | |
231 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
0 commit comments