def main(gold_input, submit_input, skip_A, skip_B, verbose): gold = Collection() gold.load(gold_input) submit = Collection() submit.load(submit_input) data = OrderedDict() dataA = subtaskA(gold, submit, verbose) data.update(dataA) if not skip_A: report(dataA, verbose) if not skip_B: dataB = subtaskB(gold, submit, dataA, verbose) data.update(dataB) report(dataB, verbose) print("-" * 20) metrics = compute_metrics(data, skip_A, skip_B) for key, value in metrics.items(): print("{0}: {1:0.4}".format(key, value)) return data
def places(demo_db, request) -> Generator[Collection, None, None]: collection = Collection(demo_db, "places") param = getattr(request, "param", None) yield collection if param: for key in param: collection.delete_many("name", param["name"])
def fulltext_search( demo_db, request: FixtureRequest ) -> Generator[Collection, None, None]: collection = Collection(demo_db, "fulltext_search") yield collection param = getattr(request, "param", None) for key in param: collection.delete_many("app_text", key)
def users(demo_db) -> Generator[Collection, None, None]: collection = Collection(demo_db, "users") yield collection collection.drop()
def baesian(demo_db) -> Generator[Collection, None, None]: collection = Collection(demo_db, "baesian") yield collection collection.drop()
def random_numbers(demo_db) -> Generator[Collection, None, None]: collection = Collection(demo_db, "random_numbers") yield collection collection.drop()
def book_collection( demo_db, request: FixtureRequest) -> Generator[Collection, None, None]: collection = Collection(demo_db, "bookcollection") yield collection collection.delete_many()
def borrow_collection(demo_db) -> Generator[Collection, None, None]: collection = Collection(demo_db, "borrowcollection") yield collection collection.drop()