Load schema definitions from a YAML file.

def schema(ctx, schema):
    """ Load schema definitions from a YAML file. """
    data = yaml.load(schema)
    if not isinstance(data, (list, tuple)):
        data = [data]
    with click.progressbar(data, label=schema.name) as bar:
        for schema in bar:
            ctx.obj['grano'].schemata.upsert(schema)