Esempio n. 1
0
def quick_designer_check(draft):
    """Quick test."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    d = check_grid_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_grid_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_designer_unlock_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    for e in action_dependency.check_unreachable_designer_actions(draft):
        ret[_ERRORS].append(str(e))
    for w in action_dependency.check_false_unlock_designer_actions(draft):
        ret[_WARNINGS].append(str(w))
    for w in action_dependency.check_missmatched_designer_level(draft):
        ret[_WARNINGS].append(str(w))
    return ret
Esempio n. 2
0
File: gcc.py Progetto: csdl/makahiki
def quick_designer_check(draft):
    """Quick test."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    d = check_grid_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_grid_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_designer_unlock_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    for e in action_dependency.check_unreachable_designer_actions(draft):
        ret[_ERRORS].append(str(e))
    for w in action_dependency.check_false_unlock_designer_actions(draft):
        ret[_WARNINGS].append(str(w))
    for w in action_dependency.check_missmatched_designer_level(draft):
        ret[_WARNINGS].append(str(w))
    return ret
Esempio n. 3
0
def full_designer_check(draft):
    """Runs all the designer checks (slow)."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    d = check_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(str(e)))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_grid_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_grid_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_designer_unlock_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    for w in check_designer_urls(draft):
        ret[_WARNINGS].append(str(w))
    for e in action_dependency.check_unreachable_designer_actions(draft):
        ret[_ERRORS].append(str(e))
    for w in action_dependency.check_false_unlock_designer_actions(draft):
        ret[_WARNINGS].append(str(w))
    for w in action_dependency.check_missmatched_designer_level(draft):
        ret[_WARNINGS].append(str(w))
    return ret
Esempio n. 4
0
File: gcc.py Progetto: csdl/makahiki
def full_designer_check(draft):
    """Runs all the designer checks (slow)."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    d = check_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(str(e)))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_grid_pub_exp_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    d = check_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_grid_event_dates(draft)
    for e in d:
        ret[_ERRORS].append(str(e))
    d = check_designer_unlock_dates(draft)
    for e in d[_ERRORS]:
        ret[_ERRORS].append(str(e))
    for w in d[_WARNINGS]:
        ret[_WARNINGS].append(str(w))
    for w in check_designer_urls(draft):
        ret[_WARNINGS].append(str(w))
    for e in action_dependency.check_unreachable_designer_actions(draft):
        ret[_ERRORS].append(str(e))
    for w in action_dependency.check_false_unlock_designer_actions(draft):
        ret[_WARNINGS].append(str(w))
    for w in action_dependency.check_missmatched_designer_level(draft):
        ret[_WARNINGS].append(str(w))
    return ret
Esempio n. 5
0
def run_designer_checks(draft, settings):  # pylint: disable=R0912
    """Runs the checks that the user set in their GccSettings."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    # cannot turn off checking the predicates.
    for e in check_designer_predicates(draft):
        ret[_ERRORS].append(str(e))
    for e in check_designer_action_column_names(draft):
        ret[_ERRORS].append(str(e))
    if settings.check_pub_dates:
        d = check_grid_pub_exp_dates(draft)
        for e in d[_ERRORS]:
            ret[_ERRORS].append(str(e))
        for w in d[_WARNINGS]:
            ret[_WARNINGS].append(str(w))
    if settings.check_event_dates:
        d = check_grid_event_dates(draft)
        for e in d:
            ret[_ERRORS].append(str(e))
    if settings.check_unlock_dates:
        d = check_designer_unlock_dates(draft)
        for e in d[_ERRORS]:
            ret[_ERRORS].append(str(e))
        for w in d[_WARNINGS]:
            ret[_WARNINGS].append(str(w))
    if settings.check_description_urls:
        for w in check_designer_urls(draft):
            ret[_WARNINGS].append(str(w))
    if settings.check_unreachable:
        for e in action_dependency.check_unreachable_designer_actions(draft):
            ret[_ERRORS].append(str(e))
    if settings.check_false_unlocks:
        for w in action_dependency.check_false_unlock_designer_actions(draft):
            ret[_WARNINGS].append(str(w))
    if settings.check_mismatched_levels:
        for w in action_dependency.check_missmatched_designer_level(draft):
            ret[_WARNINGS].append(str(w))
    return ret
Esempio n. 6
0
File: gcc.py Progetto: csdl/makahiki
def run_designer_checks(draft, settings):  # pylint: disable=R0912
    """Runs the checks that the user set in their GccSettings."""
    ret = {}
    ret[_ERRORS] = []
    ret[_WARNINGS] = []
    # cannot turn off checking the predicates.
    for e in check_designer_predicates(draft):
        ret[_ERRORS].append(str(e))
    for e in check_designer_action_column_names(draft):
        ret[_ERRORS].append(str(e))
    if settings.check_pub_dates:
        d = check_grid_pub_exp_dates(draft)
        for e in d[_ERRORS]:
            ret[_ERRORS].append(str(e))
        for w in d[_WARNINGS]:
            ret[_WARNINGS].append(str(w))
    if settings.check_event_dates:
        d = check_grid_event_dates(draft)
        for e in d:
            ret[_ERRORS].append(str(e))
    if settings.check_unlock_dates:
        d = check_designer_unlock_dates(draft)
        for e in d[_ERRORS]:
            ret[_ERRORS].append(str(e))
        for w in d[_WARNINGS]:
            ret[_WARNINGS].append(str(w))
    if settings.check_description_urls:
        for w in check_designer_urls(draft):
            ret[_WARNINGS].append(str(w))
    if settings.check_unreachable:
        for e in action_dependency.check_unreachable_designer_actions(draft):
            ret[_ERRORS].append(str(e))
    if settings.check_false_unlocks:
        for w in action_dependency.check_false_unlock_designer_actions(draft):
            ret[_WARNINGS].append(str(w))
    if settings.check_mismatched_levels:
        for w in action_dependency.check_missmatched_designer_level(draft):
            ret[_WARNINGS].append(str(w))
    return ret
Esempio n. 7
0
def check_unreachable_designer_actions(draft):
    """Checks for unreachable actions and returns a list of Errors indicating which actions are
    unreachable."""
    return action_dependency.check_unreachable_designer_actions(draft)
Esempio n. 8
0
File: gcc.py Progetto: csdl/makahiki
def check_unreachable_designer_actions(draft):
    """Checks for unreachable actions and returns a list of Errors indicating which actions are
    unreachable."""
    return action_dependency.check_unreachable_designer_actions(draft)