This is a package for diagnosing and fixing issues on OpenNeuro.
This package is not currently published on PyPI.
To install, clone the repository and run uv sync:
git clone https://github.com/OpenNeuroOrg/ondiagnostics
cd ondiagnostics
uv syncYou can also use uv tool install:
uv tool install git+https://github.com/OpenNeuroOrg/ondiagnosticsOpenNeuro exports published datasets to GitHub as the final action in release. This utility identifies datasets that do not contain the latest version, which can be indicative of a larger export failure.
ondiagnostics check-syncOpenNeuro's export process should ensure that fetching the dataset from S3
use aws s3 sync fetches the latest version.
In some cases, files from previous versions are not marked as deleted, so
excess files are downloaded.
ondiagnostics clean-s3 --dry-runThis is an expensive operation that will potentially clone all OpenNeuro datasets. It also requires access to OpenNeuro AWS credentials.
This package has utilities that may be useful for building tools to query OpenNeuro.
from ondiagnostics.graphql import create_client, datasets_generator
client = create_client()
async for dataset in datasets_generator(client):
...from ondiagnostics.graphql import Dataset
from ondiagnostics.tasks.git import clone_dataset
await clone_dataset(Dataset(id='ds000001', tag='1.0.0'))Note that this only performs a shallow git clone and does not initialize the annex.