#!/usr/bin/env python

import click
from atlas_anndata import validate_anndata_with_config
import os


@click.command()
@click.argument("exp_name")
@click.option(
    "--bundle-dir",
    type=click.Path(dir_okay=True),
    default=os.getcwd(),
    help=(
        "A directory under which bundle directories should be created."
        " Defaults to the current working directory."
    ),
)
@click.option(
    "--allow-incomplete",
    default=False,
    is_flag=True,
    help=(
        "Should we allow the config to contain missing info? This is"
        " appropriate for the first round of bundle creation where the"
        " pre-magetab is being derived and some info is yet to be gathered"
        " from authors"
    ),
)
def validate_anndata(*args, **kwargs):

    """Validate a YAML format config file describing an annData file for
    ingestion into Single Cell Expression Atlas

    \b
    exp_name       - Specify an Expression Atlas identifier for this experiment.
    """
    validate_anndata_with_config(*args, **kwargs)


if __name__ == "__main__":
    validate_anndata()
