(migrate-to-bidsapp)=
# 0.11 to 0.12+

Snakebids 0.12 introduces a [new, more flexible module](#snakebids.bidsapp) for creating bidsapps. This affects the syntax of the `run.py` file. Older versions used the {class}`snakebids.app.SnakeBidsApp` class to initialize the bidsapp, and this method will still work for the foreseeable 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:

```python
#!/usr/bin/env python3
from pathlib import Path

from snakebids import bidsapp, plugins

app = bidsapp.app(
    [
        plugins.SnakemakeBidsApp(Path(__file__).resolve().parent),
        plugins.BidsValidator(),
        plugins.Version(distribution="<app_name_here>"),
    ]
)


def get_parser():
    """Exposes parser for sphinx doc generation, cwd is the docs dir."""
    return app.build_parser().parser


if __name__ == "__main__":
    app.run()
```

The snakemake workflow will work in exactly the same way.
