0.11 to 0.12+#

Snakebids 0.12 introduces a new, more flexible module for creating bidsapps. This affects the syntax of the run.py file. Older versions used the snakebids.app.SnakeBidsApp class to initialize the bidsapp, and this method will still work for the forseeable future. Switching to the new syntax will give access to new plugins and integrations and ensure long term support.

If you haven’t heavily modified your run.py file, you can transition simply by replacing it with the following:

 1#!/usr/bin/env python3
 2from pathlib import Path
 3
 4from snakebids import bidsapp, plugins
 5
 6app = bidsapp.app(
 7    [
 8        plugins.SnakemakeBidsApp(Path(__file__).resolve().parent),
 9        plugins.BidsValidator(),
10        plugins.Version(distribution="<app_name_here>"),
11    ]
12)
13
14
15def get_parser():
16    """Exposes parser for sphinx doc generation, cwd is the docs dir."""
17    return app.build_parser().parser
18
19
20if __name__ == "__main__":
21    app.run()

The snakemake workflow will work in exactly the same way.