diff --git a/docs/source/02_Terminology.md b/docs/source/02_Terminology.md index f0ef79d..8fd7612 100644 --- a/docs/source/02_Terminology.md +++ b/docs/source/02_Terminology.md @@ -142,45 +142,46 @@ is fixed or noted. Starting with HED standard schema versions 8.3.0 and above, HED will allow UTF-8 characters in various settings. The types of characters referred to in this specification are: -| Name | Description | -| ---- | ----------- | -| `alphanumeric` | `letters` and/or `digits` | -| `ampersand` | ASCII code 38 | -| `ascii` | utf-8 codes 0 to 127 (single byte) | -| `asterisk` | ASCII code 42 | -| `at-sign` | ASCII code 64 | -| `backslash` | ASCII code 92 | -| `blank` | ASCII code 32 | -| `caret` | ASCII code 94 | -| `colon` | ASCII code 58 | -| `comma` | ASCII code 44 | -| `dollar` | ASCII code 36 | -| `digits` | 0-9 | -| `double-quote` | ASCII code 34 | -| `equals` | ASCII code 61 | -| `exclamation` | ASCII code 33 | -| `greater-than` | ASCII code 62 | -| `hyphen` | ASCII code 45 | -| `left-paren` | ASCII code 40 | -| `less-than` | ASCII code 60 | -| `letters` | `lowercase` and/or `uppercase` | -| `lowercase` | ASCII characters a-z | -| `name` | `alphanumeric`, `hyphen`, `period`, `underscore`, `nonascii` | -| `newline` | ASCII code 10 (linefeed) | -| `nonascii` | utf-8 codes greater than 128 (multi-byte) | -| `number-sign` | ASCII code 35 | -| `percent-sign` | ASCII code 37 | -| `period` | ASCII code 46 | -| `plus` | ASCII code 43 | -| `printable` | ASCII 32 <= code < 127 | +| Name | Description | +|-----------------| ----------- | +| `alphanumeric` | `letters` and/or `digits` | +| `ampersand` | ASCII code 38 | +| `ascii` | utf-8 codes 0 to 127 (single byte) | +| `asterisk` | ASCII code 42 | +| `at-sign` | ASCII code 64 | +| `backslash` | ASCII code 92 | +| `blank` | ASCII code 32 | +| `caret` | ASCII code 94 | +| `colon` | ASCII code 58 | +| `comma` | ASCII code 44 | +| `dollar` | ASCII code 36 | +| `digits` | 0-9 | +| `double-quote` | ASCII code 34 | +| `equals` | ASCII code 61 | +| `exclamation` | ASCII code 33 | +| `forward-slash` | ASCII code 47 | +| `greater-than` | ASCII code 62 | +| `hyphen` | ASCII code 45 | +| `left-paren` | ASCII code 40 | +| `less-than` | ASCII code 60 | +| `letters` | `lowercase` and/or `uppercase` | +| `lowercase` | ASCII characters a-z | +| `name` | `alphanumeric`, `hyphen`, `period`, `underscore`, `nonascii` | +| `newline` | ASCII code 10 (linefeed) | +| `nonascii` | utf-8 codes greater than 128 (multi-byte) | +| `number-sign` | ASCII code 35 | +| `numeric` | digits, period, hyphen, plus, caret, E, e | +| `percent-sign` | ASCII code 37 | +| `period` | ASCII code 46 | +| `plus` | ASCII code 43 | +| `printable` | ASCII 32 <= code < 127 | | `question-mark` | ASCII code 63 | -| `right-paren` | ASCII code 41 | -| `semicolon` | ASCII code 59 | -| `single-quote` | ASCII code 39 | -| `slash` | ASCII code 47 | -| `tab` | ASCII code 09 | -| `text` | `printable` and/or `nonascii` excluding comma, square brackets, and curly braces.| -| `tilde` | ASCII code 126 | -| `underscore` | ASCII code 95 | -| `uppercase` | ASCII characters A-Z | -| `verical-bar` | ASCII code 124 | +| `right-paren` | ASCII code 41 | +| `semicolon` | ASCII code 59 | +| `single-quote` | ASCII code 39 | +| `tab` | ASCII code 09 | +| `text` | `printable` and/or `nonascii` excluding comma and curly braces.| +| `tilde` | ASCII code 126 | +| `underscore` | ASCII code 95 | +| `uppercase` | ASCII characters A-Z | +| `vertical-bar` | ASCII code 124 | diff --git a/docs/source/Appendix_A.md b/docs/source/Appendix_A.md index 7e3561b..721e19b 100644 --- a/docs/source/Appendix_A.md +++ b/docs/source/Appendix_A.md @@ -190,7 +190,7 @@ behavior of certain value classes (for example the `numericClass` value class). * - nameClass - `alphanumeric`, `hyphen`, `underscore`, `nonascii` * - numericClass - - `digits`, `period`, `hyphen`, `plus`, `caret`, `E`, `e` ` + - `digits`, `period`, `hyphen`, `plus`, `caret`, `E`, `e` * - posixPath - As yet unspecified. * - textClass diff --git a/tests/javascript_tests.json b/tests/javascript_tests.json index e490d89..c95ccc2 100644 --- a/tests/javascript_tests.json +++ b/tests/javascript_tests.json @@ -9,7 +9,7 @@ "name": "character-invalid-non-printing appears", "description": "The HED string contains a UTF-8 character.", "warning": false, - "schema": "8.2.0", + "schema": "8.3.0", "definitions": [ "(Definition/Acc/#, (Acceleration/#, Red))", "(Definition/MyColor, (Label/Pie))" @@ -38,7 +38,7 @@ { "event_code": { "HED": { - "show": "Red, Label/a \u00ca\u00b0 good" + "show": "Red, Label/a-\u00ca\u00b0-good" } } } @@ -69,7 +69,7 @@ [ 4.5, 0, - "Label/Temp, Label/a \u00ca\u00b0 good" + "Label/Temp, Label/a-\u00ca\u00b0-good" ] ] ] @@ -217,7 +217,7 @@ "VALUE_INVALID" ], "name": "invalid-character-name-value-class", - "description": "An invalid character was used in an 8.3.0 or greater style text value class.", + "description": "An invalid character was used in an 8.3.0 or greater style name value class.", "warning": false, "schema": "8.3.0", "definitions": [ @@ -267,7 +267,7 @@ [ 4.5, 0, - "Statistical-accuracy/1max1" + "Label/%max1" ] ], [ @@ -279,7 +279,7 @@ [ 4.5, 0, - "Label/30$" + "Label/$30" ] ], [ @@ -370,69 +370,6 @@ } } }, - { - "error_code": "CHARACTER_INVALID", - "alt_codes": [ - "UNITS_INVALID" - ], - "name": "invalid-character-numeric-class", - "description": "An invalid character was used in an 8.3.0 or greater style numeric value class.", - "warning": false, - "schema": "8.3.0", - "definitions": [], - "tests": { - "string_tests": { - "fails": [ - "Weight/3.0$ kg", - "Weight/3.0db kg", - "Weight/3.0& kg", - "Weight/abc kg", - "Weight/*3.0 kg", - "Weight/3.0% kg", - "Weight/3.0^ kg", - "Weight/3.0? kg" - ], - "passes": [ - "Weight/3.0e10 kg", - "Weight/3e10 kg", - "Weight/3.0 kg", - "Weight/3000 kg", - "Weight/3e10 kg", - "Weight/3.5e10 kg", - "Weight/2.998e8 g", - "Weight/6.022e23 g", - "Weight/7.0e-10 g", - "Weight/1.6e-35 kg" - ] - }, - "sidecar_tests": { - "fails": [ - { - "event_code": { - "HED": { - "show": "Weight/3.0a" - } - } - } - ], - "passes": [ - { - "event_code": { - "HED": "Weight/# g" - } - } - ] - }, - "event_tests": { - "fails": [], - "passes": [] - }, - "combo_tests": { - "fails": [], - "passes": [] - } - } - }, { "error_code": "COMMA_MISSING", "alt_codes": [], @@ -3904,7 +3841,7 @@ "fails": [ { "trial": { - "HED": "Def/Acc/# m-per-s^2, Label/#" + "HED": "Def/Acc/#, Label/#" }, "memory": { "HED": "Blue, Red, Label/#" @@ -3914,7 +3851,7 @@ "passes": [ { "trial": { - "HED": "Def/Acc/# m-per-s^2" + "HED": "Def/Acc/#" } } ] @@ -4169,7 +4106,8 @@ { "error_code": "SIDECAR_BRACES_INVALID", "alt_codes": [ - "CHARACTER_INVALID" + "CHARACTER_INVALID", + "SIDECAR_INVALID" ], "name": "sidecar-braces-contents-invalid", "description": "The item in curly braces is not the word HED or a column name with HED annotations in the sidecar.", @@ -4302,7 +4240,8 @@ "alt_codes": [ "VALUE_INVALID", "CHARACTER_INVALID", - "UNITS_INVALID" + "UNITS_INVALID", + "DEF_INVALID" ], "name": "sidecar-braces-invalid-spot", "description": "A curly brace reference must only appear where a tag could.", @@ -4323,7 +4262,7 @@ "event_code": { "HED": { "face": "(Red, Blue), (Green, (Yellow))", - "ball": "(Def/Acc/{response_time})" + "ball": "(Label/{response_time})" } }, "response_time": { @@ -4453,7 +4392,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" } }, "events": [ @@ -4524,7 +4463,7 @@ } }, "response_time": { - "HED": "Label/#, {response_time}" + "HED": "Parameter-value/#, {response_time}" } } ], @@ -4538,7 +4477,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" }, "response_count": { "Description": "A count used to test curly braces in value columns.", @@ -4554,7 +4493,7 @@ }, "response_action": { "Description": "Does not correspond to curly braces", - "HED": "Label/#" + "HED": "Parameter-value/#" } } ] @@ -4575,7 +4514,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#, {response_time}" + "HED": "Parameter-value/#, {response_time}" } }, "events": [ @@ -4628,7 +4567,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" } }, "events": [ @@ -5099,126 +5038,6 @@ } } }, - { - "error_code": "SIDECAR_INVALID", - "alt_codes": [], - "name": "curly-braces-has-no-hed", - "description": "A column name appears in curly braces, but that column name does not have a HED annotation.", - "warning": false, - "schema": "8.3.0", - "definitions": [ - "(Definition/Acc/#, (Acceleration/#, Red))", - "(Definition/MyColor, (Label/Pie))" - ], - "tests": { - "string_tests": { - "fails": [], - "passes": [] - }, - "sidecar_tests": { - "fails": [ - { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": { - "Description": "This is a response" - } - } - ], - "passes": [ - { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": { - "HED": "Label/#" - } - } - ] - }, - "event_tests": { - "fails": [], - "passes": [] - }, - "combo_tests": { - "fails": [ - { - "sidecar": { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": "This is a response" - }, - "events": [ - [ - "onset", - "duration", - "event_code", - "response", - "HED" - ], - [ - 4.5, - 0, - "face", - "yes", - "Red, Def/MyColor" - ], - [ - 5.0, - 0, - "ball", - "no", - "Green" - ] - ] - } - ], - "passes": [ - { - "sidecar": { - "event_code": { - "HED": { - "face": "Acceleration/5 m-per-s^2", - "ball": "Def/Acc/7, Blue" - } - } - }, - "events": [ - [ - "onset", - "duration", - "event_code", - "response", - "HED" - ], - [ - 4.5, - 0, - "face", - "yes", - "Red, Def/MyColor" - ], - [ - 5.0, - 0, - "ball", - "no", - "Green" - ] - ] - } - ] - } - } - }, { "error_code": "SIDECAR_KEY_MISSING", "alt_codes": [], @@ -6397,7 +6216,10 @@ }, { "error_code": "TAG_EXTENSION_INVALID", - "alt_codes": [], + "alt_codes": [ + "CHARACTER_INVALID", + "PLACEHOLDER_INVALID" + ], "name": "tag-extension-invalid-bad-node-name", "description": "A tag extension term does not comply with rules for schema nodes.", "warning": false, @@ -12462,5 +12284,68 @@ ] } } + }, + { + "error_code": "VALUE_INVALID", + "alt_codes": [ + "UNITS_INVALID" + ], + "name": "invalid-character-numeric-class", + "description": "An invalid character was used in an 8.3.0 or greater style numeric value class.", + "warning": false, + "schema": "8.3.0", + "definitions": [], + "tests": { + "string_tests": { + "fails": [ + "Weight/3.0$ kg", + "Weight/3.0db kg", + "Weight/3.0& kg", + "Weight/abc kg", + "Weight/*3.0 kg", + "Weight/3.0% kg", + "Weight/3.0^ kg", + "Weight/3.0? kg" + ], + "passes": [ + "Weight/3.0e10 kg", + "Weight/3e10 kg", + "Weight/3.0 kg", + "Weight/3000 kg", + "Weight/3e10 kg", + "Weight/3.5e10 kg", + "Weight/2.998e8 g", + "Weight/6.022e23 g", + "Weight/7.0e-10 g", + "Weight/1.6e-35 kg" + ] + }, + "sidecar_tests": { + "fails": [ + { + "event_code": { + "HED": { + "show": "Weight/3.0a" + } + } + } + ], + "passes": [ + { + "event_code": { + "HED": "Weight/# g" + } + } + ] + }, + "event_tests": { + "fails": [], + "passes": [] + }, + "combo_tests": { + "fails": [], + "passes": [] + } + } } ] \ No newline at end of file diff --git a/tests/json_tests/CHARACTER_INVALID.json b/tests/json_tests/CHARACTER_INVALID.json index 6015f93..6a2449f 100644 --- a/tests/json_tests/CHARACTER_INVALID.json +++ b/tests/json_tests/CHARACTER_INVALID.json @@ -5,7 +5,7 @@ "name": "character-invalid-non-printing appears", "description": "The HED string contains a UTF-8 character.", "warning": false, - "schema": "8.2.0", + "schema": "8.3.0", "definitions": ["(Definition/Acc/#, (Acceleration/#, Red))", "(Definition/MyColor, (Label/Pie))"], "tests": { "string_tests": { @@ -31,7 +31,7 @@ { "event_code": { "HED": { - "show": "Red, Label/a ʰ good" + "show": "Red, Label/a-ʰ-good" } } } @@ -47,7 +47,7 @@ "passes": [ [ ["onset", "duration", "HED"], - [ 4.5, 0, "Label/Temp, Label/a ʰ good"] + [ 4.5, 0, "Label/Temp, Label/a-ʰ-good"] ] ] }, @@ -141,7 +141,7 @@ "error_code": "CHARACTER_INVALID", "alt_codes": ["TAG_INVALID", "VALUE_INVALID"], "name": "invalid-character-name-value-class", - "description": "An invalid character was used in an 8.3.0 or greater style text value class.", + "description": "An invalid character was used in an 8.3.0 or greater style name value class.", "warning": false, "schema": "8.3.0", "definitions": ["(Definition/Acc/#, (Acceleration/#, Red))", "(Definition/MyColor, (Label/Pie))"], @@ -181,11 +181,11 @@ "fails": [ [ ["onset", "duration", "HED"], - [ 4.5, 0, "Statistical-accuracy/1max1"] + [ 4.5, 0, "Label/%max1"] ], [ ["onset", "duration", "HED"], - [ 4.5, 0, "Label/30$"] + [ 4.5, 0, "Label/$30"] ], [ ["onset", "duration", "HED"], @@ -245,66 +245,6 @@ "passes": [] } } - }, - { - "error_code": "CHARACTER_INVALID", - "alt_codes": ["UNITS_INVALID"], - "name": "invalid-character-numeric-class", - "description": "An invalid character was used in an 8.3.0 or greater style numeric value class.", - "warning": false, - "schema": "8.3.0", - "definitions": [], - "tests": { - "string_tests": { - "fails": [ - "Weight/3.0$ kg", - "Weight/3.0db kg", - "Weight/3.0& kg", - "Weight/abc kg", - "Weight/*3.0 kg", - "Weight/3.0% kg", - "Weight/3.0^ kg", - "Weight/3.0? kg" - ], - "passes": [ - "Weight/3.0e10 kg", - "Weight/3e10 kg", - "Weight/3.0 kg", - "Weight/3000 kg", - "Weight/3e10 kg", - "Weight/3.5e10 kg", - "Weight/2.998e8 g", - "Weight/6.022e23 g", - "Weight/7.0e-10 g", - "Weight/1.6e-35 kg" - ] - }, - "sidecar_tests": { - "fails": [ - { - "event_code": { - "HED": { - "show": "Weight/3.0a" - } - } - } - ], - "passes": [ - { - "event_code": { - "HED": "Weight/# g" - } - } - ] - }, - "event_tests": { - "fails": [], - "passes": [] - }, - "combo_tests": { - "fails": [], - "passes": [] - } - } } + ] \ No newline at end of file diff --git a/tests/json_tests/PLACEHOLDER_INVALID.json b/tests/json_tests/PLACEHOLDER_INVALID.json index eb4b504..65c42b8 100644 --- a/tests/json_tests/PLACEHOLDER_INVALID.json +++ b/tests/json_tests/PLACEHOLDER_INVALID.json @@ -189,7 +189,7 @@ "fails": [ { "trial": { - "HED": "Def/Acc/# m-per-s^2, Label/#" + "HED": "Def/Acc/#, Label/#" }, "memory": { "HED": "Blue, Red, Label/#" @@ -199,7 +199,7 @@ "passes": [ { "trial": { - "HED": "Def/Acc/# m-per-s^2" + "HED": "Def/Acc/#" } } ] diff --git a/tests/json_tests/SIDECAR_BRACES_INVALID.json b/tests/json_tests/SIDECAR_BRACES_INVALID.json index e607883..c04461a 100644 --- a/tests/json_tests/SIDECAR_BRACES_INVALID.json +++ b/tests/json_tests/SIDECAR_BRACES_INVALID.json @@ -1,7 +1,7 @@ [ { "error_code": "SIDECAR_BRACES_INVALID", - "alt_codes": ["CHARACTER_INVALID"], + "alt_codes": ["CHARACTER_INVALID", "SIDECAR_INVALID"], "name": "sidecar-braces-contents-invalid", "description": "The item in curly braces is not the word HED or a column name with HED annotations in the sidecar.", "warning": false, @@ -103,7 +103,7 @@ }, { "error_code": "SIDECAR_BRACES_INVALID", - "alt_codes": ["VALUE_INVALID", "CHARACTER_INVALID", "UNITS_INVALID"], + "alt_codes": ["VALUE_INVALID", "CHARACTER_INVALID", "UNITS_INVALID", "DEF_INVALID"], "name": "sidecar-braces-invalid-spot", "description": "A curly brace reference must only appear where a tag could.", "warning": false, @@ -122,7 +122,7 @@ "event_code": { "HED": { "face": "(Red, Blue), (Green, (Yellow))", - "ball": "(Def/Acc/{response_time})" + "ball": "(Label/{response_time})" } }, "response_time": { @@ -258,7 +258,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" } }, "events": @@ -299,7 +299,7 @@ } }, "response_time": { - "HED": "Label/#, {response_time}" + "HED": "Parameter-value/#, {response_time}" } } ], @@ -313,7 +313,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" }, "response_count": { "Description": "A count used to test curly braces in value columns.", @@ -329,7 +329,7 @@ }, "response_action": { "Description": "Does not correspond to curly braces", - "HED": "Label/#" + "HED": "Parameter-value/#" } } ] @@ -352,7 +352,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#, {response_time}" + "HED": "Parameter-value/#, {response_time}" } }, "events": @@ -376,7 +376,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" } }, "events": diff --git a/tests/json_tests/SIDECAR_INVALID.json b/tests/json_tests/SIDECAR_INVALID.json index fce5a6f..28e8d2a 100644 --- a/tests/json_tests/SIDECAR_INVALID.json +++ b/tests/json_tests/SIDECAR_INVALID.json @@ -188,127 +188,5 @@ ] } } - }, - { - "error_code": "SIDECAR_INVALID", - "alt_codes": [], - "name": "curly-braces-has-no-hed", - "description": "A column name appears in curly braces, but that column name does not have a HED annotation.", - "warning": false, - "schema": "8.3.0", - "definitions": [ - "(Definition/Acc/#, (Acceleration/#, Red))", - "(Definition/MyColor, (Label/Pie))" - ], - "tests": { - "string_tests": { - "fails": [], - "passes": [] - }, - "sidecar_tests": { - "fails": [ - { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": { - "Description": "This is a response" - } - } - ], - "passes": [ - { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": { - "HED": "Label/#" - } - } - ] - }, - "event_tests": { - "fails": [ - ], - "passes": [ - ] - }, - "combo_tests": { - "fails": [ - { - "sidecar": { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": "This is a response" - }, - "events": [ - [ - "onset", - "duration", - "event_code", - "response", - "HED" - ], - [ - 4.5, - 0, - "face", - "yes", - "Red, Def/MyColor" - ], - [ - 5.0, - 0, - "ball", - "no", - "Green" - ] - ] - } - ], - "passes": [ - { - "sidecar": { - "event_code": { - "HED": { - "face": "Acceleration/5 m-per-s^2", - "ball": "Def/Acc/7, Blue" - } - } - }, - "events": [ - [ - "onset", - "duration", - "event_code", - "response", - "HED" - ], - [ - 4.5, - 0, - "face", - "yes", - "Red, Def/MyColor" - ], - [ - 5.0, - 0, - "ball", - "no", - "Green" - ] - ] - } - ] - } - } } ] \ No newline at end of file diff --git a/tests/json_tests/TAG_EXTENSION_INVALID.json b/tests/json_tests/TAG_EXTENSION_INVALID.json index 047e190..78491da 100644 --- a/tests/json_tests/TAG_EXTENSION_INVALID.json +++ b/tests/json_tests/TAG_EXTENSION_INVALID.json @@ -98,7 +98,7 @@ }, { "error_code": "TAG_EXTENSION_INVALID", - "alt_codes": [], + "alt_codes": ["CHARACTER_INVALID", "PLACEHOLDER_INVALID"], "name": "tag-extension-invalid-bad-node-name", "description": "A tag extension term does not comply with rules for schema nodes.", "warning": false, diff --git a/tests/json_tests/VALUE_INVALID.json b/tests/json_tests/VALUE_INVALID.json index d7b8fdf..bf4e765 100644 --- a/tests/json_tests/VALUE_INVALID.json +++ b/tests/json_tests/VALUE_INVALID.json @@ -252,5 +252,66 @@ ] } } + }, + { + "error_code": "VALUE_INVALID", + "alt_codes": ["UNITS_INVALID"], + "name": "invalid-character-numeric-class", + "description": "An invalid character was used in an 8.3.0 or greater style numeric value class.", + "warning": false, + "schema": "8.3.0", + "definitions": [], + "tests": { + "string_tests": { + "fails": [ + "Weight/3.0$ kg", + "Weight/3.0db kg", + "Weight/3.0& kg", + "Weight/abc kg", + "Weight/*3.0 kg", + "Weight/3.0% kg", + "Weight/3.0^ kg", + "Weight/3.0? kg" + ], + "passes": [ + "Weight/3.0e10 kg", + "Weight/3e10 kg", + "Weight/3.0 kg", + "Weight/3000 kg", + "Weight/3e10 kg", + "Weight/3.5e10 kg", + "Weight/2.998e8 g", + "Weight/6.022e23 g", + "Weight/7.0e-10 g", + "Weight/1.6e-35 kg" + ] + }, + "sidecar_tests": { + "fails": [ + { + "event_code": { + "HED": { + "show": "Weight/3.0a" + } + } + } + ], + "passes": [ + { + "event_code": { + "HED": "Weight/# g" + } + } + ] + }, + "event_tests": { + "fails": [], + "passes": [] + }, + "combo_tests": { + "fails": [], + "passes": [] + } + } } ] \ No newline at end of file diff --git a/tests/python_tests.json b/tests/python_tests.json index 5e9329d..ac9125f 100644 --- a/tests/python_tests.json +++ b/tests/python_tests.json @@ -9,7 +9,7 @@ "name": "character-invalid-non-printing appears", "description": "The HED string contains a UTF-8 character.", "warning": false, - "schema": "8.2.0", + "schema": "8.3.0", "definitions": [ "(Definition/Acc/#, (Acceleration/#, Red))", "(Definition/MyColor, (Label/Pie))" @@ -38,7 +38,7 @@ { "event_code": { "HED": { - "show": "Red, Label/a \u00ca\u00b0 good" + "show": "Red, Label/a-\u00ca\u00b0-good" } } } @@ -69,7 +69,7 @@ [ 4.5, 0, - "Label/Temp, Label/a \u00ca\u00b0 good" + "Label/Temp, Label/a-\u00ca\u00b0-good" ] ] ] @@ -217,7 +217,7 @@ "VALUE_INVALID" ], "name": "invalid-character-name-value-class", - "description": "An invalid character was used in an 8.3.0 or greater style text value class.", + "description": "An invalid character was used in an 8.3.0 or greater style name value class.", "warning": false, "schema": "8.3.0", "definitions": [ @@ -267,7 +267,7 @@ [ 4.5, 0, - "Statistical-accuracy/1max1" + "Label/%max1" ] ], [ @@ -279,7 +279,7 @@ [ 4.5, 0, - "Label/30$" + "Label/$30" ] ], [ @@ -370,69 +370,6 @@ } } }, - { - "error_code": "CHARACTER_INVALID", - "alt_codes": [ - "UNITS_INVALID" - ], - "name": "invalid-character-numeric-class", - "description": "An invalid character was used in an 8.3.0 or greater style numeric value class.", - "warning": false, - "schema": "8.3.0", - "definitions": [], - "tests": { - "string_tests": { - "fails": [ - "Weight/3.0$ kg", - "Weight/3.0db kg", - "Weight/3.0& kg", - "Weight/abc kg", - "Weight/*3.0 kg", - "Weight/3.0% kg", - "Weight/3.0^ kg", - "Weight/3.0? kg" - ], - "passes": [ - "Weight/3.0e10 kg", - "Weight/3e10 kg", - "Weight/3.0 kg", - "Weight/3000 kg", - "Weight/3e10 kg", - "Weight/3.5e10 kg", - "Weight/2.998e8 g", - "Weight/6.022e23 g", - "Weight/7.0e-10 g", - "Weight/1.6e-35 kg" - ] - }, - "sidecar_tests": { - "fails": [ - { - "event_code": { - "HED": { - "show": "Weight/3.0a" - } - } - } - ], - "passes": [ - { - "event_code": { - "HED": "Weight/# g" - } - } - ] - }, - "event_tests": { - "fails": [], - "passes": [] - }, - "combo_tests": { - "fails": [], - "passes": [] - } - } - }, { "error_code": "COMMA_MISSING", "alt_codes": [], @@ -3904,7 +3841,7 @@ "fails": [ { "trial": { - "HED": "Def/Acc/# m-per-s^2, Label/#" + "HED": "Def/Acc/#, Label/#" }, "memory": { "HED": "Blue, Red, Label/#" @@ -3914,7 +3851,7 @@ "passes": [ { "trial": { - "HED": "Def/Acc/# m-per-s^2" + "HED": "Def/Acc/#" } } ] @@ -7011,7 +6948,8 @@ { "error_code": "SIDECAR_BRACES_INVALID", "alt_codes": [ - "CHARACTER_INVALID" + "CHARACTER_INVALID", + "SIDECAR_INVALID" ], "name": "sidecar-braces-contents-invalid", "description": "The item in curly braces is not the word HED or a column name with HED annotations in the sidecar.", @@ -7144,7 +7082,8 @@ "alt_codes": [ "VALUE_INVALID", "CHARACTER_INVALID", - "UNITS_INVALID" + "UNITS_INVALID", + "DEF_INVALID" ], "name": "sidecar-braces-invalid-spot", "description": "A curly brace reference must only appear where a tag could.", @@ -7165,7 +7104,7 @@ "event_code": { "HED": { "face": "(Red, Blue), (Green, (Yellow))", - "ball": "(Def/Acc/{response_time})" + "ball": "(Label/{response_time})" } }, "response_time": { @@ -7295,7 +7234,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" } }, "events": [ @@ -7366,7 +7305,7 @@ } }, "response_time": { - "HED": "Label/#, {response_time}" + "HED": "Parameter-value/#, {response_time}" } } ], @@ -7380,7 +7319,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" }, "response_count": { "Description": "A count used to test curly braces in value columns.", @@ -7396,7 +7335,7 @@ }, "response_action": { "Description": "Does not correspond to curly braces", - "HED": "Label/#" + "HED": "Parameter-value/#" } } ] @@ -7417,7 +7356,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#, {response_time}" + "HED": "Parameter-value/#, {response_time}" } }, "events": [ @@ -7470,7 +7409,7 @@ }, "response_time": { "Description": "Has description with HED", - "HED": "Label/#" + "HED": "Parameter-value/#" } }, "events": [ @@ -7941,126 +7880,6 @@ } } }, - { - "error_code": "SIDECAR_INVALID", - "alt_codes": [], - "name": "curly-braces-has-no-hed", - "description": "A column name appears in curly braces, but that column name does not have a HED annotation.", - "warning": false, - "schema": "8.3.0", - "definitions": [ - "(Definition/Acc/#, (Acceleration/#, Red))", - "(Definition/MyColor, (Label/Pie))" - ], - "tests": { - "string_tests": { - "fails": [], - "passes": [] - }, - "sidecar_tests": { - "fails": [ - { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": { - "Description": "This is a response" - } - } - ], - "passes": [ - { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": { - "HED": "Label/#" - } - } - ] - }, - "event_tests": { - "fails": [], - "passes": [] - }, - "combo_tests": { - "fails": [ - { - "sidecar": { - "event_code": { - "HED": { - "face": "Statistical-accuracy/0.677, {response}" - } - }, - "response": "This is a response" - }, - "events": [ - [ - "onset", - "duration", - "event_code", - "response", - "HED" - ], - [ - 4.5, - 0, - "face", - "yes", - "Red, Def/MyColor" - ], - [ - 5.0, - 0, - "ball", - "no", - "Green" - ] - ] - } - ], - "passes": [ - { - "sidecar": { - "event_code": { - "HED": { - "face": "Acceleration/5 m-per-s^2", - "ball": "Def/Acc/7, Blue" - } - } - }, - "events": [ - [ - "onset", - "duration", - "event_code", - "response", - "HED" - ], - [ - 4.5, - 0, - "face", - "yes", - "Red, Def/MyColor" - ], - [ - 5.0, - 0, - "ball", - "no", - "Green" - ] - ] - } - ] - } - } - }, { "error_code": "SIDECAR_KEY_MISSING", "alt_codes": [], @@ -9239,7 +9058,10 @@ }, { "error_code": "TAG_EXTENSION_INVALID", - "alt_codes": [], + "alt_codes": [ + "CHARACTER_INVALID", + "PLACEHOLDER_INVALID" + ], "name": "tag-extension-invalid-bad-node-name", "description": "A tag extension term does not comply with rules for schema nodes.", "warning": false, @@ -15598,6 +15420,69 @@ } } }, + { + "error_code": "VALUE_INVALID", + "alt_codes": [ + "UNITS_INVALID" + ], + "name": "invalid-character-numeric-class", + "description": "An invalid character was used in an 8.3.0 or greater style numeric value class.", + "warning": false, + "schema": "8.3.0", + "definitions": [], + "tests": { + "string_tests": { + "fails": [ + "Weight/3.0$ kg", + "Weight/3.0db kg", + "Weight/3.0& kg", + "Weight/abc kg", + "Weight/*3.0 kg", + "Weight/3.0% kg", + "Weight/3.0^ kg", + "Weight/3.0? kg" + ], + "passes": [ + "Weight/3.0e10 kg", + "Weight/3e10 kg", + "Weight/3.0 kg", + "Weight/3000 kg", + "Weight/3e10 kg", + "Weight/3.5e10 kg", + "Weight/2.998e8 g", + "Weight/6.022e23 g", + "Weight/7.0e-10 g", + "Weight/1.6e-35 kg" + ] + }, + "sidecar_tests": { + "fails": [ + { + "event_code": { + "HED": { + "show": "Weight/3.0a" + } + } + } + ], + "passes": [ + { + "event_code": { + "HED": "Weight/# g" + } + } + ] + }, + "event_tests": { + "fails": [], + "passes": [] + }, + "combo_tests": { + "fails": [], + "passes": [] + } + } + }, { "error_code": "VERSION_DEPRECATED", "alt_codes": [],