File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 11
2+ <a id =' changelog-2.0.7 ' ></a >
3+ # 2.0.7 — 2025-06-03
4+
5+ ## Changed
6+
7+ - Handle TSV schema rules with missing or ` n/a ` values for ` additional_columns ` .
8+
29<a id =' changelog-"2.0.6" ' ></a >
310# "2.0.6" — 2025-05-23
411
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ build = "cp39-*"
4343skip = " *musllinux* *_i686 *-win32"
4444build-frontend = " build"
4545
46- manylinux-x86_64-image = " quay.io/pypa/manylinux_2_24_x86_64 :latest"
47- manylinux-aarch64-image = " quay.io/pypa/manylinux_2_24_aarch64 :latest"
46+ manylinux-x86_64-image = " quay.io/pypa/manylinux_2_28_x86_64 :latest"
47+ manylinux-aarch64-image = " quay.io/pypa/manylinux_2_28_aarch64 :latest"
4848
4949before-build = " curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh && deno --version"
5050test-command = " bids-validator-deno --version"
Original file line number Diff line number Diff line change @@ -239,6 +239,11 @@ export function evalAdditionalColumns(
239239 if ( context . extension !== '.tsv' ) return
240240 const headers = Object . keys ( context ?. columns )
241241 if ( rule . columns ) {
242+ if ( ! rule . additional_columns || rule . additional_columns === 'n/a' ) {
243+ // Old schemas might be missing the field, so be permissive.
244+ // New schemas indicate it is not applicable with 'n/a'.
245+ return
246+ }
242247 const ruleHeadersNames = Object . keys ( rule . columns ) . map (
243248 // @ts -expect-error
244249 ( x ) => schema . objects . columns [ x ] . name ,
@@ -250,11 +255,11 @@ export function evalAdditionalColumns(
250255 if ( rule . additional_columns ?. startsWith ( 'allowed' ) ) {
251256 extraCols = extraCols . filter ( ( header ) => ! ( header in context . sidecar ) )
252257 }
253- const code = rule . additional_columns === 'allowed '
254- ? 'TSV_ADDITIONAL_COLUMNS_UNDEFINED '
258+ const code = rule . additional_columns === 'not_allowed '
259+ ? 'TSV_ADDITIONAL_COLUMNS_NOT_ALLOWED '
255260 : rule . additional_columns === 'allowed_if_defined'
256261 ? 'TSV_ADDITIONAL_COLUMNS_MUST_DEFINE'
257- : 'TSV_ADDITIONAL_COLUMNS_NOT_ALLOWED '
262+ : 'TSV_ADDITIONAL_COLUMNS_UNDEFINED '
258263 const issue = {
259264 code,
260265 location : context . path ,
You can’t perform that action at this time.
0 commit comments