# Path: chemdataextractor/data.py
# PACKAGES = [
#     Package('models/cem_crf-1.0.pickle'),
#     Package('models/cem_crf_chemdner_cemp-1.0.pickle'),
#     Package('models/cem_dict_cs-1.0.pickle'),
#     Package('models/cem_dict-1.0.pickle'),
#     Package('models/clusters_chem1500-1.0.pickle'),
#     Package('models/pos_ap_genia_nocluster-1.0.pickle'),
#     Package('models/pos_ap_genia-1.0.pickle'),
#     Package('models/pos_ap_wsj_genia_nocluster-1.0.pickle'),
#     Package('models/pos_ap_wsj_genia-1.0.pickle'),
#     Package('models/pos_ap_wsj_nocluster-1.0.pickle'),
#     Package('models/pos_ap_wsj-1.0.pickle'),
#     Package('models/pos_crf_genia_nocluster-1.0.pickle'),
#     Package('models/pos_crf_genia-1.0.pickle'),
#     Package('models/pos_crf_wsj_genia_nocluster-1.0.pickle'),
#     Package('models/pos_crf_wsj_genia-1.0.pickle'),
#     Package('models/pos_crf_wsj_nocluster-1.0.pickle'),
#     Package('models/pos_crf_wsj-1.0.pickle'),
#     Package('models/punkt_chem-1.0.pickle')
# ]
# 
# def get_data_dir():
#     """Return path to the data directory."""
#     # Use data_dir config value if set, otherwise use OS-dependent data directory given by appdirs
#     return config.get('data_dir', appdirs.user_data_dir('ChemDataExtractor'))


import logging
import click
from ..data import PACKAGES, get_data_dir
@click.pass_context
def data_cli(ctx):
    """Data and model management commands."""
    pass


@data_cli.command()
@click.pass_obj
def where(ctx):
    """Print path to data directory."""
    log.debug('chemdataextractor.data.where')
    click.echo(get_data_dir())


@data_cli.command()
@click.pass_obj
def list(ctx):
    """List active data packages."""
    log.debug('chemdataextractor.data.list')
    click.echo('Downloaded\tPackage')
    for package in PACKAGES:
        click.echo('%s\t%s' % (package.local_exists(), package.path))


@data_cli.command()
@click.pass_obj
def download(ctx):
    """Download data."""
    log.debug('chemdataextractor.data.download')
    count = 0

# Path: chemdataextractor/data.py
# PACKAGES = [
#     Package('models/cem_crf-1.0.pickle'),
#     Package('models/cem_crf_chemdner_cemp-1.0.pickle'),
#     Package('models/cem_dict_cs-1.0.pickle'),
#     Package('models/cem_dict-1.0.pickle'),
#     Package('models/clusters_chem1500-1.0.pickle'),
#     Package('models/pos_ap_genia_nocluster-1.0.pickle'),
#     Package('models/pos_ap_genia-1.0.pickle'),
#     Package('models/pos_ap_wsj_genia_nocluster-1.0.pickle'),
#     Package('models/pos_ap_wsj_genia-1.0.pickle'),
#     Package('models/pos_ap_wsj_nocluster-1.0.pickle'),
#     Package('models/pos_ap_wsj-1.0.pickle'),
#     Package('models/pos_crf_genia_nocluster-1.0.pickle'),
#     Package('models/pos_crf_genia-1.0.pickle'),
#     Package('models/pos_crf_wsj_genia_nocluster-1.0.pickle'),
#     Package('models/pos_crf_wsj_genia-1.0.pickle'),
#     Package('models/pos_crf_wsj_nocluster-1.0.pickle'),
#     Package('models/pos_crf_wsj-1.0.pickle'),
#     Package('models/punkt_chem-1.0.pickle')
# ]
# 
# def get_data_dir():
#     """Return path to the data directory."""
#     # Use data_dir config value if set, otherwise use OS-dependent data directory given by appdirs
#     return config.get('data_dir', appdirs.user_data_dir('ChemDataExtractor'))


# Path: chemdataextractor/cli/data.py
import logging
import click
from ..data import PACKAGES, get_data_dir

@click.pass_context
def data_cli(ctx):
    """Data and model management commands."""
    pass


@data_cli.command()
@click.pass_obj
def where(ctx):
    """Print path to data directory."""
    log.debug('chemdataextractor.data.where')
    click.echo(get_data_dir())


@data_cli.command()
@click.pass_obj
def list(ctx):
    """List active data packages."""
    log.debug('chemdataextractor.data.list')
    click.echo('Downloaded\tPackage')
    for package in PACKAGES:
        click.echo('%s\t%s' % (package.local_exists(), package.path))


@data_cli.command()
@click.pass_obj
def download(ctx):
    """Download data."""
    log.debug('chemdataextractor.data.download')
    count = 0

    for package in PACKAGES: