From f9e214dd524c32c0a1556175494e4abe96461912 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Thu, 13 Feb 2025 15:50:22 -0500 Subject: [PATCH 1/2] fix: Load subjects Type checker doesn't like it, but this fixes it for now. The real fix I think will be to only call the function once, so we can get rid of the `null` check. --- src/schema/context.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/schema/context.ts b/src/schema/context.ts index 7280970d..fbff2dc5 100644 --- a/src/schema/context.ts +++ b/src/schema/context.ts @@ -63,11 +63,8 @@ export class BIDSContextDataset implements Dataset { ?.filter((ext) => ext.endsWith('/')) : [], ) - this.subjects = args.subjects || { - sub_dirs: this.tree.directories.map((dir) => dir.name).filter((dir) => - dir.startsWith('sub-') - ), - } + // @ts-ignore + this.subjects = args.subjects || null } get dataset_description(): Record { From 30ae278f2a81272b459ac920dc5084836ff4fb69 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 14 Feb 2025 10:09:21 -0500 Subject: [PATCH 2/2] doc: Changelog entry --- ...0250214_094554_markiewicz_load_subjects.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 changelog.d/20250214_094554_markiewicz_load_subjects.md diff --git a/changelog.d/20250214_094554_markiewicz_load_subjects.md b/changelog.d/20250214_094554_markiewicz_load_subjects.md new file mode 100644 index 00000000..9ab3929a --- /dev/null +++ b/changelog.d/20250214_094554_markiewicz_load_subjects.md @@ -0,0 +1,51 @@ + + + + + +### Fixed + +- Subject detection in `participants.tsv` and `phenotype/` directories + has been restored, enabling checks that were deactivated by the missing + data. ([#162]) + +[#162]: https://github.com/bids-standard/bids-validator/pull/162 + + + + +