Skip to content

Commit

Permalink
Use stable HED 8.0.0 schema instead of last beta version
Browse files Browse the repository at this point in the history
  • Loading branch information
happy5214 committed Aug 13, 2021
1 parent e82881d commit 680b7b1
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 36 deletions.
2 changes: 1 addition & 1 deletion converter/__tests__/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const schema = require('../schema')
const generateIssue = require('../issues')

describe('HED string conversion', () => {
const hedSchemaFile = 'tests/data/HED8.0.0-beta.5.xml'
const hedSchemaFile = 'tests/data/HED8.0.0.xml'
let schemaPromise

beforeAll(() => {
Expand Down
91 changes: 61 additions & 30 deletions tests/data/HED8.0.0-beta.5.xml → tests/data/HED8.0.0.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<HED version="8.0.0-beta.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://github.com/hed-standard/hed-specification/raw/master/hedxml/HED8.0.0-beta.3.xsd">
<prologue>This schema is the first version that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections.
<HED version="8.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://github.com/hed-standard/hed-specification/raw/master/hedxml/HED8.0.0.xsd">
<prologue>This schema is the first official release that includes an xsd and requires unit class, unit modifier, value class, schema attribute and property sections.
</prologue>
<schema>
<node>
Expand All @@ -21,7 +21,7 @@
</node>
<node>
<name>Agent-action</name>
<description>Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experimental-participant.</description>
<description>Any action engaged in by an agent (see the Agent subtree for agent categories). A participant response to an experiment stimulus should include the tag Agent-property/Agent-task-role/Experiment-participant.</description>
<attribute>
<name>suggestedTag</name>
<value>Task-event-role</value>
Expand All @@ -30,7 +30,7 @@
</node>
<node>
<name>Data-feature</name>
<description>An event marking the occurrence of a data feature such as an interictal spike or alpha burst, often added post hoc to the data record.</description>
<description>An event marking the occurrence of a data feature such as an interictal spike or alpha burst that is often added post hoc to the data record.</description>
<attribute>
<name>suggestedTag</name>
<value>Data-property</value>
Expand Down Expand Up @@ -555,6 +555,10 @@
<description>Move at a regular pace by lifting and setting down each foot in turn never having both feet off the ground at once.</description>
</node>
</node>
<node>
<name>Move-torso</name>
<description>Move body trunk.</description>
</node>
<node>
<name>Move-upper-extremity</name>
<description>Move arm, shoulder, and/or hand.</description>
Expand Down Expand Up @@ -2645,14 +2649,28 @@
<node>
<name>Backward</name>
<description>Directed behind or to the rear.</description>
<attribute>
<name>relatedTag</name>
<value>Forward</value>
</attribute>
</node>
<node>
<name>Downward</name>
<description>Moving or leading toward a lower place or level.</description>
<attribute>
<name>relatedTag</name>
<value>Leftward</value>
<value>Rightward</value>
<value>Upward</value>
</attribute>
</node>
<node>
<name>Forward</name>
<description>At or near or directed toward the front.</description>
<attribute>
<name>relatedTag</name>
<value>Backward</value>
</attribute>
</node>
<node>
<name>Horizontally-oriented</name>
Expand All @@ -2661,22 +2679,44 @@
<node>
<name>Leftward</name>
<description>Going toward or facing the left.</description>
<attribute>
<name>relatedTag</name>
<value>Downward</value>
<value>Rightward</value>
<value>Upward</value>
</attribute>
</node>
<node>
<name>Oblique</name>
<description>Slanting or inclined in direction or course or position; neither parallel nor perpendicular nor right-angular.</description>
<attribute>
<name>relatedTag</name>
<value>Rotated</value>
</attribute>
</node>
<node>
<name>Rightward</name>
<description>Going toward or situated on the right.</description>
<attribute>
<name>relatedTag</name>
<value>Downward</value>
<value>Leftward</value>
<value>Upward</value>
</attribute>
</node>
<node>
<name>Rotated</name>
<description>Move or cause to move in a circle around an axis or center.</description>
<description>Positioned offset around an axis or center.</description>
</node>
<node>
<name>Upward</name>
<description>Moving, pointing, or leading to a higher place, point, or level.</description>
<attribute>
<name>relatedTag</name>
<value>Downward</value>
<value>Leftward</value>
<value>Rightward</value>
</attribute>
</node>
<node>
<name>Vertically-oriented</name>
Expand Down Expand Up @@ -5911,35 +5951,42 @@
<description>Should be in 24-hour format.</description>
</unit>
</unitClassDefinition>
<unitClassDefinition>
<name>weightUnits</name>
<unitClassDefinition>
<name>volumeUnits</name>
<attribute>
<name>defaultUnits</name>
<value>g</value>
<value>m^3</value>
</attribute>
<unit>
<name>g</name>
<name>m^3</name>
<attribute>
<name>SIUnit</name>
</attribute>
<attribute>
<name>unitSymbol</name>
</attribute>
</unit>
</unitClassDefinition>
<unitClassDefinition>
<name>weightUnits</name>
<attribute>
<name>defaultUnits</name>
<value>g</value>
</attribute>
<unit>
<name>gram</name>
<name>g</name>
<attribute>
<name>SIUnit</name>
</attribute>
<attribute>
<name>unitSymbol</name>
</attribute>
</unit>
<unit>
<name>g</name>
<name>gram</name>
<attribute>
<name>SIUnit</name>
</attribute>
<attribute>
<name>unitSymbol</name>
</attribute>
</unit>
<unit>
<name>pound</name>
Expand All @@ -5948,22 +5995,6 @@
<name>lb</name>
</unit>
</unitClassDefinition>
<unitClassDefinition>
<name>volumeUnits</name>
<attribute>
<name>defaultUnits</name>
<value>m^3</value>
</attribute>
<unit>
<name>m^3</name>
<attribute>
<name>SIUnit</name>
</attribute>
<attribute>
<name>unitSymbol</name>
</attribute>
</unit>
</unitClassDefinition>
</unitClassDefinitions>
<unitModifierDefinitions>
<unitModifierDefinition>
Expand Down
2 changes: 1 addition & 1 deletion tests/dataset.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const generateValidationIssue = require('../utils/issues/issues').generateIssue
const generateConverterIssue = require('../converter/issues')

describe('HED dataset validation', () => {
const hedSchemaFile = 'tests/data/HED8.0.0-beta.5.xml'
const hedSchemaFile = 'tests/data/HED8.0.0.xml'
let hedSchemaPromise

beforeAll(() => {
Expand Down
2 changes: 1 addition & 1 deletion tests/event.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ describe('HED string and event validation', () => {
})

describe('HED-3G schemas', () => {
const hedSchemaFile = 'tests/data/HED8.0.0-beta.5.xml'
const hedSchemaFile = 'tests/data/HED8.0.0.xml'
let hedSchemaPromise

beforeAll(() => {
Expand Down
6 changes: 3 additions & 3 deletions tests/schema.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const schemaUtils = require('../utils/schema')
describe('HED schemas', () => {
describe('Remote HED schemas', () => {
it('can be loaded from a central GitHub repository', () => {
const remoteHedSchemaVersion = '7.1.1'
const remoteHedSchemaVersion = '8.0.0'
return schema
.buildSchema({ version: remoteHedSchemaVersion })
.then((hedSchemas) => {
Expand Down Expand Up @@ -314,7 +314,7 @@ describe('HED schemas', () => {
})

describe('HED-3G schemas', () => {
const localHedSchemaFile = 'tests/data/HED8.0.0-beta.5.xml'
const localHedSchemaFile = 'tests/data/HED8.0.0.xml'
let hedSchemaPromise

beforeAll(() => {
Expand Down Expand Up @@ -446,7 +446,7 @@ describe('HED schemas', () => {
)
}

const expectedTagCount = 1108
const expectedTagCount = 1109
const expectedUnitClassCount = 28 - 1
assert.lengthOf(
Object.keys(hedSchemas.baseSchema.attributes.tags),
Expand Down

0 comments on commit 680b7b1

Please sign in to comment.