Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bids-standard/bids-validator into…
Browse files Browse the repository at this point in the history
… fix/deno_2_test_and_build
  • Loading branch information
rwblair committed Oct 17, 2024
2 parents c9ed50c + bec5fea commit 064fea7
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 18 deletions.
4 changes: 2 additions & 2 deletions bids-validator/build.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run --reload
/**
* Build the schema based validator for distribution (web and npm), targets browser compatible ESM
*
* If you would like to use this package in a Node.js project, you'll need to use native ESM or a transform system
*/
import * as esbuild from 'https://deno.land/x/esbuild@v0.24.0/mod.js'
import { parse } from 'https://deno.land/std@0.223.0/flags/mod.ts'
import { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.11.0"
import { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.10.3"
import * as path from "https://deno.land/std@0.223.0/path/mod.ts"
import { getVersion } from './src/version.ts'

Expand Down
2 changes: 1 addition & 1 deletion bids-validator/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bids/validator",
"version": "1.14.13",
"version": "1.14.14",
"exports": {
".": "./src/bids-validator.ts",
"./main": "./src/main.ts",
Expand Down
2 changes: 1 addition & 1 deletion legacy/bids-validator-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bids-validator-web",
"version": "1.14.14-dev.0",
"version": "1.14.15-dev.0",
"description": "web client for bids-validator",
"main": "index.js",
"license": "MIT",
Expand Down
11 changes: 11 additions & 0 deletions legacy/bids-validator/bids_validator/rules/file_level_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@
"@@@_anat_ext_@@@": ["nii\\.gz", "nii", "json"]
}
},
"anat_cont": {
"regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?anat[\\/\\\\]\\1(_\\2)?(?:_task-[a-zA-Z0-9]+)?(?:_acq-[a-zA-Z0-9]+)?(?:_ce-[a-zA-Z0-9]+)?(?:_rec-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?(?:_echo-[0-9]+)?(?:_part-(imag|mag|phase|real))?(?:_recording-[a-zA-Z0-9]+)?(?:_chunk-[0-9]+)?(?:@@@_cont_ext_@@@)$",
"tokens": {
"@@@_cont_ext_@@@": [
"_physio\\.tsv\\.gz",
"_stim\\.tsv\\.gz",
"_physio\\.json",
"_stim\\.json"
]
}
},

"behavioral": {
"regexp": "^[\\/\\\\](sub-[a-zA-Z0-9]+)[\\/\\\\](?:(ses-[a-zA-Z0-9]+)[\\/\\\\])?beh[\\/\\\\]\\1(_\\2)?_task-[a-zA-Z0-9]+(?:_acq-[a-zA-Z0-9]+)?(?:_run-[0-9]+)?((?:@@@_behavioral_ext_@@@)|(?:_recording-[a-zA-Z0-9]+)?(?:@@@_cont_ext_@@@))$",
Expand Down
2 changes: 1 addition & 1 deletion legacy/bids-validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bids-validator",
"version": "1.14.14-dev.0",
"version": "1.14.15-dev.0",
"description": "",
"main": "./dist/commonjs/index.js",
"exports": {
Expand Down
4 changes: 3 additions & 1 deletion legacy/bids-validator/utils/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const anatMultiInv = buildRegExp(file_level_rules.anat_multiinv)
const anatMP2RAGE = buildRegExp(file_level_rules.anat_mp2rage)
const anatVFAMT = buildRegExp(file_level_rules.anat_vfa_mt)
const anatMTR = buildRegExp(file_level_rules.anat_mtr)
const anatCont = buildRegExp(file_level_rules.anat_cont)
const behavioralData = buildRegExp(file_level_rules.behavioral)
const dwiData = buildRegExp(file_level_rules.dwi)
const eegData = buildRegExp(file_level_rules.eeg)
Expand Down Expand Up @@ -242,7 +243,8 @@ export default {
conditionalMatch(anatMultiInv, path) ||
conditionalMatch(anatMP2RAGE, path) ||
conditionalMatch(anatVFAMT, path) ||
conditionalMatch(anatMTR, path)
conditionalMatch(anatMTR, path) ||
conditionalMatch(anatCont, path)
)
},

Expand Down
11 changes: 4 additions & 7 deletions legacy/bids-validator/validators/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ import isNode from '../utils/isNode'
* files from the set.
*/
const session = function missingSessionFiles(fileList) {
const issues = []
const { subjects, sessions } = getDataOrganization(fileList)

issues.push(...missingSessionWarnings(subjects, sessions))

const subject_files = getSubjectFiles(subjects)
issues.push(...missingFileWarnings(subjects, subject_files))

return issues
return [
...missingSessionWarnings(subjects, sessions),
...missingFileWarnings(subjects, subject_files),
]
}

/**
Expand Down
2 changes: 1 addition & 1 deletion legacy/lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packages": ["bids-validator", "bids-validator-web"],
"version": "1.14.14-dev.0"
"version": "1.14.15-dev.0"
}
8 changes: 4 additions & 4 deletions legacy/package-lock.json

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

0 comments on commit 064fea7

Please sign in to comment.