Skip to content

Commit 9a394f0

Browse files
authored
Merge pull request #241 from effigies/upgrade-schema
chore: Upgrade schema for dev validator
2 parents 1a1b5fd + 078f887 commit 9a394f0

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"imports": {
3030
"@ajv": "npm:[email protected]",
31-
"@bids/schema": "jsr:@bids/schema@^1.1.0-dev.16+a7dd34ad",
31+
"@bids/schema": "jsr:@bids/schema@~1.1.0-dev.43+135cc18d",
3232
"@cliffy/command": "jsr:@effigies/[email protected]",
3333
"@cliffy/table": "jsr:@effigies/[email protected]",
3434
"@hed/validator": "npm:[email protected]",

deno.lock

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/schema/context.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -336,22 +336,6 @@ export class BIDSContext implements Context {
336336
'participant_id'
337337
] as string[]
338338
}
339-
340-
// Load phenotype from phenotype/*.tsv
341-
const phenotype_dir = this.dataset.tree.get('phenotype') as FileTree
342-
if (phenotype_dir) {
343-
const phenotypeFiles = phenotype_dir.files.filter((file) => file.name.endsWith('.tsv'))
344-
// Collect observed participant_ids
345-
const seen = new Set() as Set<string>
346-
for (const file of phenotypeFiles) {
347-
const phenotypeData = await loadTSV(file)
348-
const participant_id = phenotypeData['participant_id'] as string[]
349-
if (participant_id) {
350-
participant_id.forEach((id) => seen.add(id))
351-
}
352-
}
353-
this.dataset.subjects.phenotype = Array.from(seen)
354-
}
355339
}
356340

357341
async asyncLoads() {

src/validators/filenameIdentify.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ Deno.test('test hasMatch', async (t) => {
9393
const file = new BIDSFileDeno(path, fileName, ignore)
9494
const context = new BIDSContext(file)
9595
context.filenameRules = [
96-
'rules.files.raw.task.events__mri',
97-
'rules.files.raw.task.events__pet',
96+
'rules.files.raw.events.events__mri',
97+
'rules.files.raw.events.events__pet',
9898
]
9999
await hasMatch(schema, context)
100100
assertEquals(context.filenameRules.length, 2)

0 commit comments

Comments
 (0)