def _filter_run(run, filters): filter_vals = [ run["model"], run["op_name"], run["label"], ] return util.match_filters(filters, filter_vals)
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))
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))
def _filter_model(pkg, args): to_search = [six.u(pkg["name"]), six.u(pkg["summary"])] return util.match_filters(args.terms, to_search)
def _filter_model(model, args): filter_vals = [ model["fullname"], model["description"], ] return util.match_filters(args.filters, filter_vals)
def _filter_op(op, args): filter_vals = [ op["fullname"], op["description"], ] return util.match_filters(args.filters, filter_vals)
def _filter_resource(res, args): filter_vals = [ res["name"], res["description"], ] return util.match_filters(args.filters, filter_vals)
def _filter_model(pkg, args): return util.match_filters(args.terms, [pkg["name"], pkg["summary"]])