From dd9715672346e490be02fa22f6b9e89c2926f955 Mon Sep 17 00:00:00 2001 From: Alexander Jones Date: Mon, 4 Nov 2024 10:27:05 -0600 Subject: [PATCH] Reorganize non-code data files --- common/schema/config.js | 18 +++++++++--------- .../event => data/json}/specialTags.json | 0 data/{ => schemas}/HED8.0.0.xml | 0 data/{ => schemas}/HED8.1.0.xml | 0 data/{ => schemas}/HED8.2.0.xml | 0 data/{ => schemas}/HED8.3.0.xml | 0 data/{ => schemas}/HED_lang_1.0.0.xml | 0 data/{ => schemas}/HED_score_1.0.0.xml | 0 data/{ => schemas}/HED_score_1.1.0.xml | 0 data/{ => schemas}/HED_score_2.0.0.xml | 0 data/{ => schemas}/HED_testlib_1.0.2.xml | 0 data/{ => schemas}/HED_testlib_2.0.0.xml | 0 validator/event/special.js | 2 +- validator/event/validator.js | 2 +- 14 files changed, 11 insertions(+), 11 deletions(-) rename {validator/event => data/json}/specialTags.json (100%) rename data/{ => schemas}/HED8.0.0.xml (100%) rename data/{ => schemas}/HED8.1.0.xml (100%) rename data/{ => schemas}/HED8.2.0.xml (100%) rename data/{ => schemas}/HED8.3.0.xml (100%) rename data/{ => schemas}/HED_lang_1.0.0.xml (100%) rename data/{ => schemas}/HED_score_1.0.0.xml (100%) rename data/{ => schemas}/HED_score_1.1.0.xml (100%) rename data/{ => schemas}/HED_score_2.0.0.xml (100%) rename data/{ => schemas}/HED_testlib_1.0.2.xml (100%) rename data/{ => schemas}/HED_testlib_2.0.0.xml (100%) diff --git a/common/schema/config.js b/common/schema/config.js index 007e0fa8..40ae694f 100644 --- a/common/schema/config.js +++ b/common/schema/config.js @@ -1,13 +1,13 @@ /** Bundled HED schema configuration. */ export const localSchemaList = new Map([ - ['HED8.0.0', require('../../data/HED8.0.0.xml')], - ['HED8.1.0', require('../../data/HED8.1.0.xml')], - ['HED8.2.0', require('../../data/HED8.2.0.xml')], - ['HED8.3.0', require('../../data/HED8.3.0.xml')], - ['HED_score_1.0.0', require('../../data/HED_score_1.0.0.xml')], - ['HED_score_1.1.0', require('../../data/HED_score_1.1.0.xml')], - ['HED_score_2.0.0', require('../../data/HED_score_2.0.0.xml')], - ['HED_testlib_1.0.2', require('../../data/HED_testlib_1.0.2.xml')], - ['HED_testlib_2.0.0', require('../../data/HED_testlib_2.0.0.xml')], + ['HED8.0.0', require('../../data/schemas/HED8.0.0.xml')], + ['HED8.1.0', require('../../data/schemas/HED8.1.0.xml')], + ['HED8.2.0', require('../../data/schemas/HED8.2.0.xml')], + ['HED8.3.0', require('../../data/schemas/HED8.3.0.xml')], + ['HED_score_1.0.0', require('../../data/schemas/HED_score_1.0.0.xml')], + ['HED_score_1.1.0', require('../../data/schemas/HED_score_1.1.0.xml')], + ['HED_score_2.0.0', require('../../data/schemas/HED_score_2.0.0.xml')], + ['HED_testlib_1.0.2', require('../../data/schemas/HED_testlib_1.0.2.xml')], + ['HED_testlib_2.0.0', require('../../data/schemas/HED_testlib_2.0.0.xml')], ]) diff --git a/validator/event/specialTags.json b/data/json/specialTags.json similarity index 100% rename from validator/event/specialTags.json rename to data/json/specialTags.json diff --git a/data/HED8.0.0.xml b/data/schemas/HED8.0.0.xml similarity index 100% rename from data/HED8.0.0.xml rename to data/schemas/HED8.0.0.xml diff --git a/data/HED8.1.0.xml b/data/schemas/HED8.1.0.xml similarity index 100% rename from data/HED8.1.0.xml rename to data/schemas/HED8.1.0.xml diff --git a/data/HED8.2.0.xml b/data/schemas/HED8.2.0.xml similarity index 100% rename from data/HED8.2.0.xml rename to data/schemas/HED8.2.0.xml diff --git a/data/HED8.3.0.xml b/data/schemas/HED8.3.0.xml similarity index 100% rename from data/HED8.3.0.xml rename to data/schemas/HED8.3.0.xml diff --git a/data/HED_lang_1.0.0.xml b/data/schemas/HED_lang_1.0.0.xml similarity index 100% rename from data/HED_lang_1.0.0.xml rename to data/schemas/HED_lang_1.0.0.xml diff --git a/data/HED_score_1.0.0.xml b/data/schemas/HED_score_1.0.0.xml similarity index 100% rename from data/HED_score_1.0.0.xml rename to data/schemas/HED_score_1.0.0.xml diff --git a/data/HED_score_1.1.0.xml b/data/schemas/HED_score_1.1.0.xml similarity index 100% rename from data/HED_score_1.1.0.xml rename to data/schemas/HED_score_1.1.0.xml diff --git a/data/HED_score_2.0.0.xml b/data/schemas/HED_score_2.0.0.xml similarity index 100% rename from data/HED_score_2.0.0.xml rename to data/schemas/HED_score_2.0.0.xml diff --git a/data/HED_testlib_1.0.2.xml b/data/schemas/HED_testlib_1.0.2.xml similarity index 100% rename from data/HED_testlib_1.0.2.xml rename to data/schemas/HED_testlib_1.0.2.xml diff --git a/data/HED_testlib_2.0.0.xml b/data/schemas/HED_testlib_2.0.0.xml similarity index 100% rename from data/HED_testlib_2.0.0.xml rename to data/schemas/HED_testlib_2.0.0.xml diff --git a/validator/event/special.js b/validator/event/special.js index eb5228fc..69f9a5b6 100644 --- a/validator/event/special.js +++ b/validator/event/special.js @@ -1,4 +1,4 @@ -import specialTags from './specialTags.json' +import specialTags from '../../data/json/specialTags.json' import { ParsedHedGroup } from '../../parser/parsedHedGroup' import { ParsedHedTag } from '../../parser/parsedHedTag' diff --git a/validator/event/validator.js b/validator/event/validator.js index 49b71ac4..85f1df33 100644 --- a/validator/event/validator.js +++ b/validator/event/validator.js @@ -5,7 +5,7 @@ import { Schemas } from '../../common/schema/types' const NAME_CLASS_REGEX = /^[\w\-\u0080-\uFFFF]+$/ const uniqueType = 'unique' const requiredType = 'required' -const specialTags = require('./specialTags.json') +const specialTags = require('../../data/json/specialTags.json') // Validation tests /**