Skip to content

Commit 60b5168

Browse files
committed
hack: Load datatype before associations
1 parent e6abc84 commit 60b5168

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/schema/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { loadHeader } from '../files/nifti.ts'
2525
import { buildAssociations } from './associations.ts'
2626
import type { ValidatorOptions } from '../setup/options.ts'
2727
import { logger } from '../utils/logger.ts'
28+
import { datatypeFromDirectory } from '../validators/filenameIdentify.ts'
2829

2930
export class BIDSContextDataset implements Dataset {
3031
#dataset_description: Record<string, unknown> = {}
@@ -162,6 +163,7 @@ export class BIDSContext implements Context {
162163
this.columns = new ColumnsMap() as Record<string, string[]>
163164
this.json = {}
164165
this.associations = {} as Associations
166+
datatypeFromDirectory(this.dataset.schema, this)
165167
}
166168

167169
get schema(): Schema {

src/validators/filenameIdentify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type { CheckFunction } from '../types/check.ts'
2020
import { lookupEntityLiteral } from './filenameValidate.ts'
2121

2222
const CHECKS: CheckFunction[] = [
23-
datatypeFromDirectory,
23+
// datatypeFromDirectory,
2424
findRuleMatches,
2525
hasMatch,
2626
cleanContext,

0 commit comments

Comments
 (0)