Skip to content

Commit

Permalink
feat: Sync datalad validation task configuration to app worker
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Feb 11, 2025
1 parent 5e2dbd1 commit 2be2eda
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
error: [
{ code: "NO_AUTHORS" },
{ code: "SUBJECT_FOLDERS" },
{ code: "EMPTY_DATASET_NAME" },
],
warning: [
{ code: "PARTICIPANT_ID_MISMATCH" },
],
ignore: [],
}
6 changes: 5 additions & 1 deletion services/datalad/datalad_service/tasks/validator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio
from pathlib import Path
import json
import logging
import os
import re

import requests
Expand Down Expand Up @@ -46,9 +46,13 @@ async def validate_dataset_deno_call(dataset_path, ref, logger=logger):
Runs the deno bids-validator process.
"""
# Sync to packages/openneuro-app/src/scripts/workers/schema.worker.ts
config_path = Path(__file__).parent / 'assets' / 'validator-config.json'
return await run_and_decode(
['deno', 'run', '-A',
f'jsr:@bids/validator@{DENO_VALIDATOR_VERSION}',
'--config', str(config_path),
'--blacklistModalities', 'micr',
'--json', dataset_path],
logger=logger
)
Expand Down

0 comments on commit 2be2eda

Please sign in to comment.