Skip to content

Commit 10df157

Browse files
authored
Merge pull request #1099 from bids-standard/skip_session_checks
Skip session checks
2 parents 556e86d + e9b8697 commit 10df157

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

bids-validator-web/components/App.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const initState = () => ({
2323
options: {
2424
ignoreWarnings: false,
2525
ignoreNiftiHeaders: false,
26+
ignoreSubjectConsistency: false
2627
},
2728
})
2829

bids-validator-web/components/Options.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ const Options = ({ setOption, options }) => (
88
<label htmlFor="ignoreWarnings">Ignore Warnings</label>
99
<input name="ignoreNiftiHeaders" type="checkbox" checked={options.ignoreNiftiHeaders} readOnly />
1010
<label htmlFor="ignoreNiftiHeaders">Ignore NIfTI Headers</label>
11+
<input name="ignoreSubjectConsistency" type="checkbox" checked={options.ignoreSubjectConsistency} readOnly />
12+
<label htmlFor="ignoreSubjectConsistency">
13+
Skip Subject Filename Consistency Check
14+
</label>
1115
</form>
1216
<hr />
1317
</>
1418
)
1519

16-
export default Options
20+
export default Options

bids-validator/bin/bids-validator

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ var argv = require('yargs')
1616
'ignoreNiftiHeaders',
1717
'Disregard NIfTI header content during validation',
1818
)
19+
.boolean('ignoreSubjectConsistency')
20+
.describe(
21+
'ignoreSubjectConsistency',
22+
'Skip checking that any given file for one subject is present for all other subjects.',
23+
)
1924
.boolean('verbose')
2025
.describe('verbose', 'Log more extensive information about issues')
2126
.boolean('json')

bids-validator/utils/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default {
1515
ignoreWarnings: Boolean(options.ignoreWarnings),
1616
ignoreNiftiHeaders: Boolean(options.ignoreNiftiHeaders),
1717
ignoreSymlinks: Boolean(options.ignoreSymlinks),
18+
ignoreSubjectConsistency: Boolean(options.ignoreSubjectConsistency),
1819
verbose: Boolean(options.verbose),
1920
gitTreeMode: Boolean(options.gitTreeMode),
2021
remoteFiles: Boolean(options.remoteFiles),

bids-validator/validators/bids/fullTest.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@ const fullTest = (fileList, options, annexed, dir, callback) => {
194194
// Validate continous recording files
195195
self.issues = self.issues.concat(tsv.validateContRec(files.contRecord, jsonContentsDict))
196196

197-
// Validate session files
198-
self.issues = self.issues.concat(session(fileList))
197+
if (!options.ignoreSubjectConsistency) {
198+
// Validate session files
199+
self.issues = self.issues.concat(session(fileList))
200+
}
199201

200202
// Determine if each subject has data present
201203
self.issues = self.issues.concat(

0 commit comments

Comments
 (0)