bids-standard / stats-models

BIDS Stats Models Specification

Home Page:https://bids-standard.github.io/stats-models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BIDS Stats Models Specification

This repository is intended to be the authoritative reference for the BIDS Stats Models specification. It consists of two parts:

  1. bsmschema, a Pydantic description of the BIDS Stats Models files, which can be used as a schema validator or generate JSON schema for independent validation.
  2. specification, a JupyterBook website that includes more human readable introductions and explanations, as well as a reference document for bsmschema.

Installing bsmschema

From the Python package index

pip install bsmschema

From source

git clone https://github.com/bids-standard/stats-models.git
pip install stats-models/bsmschema

You may wish to install in editable mode, to ensure that your changes get propagated without reinstalling:

pip install -e stats-models/bsmschema

How to run schema validator

from bsmschema.models import BIDSStatsModel
BIDSStatsModel.parse_file('stats-models/specification/examples/model-example_smdl.json')

Building the documentation locally

  1. Install the requirements, including the local copy of bsmschema:

    pip install -r requirements.txt
    
  2. Build the schema files to ensure the local validator will work:

    python -m bsmschema specification/schema
    
  3. Build the JupyterBook:

    jb build specification
    
  4. Serve the built website:

    python -m http.server -d specification/_build/html/
    

Note that this will start a long-running web-server that will occupy your terminal. Ctrl-C quits.

About

BIDS Stats Models Specification

https://bids-standard.github.io/stats-models

License:Other


Languages

Language:Python 88.7%Language:HTML 6.6%Language:Makefile 4.2%Language:CSS 0.4%Language:JavaScript 0.1%Language:TeX 0.0%