From 4455ce947da4a24dd808099e2551e93dc3295004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Mon, 16 Dec 2024 19:43:57 +0100 Subject: [PATCH] full dataset test (#687) * full dataset test * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip --- .github/workflows/ci.yml | 17 ++++++++++++++++- .pkg | 2 +- .pkg.lock | 4 ++-- exe/generate.cc | 2 +- src/match_platforms.cc | 10 +++++----- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa0785f16..8b54b246b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -269,6 +269,8 @@ jobs: BUILDCACHE_DIRECT_MODE: true BUILDCACHE_MAX_CACHE_SIZE: 26843545600 BUILDCACHE_LUA_PATH: ${{ github.workspace }}/tools + UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1 + ASAN_OPTIONS: alloc_dealloc_mismatch=0 steps: - uses: actions/checkout@v4 @@ -291,6 +293,19 @@ jobs: - name: Run Integration Tests run: ${{ matrix.config.emulator }} build/motis-test + # ==== FULL DATASET TEST ==== + - name: Test Full Dataset + if: matrix.config.preset != 'linux-debug' + run: | + ln -s deps/tiles/profile tiles-profiles + wget https://github.com/motis-project/test-data/raw/aachen/aachen.osm.pbf + wget https://github.com/motis-project/test-data/raw/aachen/AVV_GTFS_Masten_mit_SPNV.zip + ${{ matrix.config.emulator }} ./build/motis config aachen.osm.pbf AVV_GTFS_Masten_mit_SPNV.zip + ${{ matrix.config.emulator }} ./build/motis import + ${{ matrix.config.emulator }} ./build/motis generate -n 10 + ${{ matrix.config.emulator }} ./build/motis batch + ${{ matrix.config.emulator }} ./build/motis compare -q queries.txt -r responses.txt responses.txt + # ==== DISTRIBUTION ==== - name: Create Distribution if: matrix.config.artifact @@ -318,7 +333,7 @@ jobs: upload_url: ${{ github.event.release.upload_url }} asset_path: ./motis-${{ matrix.config.artifact }}.tar.bz2 asset_name: motis-${{ matrix.config.artifact }}.tar.bz2 - asset_content_type: application/x-tar + asset_content_type: application/x- docker: runs-on: ubuntu-20.04 diff --git a/.pkg b/.pkg index 13c5e238d..e894ad614 100644 --- a/.pkg +++ b/.pkg @@ -17,7 +17,7 @@ [adr] url=git@github.com:triptix-tech/adr.git branch=master - commit=9bf19dd88d7805d6bea1cebf5b09a394605fa3f6 + commit=d5036b92fed3867abb474440987343a8ae4cb3bf [googletest] url=git@github.com:motis-project/googletest.git branch=master diff --git a/.pkg.lock b/.pkg.lock index b49ab1623..2675a1b55 100644 --- a/.pkg.lock +++ b/.pkg.lock @@ -1,4 +1,4 @@ -4597452232564036610 +12080228953055610555 cista 6362f3ad8c3133a0abf64e5d8c9ea3e21f531ee8 zlib-ng 68ab3e2d80253ec5dc3c83691d9ff70477b32cd3 boost 930f38eb0365ceb7853273e03da4d9e7787abfb9 @@ -48,4 +48,4 @@ reflect-cpp c54fe66de4650b60c23aadd4a06d9db4ffeda22f FTXUI dd6a5d371fd7a3e2937bb579955003c54b727233 tg 20c0f298b8ce58de29a790290f44dca7c4ecc364 utf8proc 779b780da3b99d123133eb99707b65c7e4324cc8 -adr 9bf19dd88d7805d6bea1cebf5b09a394605fa3f6 +adr d5036b92fed3867abb474440987343a8ae4cb3bf diff --git a/exe/generate.cc b/exe/generate.cc index 01d7a09d2..183febb11 100644 --- a/exe/generate.cc +++ b/exe/generate.cc @@ -86,7 +86,7 @@ int generate(int ac, char** av) { auto desc = po::options_description{"Options"}; desc.add_options() // ("help", "Prints this help message") // - ("n", po::value(&n)->default_value(n), "number of queries"); + ("n,n", po::value(&n)->default_value(n), "number of queries"); add_data_path_opt(desc, data_path); auto vm = parse_opt(ac, av, desc); diff --git a/src/match_platforms.cc b/src/match_platforms.cc index 17ca12a14..de49d52ea 100644 --- a/src/match_platforms.cc +++ b/src/match_platforms.cc @@ -101,20 +101,20 @@ double get_match_bonus(Collection&& names, auto bonus = 0U; auto const size = static_cast(name.size()); if (has_exact_match(names, ref)) { - bonus += 200.0 - size; + bonus += std::max(0.0, 200.0 - size); } if (has_number_match(names, name)) { - bonus += 140.0 - size; + bonus += std::max(0.0, 140.0 - size); } if (auto const track = get_track(ref); track.has_value() && has_number_match(names, *track)) { - bonus += 60.0 - size; + bonus += std::max(0.0, 60.0 - size); } if (has_exact_match(names, name)) { - bonus += 15.0 - size; + bonus += std::max(0.0, 15.0 - size); } if (has_contains_match(names, ref)) { - bonus += 5.0 - size; + bonus += std::max(0.0, 5.0 - size); } return bonus; }