Skip to content

Commit

Permalink
Merge pull request #142 from hed-standard/delete-stub-bids-schema-fun…
Browse files Browse the repository at this point in the history
…ctions

Delete unused functions related to BIDS schema spec parsing
  • Loading branch information
happy5214 authored Mar 8, 2024
2 parents 28c0c59 + ef9a681 commit b458473
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions bids/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,11 @@ export function validateSchemasSpec(schemasSpec) {
const newSchemasSpec = new SchemasSpec()
newSchemasSpec.data = schemasSpec
return [newSchemasSpec, []]
} else if ('version' in schemasSpec || 'path' in schemasSpec || 'libraries' in schemasSpec) {
return [convertOldSpecToSchemasSpec(schemasSpec), []]
} else {
return [null, [generateIssue('invalidSchemaSpecification', { spec: JSON.stringify(schemasSpec) })]]
}
}

function convertOldSpecToSchemasSpec(oldSpec) {
const newSpec = new SchemasSpec()
// TODO: implement
return newSpec
}

export function parseSchemasSpec(hedVersion) {
const schemasSpec = new SchemasSpec()
const processVersion = asArray(hedVersion)
Expand Down Expand Up @@ -120,11 +112,3 @@ function splitLibraryAndVersion(schemaVersion, originalVersion) {
}
return [[library, version], []]
}

export function validateSchemaSpec(schemaSpec) {
// ToDO: implement
if (!(schemaSpec instanceof SchemaSpec)) {
return [null, [generateIssue('invalidSchemaSpecification', { spec: JSON.stringify(schemaSpec) })]]
}
return [schemaSpec, []]
}

0 comments on commit b458473

Please sign in to comment.