Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Participants data always null. Issue 49 never thrown. #1772

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bids-validator/validators/bids/fullTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
const jsonFiles = []
const headers = []
const participants = null
const participants = {list: [], file: null}

Check failure on line 44 in bids-validator/validators/bids/fullTest.js

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 18)

Replace `list:·[],·file:·null` with `·list:·[],·file:·null·`

Check failure on line 44 in bids-validator/validators/bids/fullTest.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 18)

Replace `list:·[],·file:·null` with `·list:·[],·file:·null·`

Check failure on line 44 in bids-validator/validators/bids/fullTest.js

View workflow job for this annotation

GitHub Actions / build (windows-latest, 18)

Replace `list:·[],·file:·null` with `·list:·[],·file:·null·`
const phenotypeParticipants = []

const tsvs = []
Expand Down Expand Up @@ -127,7 +127,6 @@
})
.then(({ tsvIssues, participantsTsvContent }) => {
self.issues = self.issues.concat(tsvIssues)

// extract metadata on participants to metadata.age and
// return metadata on each subject from participants.tsv
summary.subjectMetadata = collectSubjectMetadata(participantsTsvContent)
Expand Down
2 changes: 1 addition & 1 deletion bids-validator/validators/bids/subjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Issue = utils.issues.Issue

const participantsInSubjects = (participants, subjects) => {
const issues = []
if (participants) {
if (participants && participants.file) {
const participantsFromFile = participants.list.sort()
const participantsFromFolders = subjects.sort()
if (
Expand Down
4 changes: 2 additions & 2 deletions bids-validator/validators/tsv/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const validate = (
function (tsvIssues, participantList, stimFiles) {
if (participantList) {
if (file.name.endsWith('participants.tsv')) {
participants = {
Object.assign(participants, {
list: participantList,
file: file,
}
})
// save content for metadata extraction
participantsTsvContent = contents
} else if (file.relativePath.includes('phenotype/')) {
Expand Down
Loading