Exemple #1
0
def _filter_run(run, filters):
    filter_vals = [
        run["model"],
        run["op_name"],
        run["label"],
    ]
    return util.match_filters(filters, filter_vals)
Exemple #2
0
def _filter_model(model, args):
    filter_vals = [
        model["fullname"],
        model["description"],
    ]
    return ((model["name"][:1] != "_" or args.all)
            and util.match_filters(args.filters, filter_vals))
Exemple #3
0
def _filter_op(op, args):
    filter_vals = [
        op["fullname"],
        op["description"],
    ]
    return ((op["name"][:1] != "_" or args.all)
            and (op["model_name"][:1] != "_" or args.all)
            and util.match_filters(args.filters, filter_vals))
Exemple #4
0
def _filter_model(pkg, args):
    to_search = [six.u(pkg["name"]), six.u(pkg["summary"])]
    return util.match_filters(args.terms, to_search)
Exemple #5
0
def _filter_model(model, args):
    filter_vals = [
        model["fullname"],
        model["description"],
    ]
    return util.match_filters(args.filters, filter_vals)
Exemple #6
0
def _filter_op(op, args):
    filter_vals = [
        op["fullname"],
        op["description"],
    ]
    return util.match_filters(args.filters, filter_vals)
Exemple #7
0
def _filter_resource(res, args):
    filter_vals = [
        res["name"],
        res["description"],
    ]
    return util.match_filters(args.filters, filter_vals)
Exemple #8
0
def _filter_model(pkg, args):
    return util.match_filters(args.terms, [pkg["name"], pkg["summary"]])