# Path: yatsm/cli/main.py
# @click_plugins.with_plugins(ep for ep in
#                             iter_entry_points('yatsm.cli'))
# @click.group(help='YATSM command line interface', context_settings=_context)
# @click.version_option(yatsm.__version__)
# @click.option('--num_threads', metavar='<threads>', default=1, type=int,
#               show_default=True, callback=options.valid_int_gt_zero,
#               help='Number of threads for OPENBLAS/MKL/OMP used in NumPy')
# @click.option('--verbose', '-v', is_flag=True, help='Be verbose')
# @click.option('--verbose-yatsm', is_flag=True,
#               help='Show verbose debugging messages in YATSM algorithm')
# @click.option('--quiet', '-q', is_flag=True, help='Be quiet')
# @click.pass_context
# def cli(ctx, num_threads, verbose, verbose_yatsm, quiet):
#     # Logging config
#     if verbose:
#         logger.setLevel(logging.DEBUG)
#     if verbose_yatsm:
#         logger_algo.setLevel(logging.DEBUG)
#     if quiet:
#         logger.setLevel(logging.WARNING)
#         logger_algo.setLevel(logging.WARNING)


from click.testing import CliRunner
from yatsm.cli.main import cli
import numpy as np
import pytest
    np.testing.assert_equal(read_image(image)[0, ...], classmap)


def test_map_class_pass_3(example_results, tmpdir, read_image):
    """ Make a map with reasonable inputs, --before, --after, --qa switches
    """
    image = tmpdir.join('classmap.gtif').strpath
    runner = CliRunner()
    result = runner.invoke(
        cli,
        ['-v', 'map',
         '--root', example_results['root'],
         '--result', example_results['results_dir_classified'],
         '--image', example_results['example_img'],
         '--after', '--before', '--qa',
         'class', '2005-06-01', image
         ])
    assert result.exit_code == 0
    img = read_image(image)
    np.testing.assert_equal(img[0, ...], classmap)
    np.testing.assert_equal(img[1, ...], classmap_qa)


def test_map_class_pass_4(example_results, tmpdir, read_image):
    """ Make a map with reasonable inputs, --before, --after, --qa,
    --predict-proba switches
    """
    image = tmpdir.join('classmap.gtif').strpath
    runner = CliRunner()
    result = runner.invoke(

# Path: yatsm/cli/main.py
# @click_plugins.with_plugins(ep for ep in
#                             iter_entry_points('yatsm.cli'))
# @click.group(help='YATSM command line interface', context_settings=_context)
# @click.version_option(yatsm.__version__)
# @click.option('--num_threads', metavar='<threads>', default=1, type=int,
#               show_default=True, callback=options.valid_int_gt_zero,
#               help='Number of threads for OPENBLAS/MKL/OMP used in NumPy')
# @click.option('--verbose', '-v', is_flag=True, help='Be verbose')
# @click.option('--verbose-yatsm', is_flag=True,
#               help='Show verbose debugging messages in YATSM algorithm')
# @click.option('--quiet', '-q', is_flag=True, help='Be quiet')
# @click.pass_context
# def cli(ctx, num_threads, verbose, verbose_yatsm, quiet):
#     # Logging config
#     if verbose:
#         logger.setLevel(logging.DEBUG)
#     if verbose_yatsm:
#         logger_algo.setLevel(logging.DEBUG)
#     if quiet:
#         logger.setLevel(logging.WARNING)
#         logger_algo.setLevel(logging.WARNING)


# Path: tests/cli/test_map_classify.py
from click.testing import CliRunner
from yatsm.cli.main import cli
import numpy as np
import pytest

    np.testing.assert_equal(read_image(image)[0, ...], classmap)


def test_map_class_pass_3(example_results, tmpdir, read_image):
    """ Make a map with reasonable inputs, --before, --after, --qa switches
    """
    image = tmpdir.join('classmap.gtif').strpath
    runner = CliRunner()
    result = runner.invoke(
        cli,
        ['-v', 'map',
         '--root', example_results['root'],
         '--result', example_results['results_dir_classified'],
         '--image', example_results['example_img'],
         '--after', '--before', '--qa',
         'class', '2005-06-01', image
         ])
    assert result.exit_code == 0
    img = read_image(image)
    np.testing.assert_equal(img[0, ...], classmap)
    np.testing.assert_equal(img[1, ...], classmap_qa)


def test_map_class_pass_4(example_results, tmpdir, read_image):
    """ Make a map with reasonable inputs, --before, --after, --qa,
    --predict-proba switches
    """
    image = tmpdir.join('classmap.gtif').strpath
    runner = CliRunner()
    result = runner.invoke(

        cli,