Skip to content

Commit 7f75740

Browse files
authored
Merge pull request #681 from sappelhoff/remove_optional_6_10
[MRG] remove optional arguments bep006 and bep010
2 parents fcf507f + b7cde3a commit 7f75740

File tree

10 files changed

+12
-25
lines changed

10 files changed

+12
-25
lines changed

bids-validator/bin/bids-validator

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ var argv = require('yargs')
1717
.describe('verbose', 'Log more extensive information about issues')
1818
.boolean('json')
1919
.describe('json', 'Output results as JSON')
20-
.boolean('bep006')
21-
.describe('bep006', 'Enable support for BIDS Extension Proposal 006')
22-
.boolean('bep010')
23-
.describe('bep010', 'Enable support for BIDS extension proposal 010')
2420
.option('config', {
2521
alias: 'c',
2622
describe: 'Optional configuration file. See https://github.com/bids-standard/bids-validator for more info'

bids-validator/tests/utils/issues.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ describe('issues', () => {
2020
ignoreWarnings: false,
2121
ignoreNiftiHeaders: false,
2222
verbose: false,
23-
bep006: false,
24-
bep010: false,
2523
config: {},
2624
}
2725
formattedIssues = utils.issues.exceptionHandler(

bids-validator/utils/modalities.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
return modalities
4141
},
4242

43-
isCorrectModality: (path, options) => {
43+
isCorrectModality: path => {
4444
let isCorrectModality = false
4545
// MRI
4646
if (
@@ -57,11 +57,11 @@ module.exports = {
5757
break
5858
case 'eeg':
5959
// EEG
60-
isCorrectModality = !!options.bep006
60+
isCorrectModality = true
6161
break
6262
case 'ieeg':
6363
// iEEG
64-
isCorrectModality = !!options.bep010
64+
isCorrectModality = true
6565
break
6666
default:
6767
break

bids-validator/utils/options.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ module.exports = {
1111
ignoreWarnings: options.ignoreWarnings ? true : false,
1212
ignoreNiftiHeaders: options.ignoreNiftiHeaders ? true : false,
1313
verbose: options.verbose ? true : false,
14-
bep006: options.bep006 ? true : false,
15-
bep010: options.bep010 ? true : false,
1614
config: options.config ? options.config : {},
1715
}
1816
if (options.config && typeof options.config !== 'boolean') {

bids-validator/utils/summary/collectSessions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const collectSessions = (fileList, options) => {
66
const file = fileList[key]
77
if (
88
!type.file.isStimuliData(file.relativePath) &&
9-
type.isBIDS(file.relativePath, options.bep006, options.bep010)
9+
type.isBIDS(file.relativePath)
1010
) {
1111
const pathValues = type.getPathValues(file.relativePath)
1212
const isEmptyRoom = pathValues.sub && pathValues.sub == 'emptyroom'

bids-validator/utils/summary/collectSubjects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const collectSubjects = (fileList, options) => {
77
const file = fileList[key]
88
if (
99
!type.file.isStimuliData(file.relativePath) &&
10-
type.isBIDS(file.relativePath, options.bep006, options.bep010)
10+
type.isBIDS(file.relativePath)
1111
) {
1212
const pathValues = type.getPathValues(file.relativePath)
1313
const isEmptyRoom = pathValues.sub && pathValues.sub == 'emptyroom'

bids-validator/utils/type.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
* Check if a given path is valid within the
6464
* bids spec.
6565
*/
66-
isBIDS: function(path, bep006, bep010) {
66+
isBIDS: function(path) {
6767
return (
6868
this.file.isTopLevel(path) ||
6969
this.file.isStimuliData(path) ||
@@ -73,8 +73,8 @@ module.exports = {
7373
this.file.isDWI(path) ||
7474
this.file.isFunc(path) ||
7575
this.file.isMeg(path) ||
76-
(this.file.isIEEG(path) && bep010) ||
77-
(this.file.isEEG(path) && bep006) ||
76+
this.file.isIEEG(path) ||
77+
this.file.isEEG(path) ||
7878
this.file.isBehavioral(path) ||
7979
this.file.isCont(path) ||
8080
this.file.isFieldMap(path) ||

bids-validator/validators/bids/groupFileTypes.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ const sortFiles = (fileList, options, files) => {
2626
// collect stimuli
2727
files.stimuli.push(file)
2828
files.misc.push(file)
29-
} else if (
30-
!utils.type.isBIDS(file.relativePath, options.bep006, options.bep010)
31-
) {
29+
} else if (!utils.type.isBIDS(file.relativePath)) {
3230
// invalid file type
3331
files.invalid.push(file)
3432
files.misc.push(file)

bids-validator/validators/bids/quickTest.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const utils = require('../../utils')
88
* otherwise it will throw a callback with a
99
* generic error.
1010
*/
11-
const quickTest = (fileList, options) => {
11+
const quickTest = fileList => {
1212
const keys = Object.keys(fileList)
1313
const couldBeBIDS = keys.some(key => {
1414
const file = fileList[key]
@@ -17,10 +17,7 @@ const quickTest = (fileList, options) => {
1717
path = path.split('/')
1818
path = path.reverse()
1919

20-
const isCorrectModality = utils.modalities.isCorrectModality(
21-
path,
22-
options,
23-
)
20+
const isCorrectModality = utils.modalities.isCorrectModality(path)
2421
let pathIsSesOrSub =
2522
path[2] &&
2623
(path[2].indexOf('ses-') == 0 || path[2].indexOf('sub-') == 0)

bids-validator/validators/bids/start.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const start = (dir, options, callback) => {
2424
BIDS.options = options
2525
reset(BIDS)
2626
utils.files.readDir(dir, function(files) {
27-
const couldBeBIDS = quickTest(files, BIDS.options)
27+
const couldBeBIDS = quickTest(files)
2828
if (couldBeBIDS) {
2929
// Is the dir using git-annex?
3030
const annexed = utils.files.remoteFiles.isGitAnnex(dir)

0 commit comments

Comments
 (0)