# Path: cis/exceptions.py
# class InvalidCommandLineOptionError(CISError):
#     pass
# 
# Path: cis/plotting/plot.py
# def format_units(units):
# def get_label(common_data, units=True):
# def _try_coord(data, coord_dict):
# def get_axis(d, axis, name=None):
# def set_x_axis_as_time(ax):
#     def format_datetime(x, pos=None):
# def _get_extent(ax):
# def _test_natural_earth_available():
# def drawcoastlines(ax, coastlinescolour):
# def drawbluemarble(ax):
# def get_best_map_ticks(ax, transform=None):
# def set_map_ticks(ax, xticks, yticks, transform=None):
# def add_color_bar(ax, mappable, vstep, logv, cbarscale, cbarorient, cbarlabel):
# def basic_plot(data, how=None, ax=None, xaxis=None, yaxis=None, projection=None, central_longitude=0.0,
#                label=None, *args, **kwargs):
# def multilayer_plot(data_list, how=None, ax=None, yaxis=None, layer_opts=None, *args, **kwargs):
# def taylor_plot(data_list, ax=None, layer_opts=None, *args, **kwargs):


import argparse
import re
import sys
import os.path
import logging
    import cis.plugin as plugin
    import cis.plugin as plugin
    import cis.plugin as plugin
from cis.exceptions import InvalidCommandLineOptionError
from cis.plotting.plot import plot_types, projections
    from cis.data_io.products.AProduct import AProduct
    from cis.parse_datetime import parse_as_number_or_datetime_delta, parse_as_number_or_datetime
    from matplotlib.colors import cnames
    from cis.data_io.data_reader import expand_filelist
    from cis.data_io.products.AProduct import AProduct
    from cis.collocation.col_framework import Kernel
    from cis.aggregation.collapse_kernels import aggregation_kernels
    from collections import namedtuple
    from collections import namedtuple
    from collections import namedtuple
    from collections import namedtuple
    from cis.parse_datetime import parse_as_number_or_datetime, parse_as_number_or_datetime_delta
    from collections import namedtuple
    from cis.parse_datetime import parse_datetime, parse_as_number_or_datetime, parse_partial_datetime
    from cis.utils import parse_key_val_list
        from matplotlib.colors import cnames
    from six.moves import input
    from collections import namedtuple
                variables.append(variable)
                aliases.append(variable)
            elif len(parts) == 2:
                if not (parts[0] and parts[1]):
                    _alias_error(variable)
                variables.append(parts[0])
                aliases.append(parts[1])
            elif len(parts) > 2:
                _alias_error(variable)
        datagroup['aliases'] = aliases
        all_aliases.extend(aliases)
        datagroup['variables'] = variables
    # Check that the set of aliases is all unique
    if not len(set(all_aliases)) == len(all_aliases):
        parser.error("Variable names or aliases must be all unique: list was %s" % all_aliases)


def convert_to_list_of_floats(arg, parser):
    # Given a string such as '[10.0,11.1,12.2]' retruns a list containing, 10.0, 11.1, 12.2
    return [float(x) for x in arg[1:-1].split(',')]


def check_plot_type(plot_type, parser):
    """
    Checks plot type is valid option for number of variables if specified
    """

    if plot_type is not None:
        if plot_type not in plot_types.keys():
            parser.error(

# Path: cis/exceptions.py
# class InvalidCommandLineOptionError(CISError):
#     pass
# 
# Path: cis/plotting/plot.py
# def format_units(units):
# def get_label(common_data, units=True):
# def _try_coord(data, coord_dict):
# def get_axis(d, axis, name=None):
# def set_x_axis_as_time(ax):
#     def format_datetime(x, pos=None):
# def _get_extent(ax):
# def _test_natural_earth_available():
# def drawcoastlines(ax, coastlinescolour):
# def drawbluemarble(ax):
# def get_best_map_ticks(ax, transform=None):
# def set_map_ticks(ax, xticks, yticks, transform=None):
# def add_color_bar(ax, mappable, vstep, logv, cbarscale, cbarorient, cbarlabel):
# def basic_plot(data, how=None, ax=None, xaxis=None, yaxis=None, projection=None, central_longitude=0.0,
#                label=None, *args, **kwargs):
# def multilayer_plot(data_list, how=None, ax=None, yaxis=None, layer_opts=None, *args, **kwargs):
# def taylor_plot(data_list, ax=None, layer_opts=None, *args, **kwargs):


# Path: cis/parse.py
import argparse
import re
import sys
import os.path
import logging
    import cis.plugin as plugin
    import cis.plugin as plugin
    import cis.plugin as plugin
from cis.exceptions import InvalidCommandLineOptionError
from cis.plotting.plot import plot_types, projections
    from cis.data_io.products.AProduct import AProduct
    from cis.parse_datetime import parse_as_number_or_datetime_delta, parse_as_number_or_datetime
    from matplotlib.colors import cnames
    from cis.data_io.data_reader import expand_filelist
    from cis.data_io.products.AProduct import AProduct
    from cis.collocation.col_framework import Kernel
    from cis.aggregation.collapse_kernels import aggregation_kernels
    from collections import namedtuple
    from collections import namedtuple
    from collections import namedtuple
    from collections import namedtuple
    from cis.parse_datetime import parse_as_number_or_datetime, parse_as_number_or_datetime_delta
    from collections import namedtuple
    from cis.parse_datetime import parse_datetime, parse_as_number_or_datetime, parse_partial_datetime
    from cis.utils import parse_key_val_list
        from matplotlib.colors import cnames
    from six.moves import input
    from collections import namedtuple

                variables.append(variable)
                aliases.append(variable)
            elif len(parts) == 2:
                if not (parts[0] and parts[1]):
                    _alias_error(variable)
                variables.append(parts[0])
                aliases.append(parts[1])
            elif len(parts) > 2:
                _alias_error(variable)
        datagroup['aliases'] = aliases
        all_aliases.extend(aliases)
        datagroup['variables'] = variables
    # Check that the set of aliases is all unique
    if not len(set(all_aliases)) == len(all_aliases):
        parser.error("Variable names or aliases must be all unique: list was %s" % all_aliases)


def convert_to_list_of_floats(arg, parser):
    # Given a string such as '[10.0,11.1,12.2]' retruns a list containing, 10.0, 11.1, 12.2
    return [float(x) for x in arg[1:-1].split(',')]


def check_plot_type(plot_type, parser):
    """
    Checks plot type is valid option for number of variables if specified
    """

    if plot_type is not None:
        if plot_type not in plot_types.keys():
            parser.error(

                "'" + plot_type + "' is not a valid plot type, please use one of: " + str(plot_types.keys()))