# Path: user_metrics/api/views.py
# UPLOAD_FOLDER = 'csv_uploads'
# ALLOWED_EXTENSIONS = set(['csv'])
# REFRESH_REGEX = r'refresh[^&]*&|\?refresh[^&]*$|&refresh[^&]*$'
# def get_errors(request_args):
#     def login():
#     def reauth():
#     def logout():
#     def login_required(f):
#         def wrap(*args, **kwargs):
# def api_root():
# def about():
# def contact():
# def version():
# def all_metrics():
# def normalize_newlines(stream):
# def upload_csv_cohort():
# def to_safe_json(s):
# def validate_cohort_name_allowed():
# def parse_records(records, default_project):
# def parse_username(raw_name):
# def normalize_project(project):
# def normalize_user(user_str, project):
# def deduplicate(list_of_objects, key_function):
# def project_name_for_link(project):
# def link_to_user_page(username, project):
# def validate_records(records):
# def upload_csv_cohort_finish():
# def metric(metric=''):
# def all_cohorts():
# def cohort(cohort=''):
# def output(cohort, metric):
# def job_queue():
# def all_urls():
#     def __init__(self, url_map, *items):
# class RegexConverter(BaseConverter):


from user_metrics.config import logging, settings
from user_metrics.api.views import app
    from logging.handlers import SMTPHandler
    from logging import Formatter
    from user_metrics.api.session import login_manager
    import logging
        | ut_tag  | int(4) unsigned | NO   | PRI | NULL    |       |
        +---------+-----------------+------+-----+---------+-------+

        +-------------+-----------------+------+-----+---------+
        | Field       | Type            | Null | Key | Default |
        +-------------+-----------------+------+-----+---------+
        | utm_id      | int(5) unsigned | NO   | PRI | NULL    |
        | utm_name    | varchar(255)    | NO   |     |         |
        | utm_notes   | varchar(255)    | YES  |     | NULL    |
        | utm_touched | datetime        | YES  |     | NULL    |
        +-------------+-----------------+------+-----+---------+


"""

__author__ = {
    "dario taraborelli": "dario@wikimedia.org",
    "ryan faulkner": "rfaulkner@wikimedia.org"
}
__date__ = "2012-12-21"
__license__ = "GPL (version 2 or later)"


######
#
# Execution
#
#######

app.config['SECRET_KEY'] = settings.__secret_key__

# Path: user_metrics/api/views.py
# UPLOAD_FOLDER = 'csv_uploads'
# ALLOWED_EXTENSIONS = set(['csv'])
# REFRESH_REGEX = r'refresh[^&]*&|\?refresh[^&]*$|&refresh[^&]*$'
# def get_errors(request_args):
#     def login():
#     def reauth():
#     def logout():
#     def login_required(f):
#         def wrap(*args, **kwargs):
# def api_root():
# def about():
# def contact():
# def version():
# def all_metrics():
# def normalize_newlines(stream):
# def upload_csv_cohort():
# def to_safe_json(s):
# def validate_cohort_name_allowed():
# def parse_records(records, default_project):
# def parse_username(raw_name):
# def normalize_project(project):
# def normalize_user(user_str, project):
# def deduplicate(list_of_objects, key_function):
# def project_name_for_link(project):
# def link_to_user_page(username, project):
# def validate_records(records):
# def upload_csv_cohort_finish():
# def metric(metric=''):
# def all_cohorts():
# def cohort(cohort=''):
# def output(cohort, metric):
# def job_queue():
# def all_urls():
#     def __init__(self, url_map, *items):
# class RegexConverter(BaseConverter):


# Path: user_metrics/api/run.py
from user_metrics.config import logging, settings
from user_metrics.api.views import app
    from logging.handlers import SMTPHandler
    from logging import Formatter
    from user_metrics.api.session import login_manager
    import logging

        | ut_tag  | int(4) unsigned | NO   | PRI | NULL    |       |
        +---------+-----------------+------+-----+---------+-------+

        +-------------+-----------------+------+-----+---------+
        | Field       | Type            | Null | Key | Default |
        +-------------+-----------------+------+-----+---------+
        | utm_id      | int(5) unsigned | NO   | PRI | NULL    |
        | utm_name    | varchar(255)    | NO   |     |         |
        | utm_notes   | varchar(255)    | YES  |     | NULL    |
        | utm_touched | datetime        | YES  |     | NULL    |
        +-------------+-----------------+------+-----+---------+


"""

__author__ = {
    "dario taraborelli": "dario@wikimedia.org",
    "ryan faulkner": "rfaulkner@wikimedia.org"
}
__date__ = "2012-12-21"
__license__ = "GPL (version 2 or later)"


######
#
# Execution
#
#######

app.config['SECRET_KEY'] = settings.__secret_key__

app.config['VERSION'] = settings.version