# Path: performanceplatform/collector/arguments.py
# def parse_args(name="", args=None):
#     def _load_json_file(path):
# 
# Path: performanceplatform/collector/logging_setup.py
# def set_up_logging(
#         app_name,
#         log_level,
#         logfile_path,
#         logfile_name,
#         json_fields=None):
# 
#     if logfile_name is None:
#         logfile_name = 'production'
#     sys.excepthook = uncaught_exception_handler
#     logger = logging.getLogger()
#     logger.setLevel(log_level)
#     logger.addHandler(get_log_file_handler(
#         os.path.join(logfile_path, '{}.log'.format(logfile_name))))
#     logger.addHandler(get_json_log_handler(
#         os.path.join(logfile_path, '{}.json.log'.format(logfile_name)),
#         app_name,
#         json_fields=json_fields if json_fields else {}))
#     logger.info("{0} logging started".format(app_name))
# 
# def close_down_logging():
#     logger = logging.getLogger()
#     handlers = logger.handlers[:]
#     for handler in handlers:
#         handler.close()
#         logger.removeHandler(handler)
# 
# Path: performanceplatform/utils/collector.py
# def get_config(collector_slug, performanceplatform):
#     collector_client = CollectorAPI(
#         performanceplatform['stagecraft_url'],
#         performanceplatform['omniscient_api_token']
#     )
#     collector = collector_client.get_collector(collector_slug)
#     return {
#         'query': collector.get('query'),
#         'options': collector.get('options'),
#         'data-set': {
#             'data-group': collector.get('data_set').get('data_group'),
#             'data-type': collector.get('data_set').get('data_type'),
#             'bearer_token': collector.get('data_set').get('bearer_token')
#         },
#         'entrypoint': collector.get('entry_point'),
#         'token': collector.get('provider').get('slug')
#     }


import os
import logging
import importlib
from collections import OrderedDict
from performanceplatform.collector import arguments
from performanceplatform.collector.logging_setup import (
    set_up_logging, close_down_logging)
from performanceplatform.utils.collector import get_config




def _get_data_group(query):
    return query['data-set']['data-group']


def _get_data_type(query):

# Path: performanceplatform/collector/arguments.py
# def parse_args(name="", args=None):
#     def _load_json_file(path):
# 
# Path: performanceplatform/collector/logging_setup.py
# def set_up_logging(
#         app_name,
#         log_level,
#         logfile_path,
#         logfile_name,
#         json_fields=None):
# 
#     if logfile_name is None:
#         logfile_name = 'production'
#     sys.excepthook = uncaught_exception_handler
#     logger = logging.getLogger()
#     logger.setLevel(log_level)
#     logger.addHandler(get_log_file_handler(
#         os.path.join(logfile_path, '{}.log'.format(logfile_name))))
#     logger.addHandler(get_json_log_handler(
#         os.path.join(logfile_path, '{}.json.log'.format(logfile_name)),
#         app_name,
#         json_fields=json_fields if json_fields else {}))
#     logger.info("{0} logging started".format(app_name))
# 
# def close_down_logging():
#     logger = logging.getLogger()
#     handlers = logger.handlers[:]
#     for handler in handlers:
#         handler.close()
#         logger.removeHandler(handler)
# 
# Path: performanceplatform/utils/collector.py
# def get_config(collector_slug, performanceplatform):
#     collector_client = CollectorAPI(
#         performanceplatform['stagecraft_url'],
#         performanceplatform['omniscient_api_token']
#     )
#     collector = collector_client.get_collector(collector_slug)
#     return {
#         'query': collector.get('query'),
#         'options': collector.get('options'),
#         'data-set': {
#             'data-group': collector.get('data_set').get('data_group'),
#             'data-type': collector.get('data_set').get('data_type'),
#             'bearer_token': collector.get('data_set').get('bearer_token')
#         },
#         'entrypoint': collector.get('entry_point'),
#         'token': collector.get('provider').get('slug')
#     }


# Path: performanceplatform/collector/main.py
import os
import logging
import importlib
from collections import OrderedDict
from performanceplatform.collector import arguments
from performanceplatform.collector.logging_setup import (
    set_up_logging, close_down_logging)
from performanceplatform.utils.collector import get_config





def _get_data_group(query):
    return query['data-set']['data-group']


def _get_data_type(query):

    return query['data-set']['data-type']