Skip to content

Commit

Permalink
Merge remote-tracking branches 'upstream/master' and 'upstream/depend…
Browse files Browse the repository at this point in the history
…abot/github_actions/actions/upload-artifact-4' into dependabot/github_actions/actions/download-artifact-4
  • Loading branch information
effigies committed Jan 4, 2024
3 parents cb4c90b + 9e1c9d2 + db60ce1 commit 9a0087a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deno_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
deno-version: v1.x
- run: ./build.ts
working-directory: ./bids-validator
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: main
path: bids-validator/dist/validator
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- push_docker_to_registry
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.13
id: go
Expand Down
2 changes: 1 addition & 1 deletion bids-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"date-fns": "^2.30.0",
"events": "^3.3.0",
"exifreader": "^4.17.0",
"hed-validator": "^3.12.0",
"hed-validator": "^3.13.1",
"ignore": "^5.3.0",
"is-utf8": "^0.2.1",
"jest": "^29.7.0",
Expand Down
12 changes: 7 additions & 5 deletions bids-validator/src/tests/local/empty_files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ Deno.test('empty_files dataset', async (t) => {
})

// *.meg4 and BadChannels files are empty. But only *.meg4 is an issue
/*
* https://github.com/bids-standard/bids-validator/issues/1862
* Commented out meat of tests, and updated first test to expect no issues.
*/
await t.step(
'EMPTY_FILES error is thrown for only sub-0001_task-AEF_run-01_meg.meg4',
() => {
const issue = result.issues.get('EMPTY_FILE')
assert(issue, 'EMPTY_FILES was not thrown as expected')
assertObjectMatch(issue, {
key: 'EMPTY_FILE',
severity: 'error',
})
assertEquals(issue, undefined, 'EMPTY_FILES was not thrown as expected')
/*
assert(
issue.files.get(
'/sub-0001/meg/sub-0001_task-AEF_run-01_meg.ds/sub-0001_task-AEF_run-01_meg.meg4',
Expand All @@ -45,6 +46,7 @@ Deno.test('empty_files dataset', async (t) => {
undefined,
'BadChannels should not be included in EMPTY_FILES error',
)
*/
},
)
})
16 changes: 2 additions & 14 deletions bids-validator/validators/hed.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,8 @@ function getSidecarFileObject(sidecarName, jsonFiles) {

function detectHed(tsvData, sidecarData) {
return (
sidecarData.some((sidecarFileData) => {
return Object.values(sidecarFileData.sidecarData).some(sidecarValueHasHed)
}) ||
tsvData.some((tsvFileData) => {
return tsvFileData.parsedTsv.headers.indexOf('HED') !== -1
})
)
}

function sidecarValueHasHed(sidecarValue) {
return (
sidecarValue !== null &&
typeof sidecarValue === 'object' &&
sidecarValue.HED !== undefined
sidecarData.some((sidecarFileData) => sidecarFileData.hasHedData()) ||
tsvData.some((tsvFileData) => tsvFileData.hasHedData())
)
}

Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a0087a

Please sign in to comment.