Validation model

Validation model#

The basic process of the BIDS validator operates according to the following Python-like pseudocode:

def validate(directory):
    fileTree = loadFileTree(directory)
    dataset = buildDatasetContext(fileTree)

    for file in walk(dataset.fileTree):
        file_context = buildFileContext(dataset, file)
        for check in perFileChecks:
            check(file_context)

    for check in datasetChecks:
        check(dataset)

The following sections will describe the the validation context and our implementation of the Inheritance Principle.