diff --git a/backend/report.html b/backend/report.html index 0737847..1b97bae 100644 --- a/backend/report.html +++ b/backend/report.html @@ -328,7 +328,7 @@ div.media { </head> <body> <h1 id="title">Backend Testing Report</h1> - <p>Report generated on 24-Jan-2025 at 08:54:20 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> + <p>Report generated on 24-Jan-2025 at 16:01:23 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v4.1.1</p> <div id="environment-header"> <h2>Environment</h2> @@ -382,7 +382,7 @@ div.media { <h2>Summary</h2> <div class="additional-summary prefix"> </div> - <p class="run-count">25 tests took 00:01:01.</p> + <p class="run-count">8 tests took 00:01:20.</p> <p class="filter">(Un)check the boxes to filter the results.</p> <div class="summary__reload"> <div class="summary__reload__button hidden" onclick="location.reload()"> @@ -395,7 +395,7 @@ div.media { <input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" /> <span class="failed">3 Failed,</span> <input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" /> - <span class="passed">22 Passed,</span> + <span class="passed">5 Passed,</span> <input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="skipped" disabled/> <span class="skipped">0 Skipped,</span> <input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xfailed" disabled/> @@ -432,7 +432,7 @@ div.media { </table> </body> <footer> - <div id="data-container" data-jsonblob="{"environment": {"Python": "3.12.3", "Platform": "Linux-6.8.0-51-generic-x86_64-with-glibc2.39", "Packages": {"pytest": "8.3.4", "pluggy": "1.5.0"}, "Plugins": {"html": "4.1.1", "anyio": "4.8.0", "metadata": "3.1.1"}}, "tests": {"src/tests/test_invalid_input.py::test_input[start0-preferences0-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start0-preferences0-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start0-preferences0-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">69 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start1-preferences1-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start1-preferences1-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start1-preferences1-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">4 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start2-preferences2-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start2-preferences2-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start2-preferences2-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start3-preferences3-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start3-preferences3-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start3-preferences3-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start4-preferences4-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start4-preferences4-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start4-preferences4-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start5-preferences5-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start5-preferences5-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start5-preferences5-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">2 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start6-preferences6-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start6-preferences6-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start6-preferences6-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">5 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_invalid_input.py::test_input[start7-preferences7-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_invalid_input.py::test_input[start7-preferences7-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_invalid_input.py::test_input[start7-preferences7-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_main.py::test_turckheim": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_turckheim", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_turckheim</td>", "<td>start (0 | 0) - 4 - Square Charles Grad (47 | 5) - 3 - Porte de France (157 | 5) - 5 - finish (0 | 0) - 0</td>", "<td>22 min</td>", "<td>20 min</td>", "<td class=\"col-duration\">101 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 5 landmarks in \t: 0.012 seconds\nINFO src.main:main.py:122 Total computation time\t: 0.082 seconds\nINFO src.main:main.py:127 Generated a trip of 22 minutes with 4 landmarks in 0.094 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_bellecour": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_bellecour", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_bellecour</td>", "<td>start (0 | 0) - 5 - H\u00f4tel de l'Europe (191 | 5) - 5 - Cath\u00e9drale Saint-Jean (305 | 5) - 7 - \u00c9glise Saint-Georges (357 | 5) - 9 - Chapelle Saint-Thomas (228 | 5) - 5 - Site historique de Lyon (364 | 5) - 4 - Temple du Change (314 | 5) - 9 - Mus\u00e9e de l'Imprimerie et de la communication graphique (357 | 5) - 4 - Basilique Saint-Bonaventure (364 | 5) - 12 - finish (0 | 0) - 0</td>", "<td>100 min</td>", "<td>120 min</td>", "<td class=\"col-duration\">00:00:08</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 182 landmarks in \t: 0.068 seconds\nINFO src.main:main.py:122 Total computation time\t: 8.385 seconds\nINFO src.main:main.py:127 Generated a trip of 100 minutes with 10 landmarks in 8.453 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_cologne": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_cologne", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_cologne</td>", "<td>start (0 | 0) - 4 - R\u00f6misch-Germanisches Museum (698 | 5) - 5 - Gro\u00df St. Martin (512 | 5) - 13 - K\u00f6ln Triangle (571 | 5) - 18 - St. Maria Lyskirchen (512 | 5) - 2 - Trinitatiskirche (467 | 5) - 8 - Wallraf-Richartz-Museum & Foundation Corboud (490 | 5) - 1 - Duftmuseum im Farina-Haus (539 | 5) - 5 - Minoritenkirche (379 | 5) - 6 - AntoniterCityKirche (423 | 5) - 4 - Schauspielhaus K\u00f6ln (369 | 5) - 7 - St. Aposteln (639 | 5) - 13 - St. Gereon (820 | 5) - 12 - Oper der Stadt K\u00f6ln (465 | 5) - 6 - Museum f\u00fcr Angewandte Kunst (514 | 5) - 5 - K\u00f6lner Dom (1141 | 5) - 3 - Excelsior Hotel Ernst (614 | 5) - 2 - St.Andreas (489 | 5) - 3 - St. Mari\u00e4 Himmelfahrt (401 | 5) - 2 - finish (0 | 0) - 0</td>", "<td>209 min</td>", "<td>240 min</td>", "<td class=\"col-duration\">00:00:36</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7521b5aab6b0&gt;, request = &lt;FixtureRequest for &lt;Function test_cologne&gt;&gt;\n\n def test_cologne(client, request) : # pylint: disable=redefined-outer-name\n &quot;&quot;&quot;\n Test n\u00b02 : Custom test in Lyon centre to ensure proper decision making in crowded area.\n \n Args:\n client:\n request:\n &quot;&quot;&quot;\n start_time = time.time() # Start timer\n duration_minutes = 240\n \n response = client.post(\n &quot;/trip/new&quot;,\n json={\n &quot;preferences&quot;: {&quot;sightseeing&quot;: {&quot;type&quot;: &quot;sightseeing&quot;, &quot;score&quot;: 5},\n &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5},\n &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5},\n &quot;max_time_minute&quot;: duration_minutes,\n &quot;detour_tolerance_minute&quot;: 0},\n &quot;start&quot;: [50.942352665, 6.957777972392]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&#x27;first_landmark_uuid&#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&#x27;total_time&#x27;], duration_minutes)\n \n # for elem in landmarks :\n # print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n&gt; assert comp_time &lt; 30, f&quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&quot;\nE AssertionError: Computation time exceeded 30 seconds: 35.97 seconds\nE assert 35.97434854507446 &lt; 30\n\nsrc/tests/test_main.py:138: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 244 landmarks in \t: 0.094 seconds\nINFO src.main:main.py:122 Total computation time\t: 35.877 seconds\nINFO src.main:main.py:127 Generated a trip of 209 minutes with 20 landmarks in 35.971 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_strasbourg": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_strasbourg", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_strasbourg</td>", "<td>start (0 | 0) - 8 - \u00c9glise protestante Saint-Pierre-le-Jeune (305 | 5) - 2 - Foss\u00e9 du Faux-Rempart (190 | 5) - 9 - Mus\u00e9e Tomi Ungerer Centre International de l'Illustration (210 | 5) - 17 - Jardin Botanique (445 | 5) - 9 - Mosqu\u00e9e Al Fateh (174 | 5) - 10 - De la Grande \u00eele \u00e0 la Neustadt (364 | 5) - 7 - Cath\u00e9drale Notre-Dame (564 | 5) - 4 - Mus\u00e9e Historique (314 | 5) - 7 - \u00c9glise protestante Saint-Thomas (266 | 5) - 10 - Barrage Vauban (344 | 5) - 10 - \u00c9glise Catholique Saint-Jean-Baptiste (247 | 5) - 1 - finish (0 | 0) - 0</td>", "<td>149 min</td>", "<td>180 min</td>", "<td class=\"col-duration\">00:00:07</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 118 landmarks in \t: 0.069 seconds\nINFO src.main:main.py:122 Total computation time\t: 6.705 seconds\nINFO src.main:main.py:127 Generated a trip of 149 minutes with 13 landmarks in 6.774 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_zurich": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_zurich", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_zurich</td>", "<td>start (0 | 0) - 3 - Schweizerisches Landesmuseum (336 | 5) - 7 - Liebfrauenkirche (247 | 5) - 6 - Russisch-Orthodoxe Auferstehungskirche (325 | 5) - 15 - Friedenskirche (207 | 5) - 2 - Predigerkirche (272 | 5) - 8 - Kunsthaus (357 | 5) - 6 - Wasserkirche (210 | 5) - 3 - Fraum\u00fcnster (467 | 5) - 9 - V\u00f6lkerkundemuseum der Universit\u00e4t Z\u00fcrich (272 | 5) - 5 - Synagoge ICZ L\u00f6wenstrasse (207 | 5) - 10 - finish (0 | 0) - 0</td>", "<td>124 min</td>", "<td>180 min</td>", "<td class=\"col-duration\">00:00:06</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7521b5aab6b0&gt;, request = &lt;FixtureRequest for &lt;Function test_zurich&gt;&gt;\n\n def test_zurich(client, request) : # pylint: disable=redefined-outer-name\n &quot;&quot;&quot;\n Test n\u00b02 : Custom test in Lyon centre to ensure proper decision making in crowded area.\n \n Args:\n client:\n request:\n &quot;&quot;&quot;\n start_time = time.time() # Start timer\n duration_minutes = 180\n \n response = client.post(\n &quot;/trip/new&quot;,\n json={\n &quot;preferences&quot;: {&quot;sightseeing&quot;: {&quot;type&quot;: &quot;sightseeing&quot;, &quot;score&quot;: 5},\n &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5},\n &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5},\n &quot;max_time_minute&quot;: duration_minutes,\n &quot;detour_tolerance_minute&quot;: 0},\n &quot;start&quot;: [47.377884227, 8.5395114066]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&#x27;first_landmark_uuid&#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&#x27;total_time&#x27;], duration_minutes)\n \n # for elem in landmarks :\n # print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n assert comp_time &lt; 30, f&quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&quot;\n&gt; assert duration_minutes*0.8 &lt; result[&#x27;total_time&#x27;], f&quot;Trip too short: {result[&#x27;total_time&#x27;]} instead of {duration_minutes}&quot;\nE AssertionError: Trip too short: 124 instead of 180\nE assert (180 * 0.8) &lt; 124\n\nsrc/tests/test_main.py:221: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 133 landmarks in \t: 0.022 seconds\nINFO src.main:main.py:122 Total computation time\t: 5.97 seconds\nINFO src.main:main.py:127 Generated a trip of 124 minutes with 12 landmarks in 5.992 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_paris": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_paris", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_paris</td>", "<td>start (0 | 0) - 5 - \u00c9glise Saint-Leu - Saint-Gilles (423 | 5) - 6 - Centre Georges Pompidou (865 | 5) - 3 - \u00c9glise Saint-Merri (466 | 5) - 6 - H\u00f4tel de Ville (591 | 5) - 14 - \u00c9glise Saint-Nicolas du Chardonnet (512 | 5) - 7 - Cath\u00e9drale Notre-Dame de Paris (1138 | 5) - 10 - Tour Saint-Jacques (614 | 5) - 7 - Sainte-Chapelle (1138 | 5) - 1 - Palais de Justice de Paris (467 | 5) - 17 - Palais du Luxembourg (604 | 5) - 4 - Jardin du Luxembourg (445 | 5) - 9 - \u00c9glise Saint-Sulpice (514 | 5) - 15 - La Seine (447 | 5) - 4 - Tunnel des Tuileries (445 | 5) - 10 - Mus\u00e9e d'Orsay (890 | 5) - 11 - Palais du Louvre (690 | 5) - 1 - Mus\u00e9e du Louvre (698 | 5) - 0 - Pyramide du Louvre (490 | 5) - 5 - Temple de l'Oratoire du Louvre (651 | 5) - 4 - Bourse de Commerce \u2014 Pinault Collection (627 | 5) - 7 - \u00c9glise Saint-Germain l'Auxerrois (512 | 5) - 9 - finish (0 | 0) - 0</td>", "<td>260 min</td>", "<td>300 min</td>", "<td class=\"col-duration\">00:00:02</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 363 landmarks in \t: 0.075 seconds\nINFO src.main:main.py:122 Total computation time\t: 1.562 seconds\nINFO src.main:main.py:127 Generated a trip of 260 minutes with 23 landmarks in 1.637 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_new_york": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_new_york", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_new_york</td>", "<td>start (0 | 0) - 6 - St. George's Church (344 | 5) - 5 - Saint Mark's in-the-Bowery (490 | 5) - 6 - Grace Church (401 | 5) - 7 - Union Square Park (482 | 5) - 8 - Calvary Church (357 | 5) - 6 - Flatiron Building (604 | 5) - 3 - Madison Square Park (482 | 5) - 4 - Cathedral of St. Sava (401 | 5) - 26 - Stonewall Inn State Historic Site (357 | 5) - 3 - St. Joseph's Church (364 | 5) - 6 - Judson Memorial Church (401 | 5) - 7 - St. Anthony of Padua Church (379 | 5) - 11 - Duarte Square (512 | 5) - 1 - Albert Capsouto Park (339 | 5) - 4 - Tribeca Park (386 | 5) - 13 - Petrosino Square (334 | 5) - 5 - Saint Patrick's Old Cathedral (379 | 5) - 4 - New Museum (314 | 5) - 8 - Capitale (627 | 5) - 8 - Saint Barbara Greek Orthodox Church (305 | 5) - 1 - Museum at Eldridge Street (467 | 5) - 22 - finish (0 | 0) - 0</td>", "<td>269 min</td>", "<td>600 min</td>", "<td class=\"col-duration\">00:00:02</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7521b5aab6b0&gt;, request = &lt;FixtureRequest for &lt;Function test_new_york&gt;&gt;\n\n def test_new_york(client, request) : # pylint: disable=redefined-outer-name\n &quot;&quot;&quot;\n Test n\u00b02 : Custom test in New York (les Halles) centre to ensure proper decision making in crowded area.\n \n Args:\n client:\n request:\n &quot;&quot;&quot;\n start_time = time.time() # Start timer\n duration_minutes = 600\n \n response = client.post(\n &quot;/trip/new&quot;,\n json={\n &quot;preferences&quot;: {&quot;sightseeing&quot;: {&quot;type&quot;: &quot;sightseeing&quot;, &quot;score&quot;: 5},\n &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5},\n &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5},\n &quot;max_time_minute&quot;: duration_minutes,\n &quot;detour_tolerance_minute&quot;: 0},\n &quot;start&quot;: [40.72592726802, -73.9920434795]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&#x27;first_landmark_uuid&#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&#x27;total_time&#x27;], duration_minutes)\n \n # for elem in landmarks :\n # print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n assert comp_time &lt; 30, f&quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&quot;\n&gt; assert duration_minutes*0.8 &lt; result[&#x27;total_time&#x27;], f&quot;Trip too short: {result[&#x27;total_time&#x27;]} instead of {duration_minutes}&quot;\nE AssertionError: Trip too short: 269 instead of 600\nE assert (600 * 0.8) &lt; 269\n\nsrc/tests/test_main.py:303: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 211 landmarks in \t: 0.038 seconds\nINFO src.main:main.py:122 Total computation time\t: 1.686 seconds\nINFO src.main:main.py:127 Generated a trip of 269 minutes with 23 landmarks in 1.723 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_shopping": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_shopping", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_shopping</td>", "<td>start (0 | 0) - 5 - Grand H\u00f4tel-Dieu (423 | 30) - 8 - Shopping Area (538 | 40) - 28 - Muji (228 | 30) - 2 - Westfield La Part-Dieu (423 | 30) - 32 - finish (0 | 0) - 0</td>", "<td>205 min</td>", "<td>240 min</td>", "<td class=\"col-duration\">495 ms</td>", "<td class=\"col-links\"></td>"], "log": "----------------------------- Captured stdout call -----------------------------\nLandmark(start): [start @(45.7576485, 4.8330241), score=0, time_to_next=5]\nLandmark(shopping): [Grand H\u00f4tel-Dieu @(45.7586955, 4.8364597), score=423, time_to_next=8]\nLandmark(shopping): [Shopping Area @(np.float64(45.76223053940519), np.float64(4.833794685873603)), score=538, time_to_next=28]\nLandmark(shopping): [Muji @(45.7615971, 4.8543781), score=228, time_to_next=2]\nLandmark(shopping): [Westfield La Part-Dieu @(45.761331, 4.855676), score=423, time_to_next=32]\nLandmark(finish): [finish @(45.7576485, 4.8330241), score=0]\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 7 landmarks in \t: 0.007 seconds\nINFO src.main:main.py:122 Total computation time\t: 0.483 seconds\nINFO src.main:main.py:127 Generated a trip of 205 minutes with 6 landmarks in 0.491 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_toilets.py::test_invalid_input[location0-None-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_invalid_input[location0-None-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_invalid_input[location0-None-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=%7B%7D&amp;radius= &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_toilets.py::test_invalid_input[location1-None-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_invalid_input[location1-None-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_invalid_input[location1-None-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=443&amp;radius= &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_toilets.py::test_invalid_input[location2-None-422]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_invalid_input[location2-None-422]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_invalid_input[location2-None-422]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=443&amp;location=433&amp;radius= &quot;HTTP/1.1 422 Unprocessable Entity&quot;\n\n"}], "src/tests/test_toilets.py::test_no_toilets[location0-200]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_no_toilets[location0-200]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_no_toilets[location0-200]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=48.227&amp;location=7.437 &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_toilets.py::test_no_toilets[location1-200]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_no_toilets[location1-200]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_no_toilets[location1-200]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=10.2012&amp;location=10.123 &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_toilets.py::test_no_toilets[location2-200]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_no_toilets[location2-200]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_no_toilets[location2-200]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=63.989&amp;location=-19.677 &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_toilets.py::test_toilets[location0-200]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_toilets[location0-200]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_toilets[location0-200]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">4 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=45.7576485&amp;location=4.8330241&amp;radius=600 &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_toilets.py::test_toilets[location1-200]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_toilets[location1-200]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_toilets[location1-200]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=-6.913795&amp;location=107.60278&amp;radius=600 &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_toilets.py::test_toilets[location2-200]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_toilets.py::test_toilets[location2-200]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_toilets.py::test_toilets[location2-200]</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/toilets/new?location=-22.97014&amp;location=-43.18181&amp;radius=600 &quot;HTTP/1.1 200 OK&quot;\n\n"}]}, "renderCollapsed": ["passed"], "initialSort": "result", "title": "Backend Testing Report"}"></div> + <div id="data-container" data-jsonblob="{"environment": {"Python": "3.12.3", "Platform": "Linux-6.8.0-51-generic-x86_64-with-glibc2.39", "Packages": {"pytest": "8.3.4", "pluggy": "1.5.0"}, "Plugins": {"html": "4.1.1", "anyio": "4.8.0", "metadata": "3.1.1"}}, "tests": {"src/tests/test_main.py::test_turckheim": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_turckheim", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_turckheim</td>", "<td>start (0 | 5) - 5 - Porte de France (157 | 5) - 5 - finish (0 | 5) - 0</td>", "<td>20 min</td>", "<td>20 min</td>", "<td class=\"col-duration\">110 ms</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 5 landmarks in \t: 0.004 seconds\nINFO src.main:main.py:122 Total computation time\t: 0.035 seconds\nINFO src.main:main.py:127 Generated a trip of 20 minutes with 3 landmarks in 0.039 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_bellecour": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_bellecour", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_bellecour</td>", "<td>start (0 | 5) - 5 - H\u00f4tel de l'Europe (217 | 5) - 4 - Palais archi\u00e9piscopal (217 | 5) - 6 - \u00c9glise Saint-Georges (461 | 5) - 3 - Grande Synagogue de Lyon (217 | 5) - 10 - \u00c9glise Saint-Just (460 | 5) - 13 - Basilique Notre-Dame de Fourvi\u00e8re (281 | 5) - 5 - Site historique de Lyon (414 | 5) - 4 - Temple du Change (406 | 5) - 13 - Basilique Saint-Bonaventure (414 | 5) - 12 - finish (0 | 5) - 0</td>", "<td>125 min</td>", "<td>120 min</td>", "<td class=\"col-duration\">00:00:09</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 182 landmarks in \t: 0.042 seconds\nINFO src.main:main.py:122 Total computation time\t: 8.903 seconds\nINFO src.main:main.py:127 Generated a trip of 125 minutes with 11 landmarks in 8.945 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_cologne": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_cologne", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_cologne</td>", "<td>start (0 | 5) - 2 - Excelsior Hotel Ernst (793 | 5) - 2 - St.Andreas (632 | 5) - 4 - K\u00f6lner Dom (1474 | 10) - 2 - R\u00f6misch-Germanisches Museum (901 | 60) - 5 - Gro\u00df St. Martin (582 | 5) - 9 - St. Maria im Kapitol (633 | 5) - 4 - Trinitatiskirche (604 | 5) - 11 - St. Peter (538 | 5) - 7 - Oper der Stadt K\u00f6ln (601 | 5) - 3 - Galeria (531 | 30) - 4 - St. Maria in der Kupfergasse (518 | 5) - 9 - St. Gereon (1059 | 5) - 11 - St. Ursula (529 | 5) - 10 - St. Kunibert (691 | 5) - 10 - finish (0 | 5) - 0</td>", "<td>253 min</td>", "<td>240 min</td>", "<td class=\"col-duration\">00:00:53</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7b7aaac3a000&gt;\nrequest = &lt;FixtureRequest for &lt;Function test_cologne&gt;&gt;\n\n def test_cologne(client, request) : # pylint: disable=redefined-outer-name\n &quot;&quot;&quot;\n Test n\u00b02 : Custom test in Lyon centre to ensure proper decision making in crowded area.\n \n Args:\n client:\n request:\n &quot;&quot;&quot;\n start_time = time.time() # Start timer\n duration_minutes = 240\n \n response = client.post(\n &quot;/trip/new&quot;,\n json={\n &quot;preferences&quot;: {&quot;sightseeing&quot;: {&quot;type&quot;: &quot;sightseeing&quot;, &quot;score&quot;: 5},\n &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5},\n &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5},\n &quot;max_time_minute&quot;: duration_minutes,\n &quot;detour_tolerance_minute&quot;: 0},\n &quot;start&quot;: [50.942352665, 6.957777972392]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&#x27;first_landmark_uuid&#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&#x27;total_time&#x27;], duration_minutes)\n \n # for elem in landmarks :\n # print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n&gt; assert comp_time &lt; 30, f&quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&quot;\nE AssertionError: Computation time exceeded 30 seconds: 53.27 seconds\nE assert 53.27033972740173 &lt; 30\n\nsrc/tests/test_main.py:137: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 244 landmarks in \t: 0.069 seconds\nINFO src.main:main.py:122 Total computation time\t: 53.196 seconds\nINFO src.main:main.py:127 Generated a trip of 253 minutes with 16 landmarks in 53.265 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_strasbourg": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_strasbourg", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_strasbourg</td>", "<td>start (0 | 5) - 8 - \u00c9glise protestante Saint-Pierre-le-Jeune (347 | 5) - 6 - \u00c9glise catholique Saint-Pierre-le-Jeune (197 | 5) - 8 - H\u00f4tel de Ville (295 | 5) - 4 - De la Grande \u00eele \u00e0 la Neustadt (414 | 5) - 8 - Bains municipaux de Strasbourg (518 | 5) - 5 - \u00c9glise Saint-\u00c9tienne (259 | 5) - 20 - Centre Administratif Ville et Eurom\u00e9tropole de Strasbourg (405 | 5) - 8 - Porte de l'H\u00f4pital (207 | 5) - 3 - \u00c9glise Saint-Nicolas (303 | 5) - 8 - Cath\u00e9drale Notre-Dame (728 | 10) - 8 - Circuit \u00ab Petite France \u00bb (414 | 5) - 9 - Barrage Vauban (391 | 5) - 10 - \u00c9glise Catholique Saint-Jean-Baptiste (281 | 5) - 1 - finish (0 | 5) - 0</td>", "<td>181 min</td>", "<td>180 min</td>", "<td class=\"col-duration\">00:00:05</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 118 landmarks in \t: 0.027 seconds\nINFO src.main:main.py:122 Total computation time\t: 5.281 seconds\nINFO src.main:main.py:127 Generated a trip of 181 minutes with 15 landmarks in 5.308 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_zurich": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_zurich", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_zurich</td>", "<td>start (0 | 5) - 14 - Johanneskirche (351 | 5) - 11 - Evangelisch-Lutherische Kirche Z\u00fcrich (391 | 5) - 9 - Russisch-Orthodoxe Auferstehungskirche (369 | 5) - 6 - Liebfrauenkirche (281 | 5) - 11 - Predigerkirche (351 | 5) - 8 - St. Peter (489 | 5) - 5 - Grossm\u00fcnster (483 | 5) - 1 - Wasserkirche (238 | 5) - 3 - Fraum\u00fcnster (531 | 5) - 0 - Fraum\u00fcnster Kreuzgang (174 | 5) - 1 - Stadthaus (191 | 5) - 5 - Rebekkabrunnen (174 | 5) - 4 - Zentralhofbrunnen (173 | 5) - 5 - Augustinerkirche (238 | 5) - 4 - St. Anna-Kapelle (191 | 5) - 6 - Globus (369 | 30) - 5 - finish (0 | 5) - 0</td>", "<td>208 min</td>", "<td>180 min</td>", "<td class=\"col-duration\">00:00:04</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 133 landmarks in \t: 0.024 seconds\nINFO src.main:main.py:122 Total computation time\t: 4.107 seconds\nINFO src.main:main.py:127 Generated a trip of 208 minutes with 18 landmarks in 4.131 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_paris": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_paris", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_paris</td>", "<td>start (0 | 5) - 21 - \u00c9glise Saint-Eug\u00e8ne Sainte-C\u00e9cile (871 | 5) - 21 - \u00c9glise Saint-Leu - Saint-Gilles (546 | 5) - 6 - Centre Georges Pompidou (1118 | 5) - 3 - \u00c9glise Saint-Merri (529 | 5) - 13 - Square Jean XXIII (492 | 5) - 12 - \u00c9glise Saint-\u00c9tienne-du-Mont (696 | 5) - 13 - Cath\u00e9drale Notre-Dame de Paris (1469 | 10) - 10 - Tour Saint-Jacques (793 | 5) - 7 - Sainte-Chapelle (1469 | 60) - 1 - Palais de Justice de Paris (531 | 5) - 9 - \u00c9glise Saint-Germain l'Auxerrois (662 | 5) - 8 - Pyramide du Louvre (557 | 5) - 3 - Tunnel des Tuileries (506 | 5) - 3 - Palais du Louvre (891 | 5) - 6 - Temple de l'Oratoire du Louvre (840 | 5) - 6 - Jardin Nelson Mandela (492 | 5) - 3 - finish (0 | 5) - 0</td>", "<td>290 min</td>", "<td>300 min</td>", "<td class=\"col-duration\">00:00:07</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 363 landmarks in \t: 0.077 seconds\nINFO src.main:main.py:122 Total computation time\t: 7.226 seconds\nINFO src.main:main.py:127 Generated a trip of 290 minutes with 18 landmarks in 7.304 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_new_york": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_new_york", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_new_york</td>", "<td>start (0 | 5) - 7 - New Museum (406 | 60) - 8 - Capitale (810 | 5) - 10 - Columbus Park (646 | 5) - 3 - Thomas Paine Park (394 | 5) - 3 - Collect Pond Park (485 | 5) - 10 - Tribeca Park (455 | 5) - 4 - Albert Capsouto Park (454 | 5) - 7 - New York City Fire Museum (461 | 60) - 6 - Duarte Square (685 | 5) - 12 - Petrosino Square (394 | 5) - 5 - Saint Patrick's Old Cathedral (489 | 10) - 14 - Judson Memorial Church (518 | 5) - 12 - Grace Church (518 | 5) - 7 - Union Square Park (646 | 5) - 10 - Flatiron Building (780 | 5) - 5 - Cathedral of St. Sava (518 | 10) - 4 - Madison Square Park (646 | 5) - 7 - Calvary Church (461 | 5) - 17 - Immaculate Conception Church (546 | 5) - 6 - St. Nicholas of Myra Orthodox Church (546 | 5) - 8 - Saint Mark's in-the-Bowery (633 | 5) - 11 - finish (0 | 5) - 0</td>", "<td>406 min</td>", "<td>600 min</td>", "<td class=\"col-duration\">735 ms</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7b7aaac3a000&gt;\nrequest = &lt;FixtureRequest for &lt;Function test_new_york&gt;&gt;\n\n def test_new_york(client, request) : # pylint: disable=redefined-outer-name\n &quot;&quot;&quot;\n Test n\u00b02 : Custom test in New York (les Halles) centre to ensure proper decision making in crowded area.\n \n Args:\n client:\n request:\n &quot;&quot;&quot;\n start_time = time.time() # Start timer\n duration_minutes = 600\n \n response = client.post(\n &quot;/trip/new&quot;,\n json={\n &quot;preferences&quot;: {&quot;sightseeing&quot;: {&quot;type&quot;: &quot;sightseeing&quot;, &quot;score&quot;: 5},\n &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5},\n &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5},\n &quot;max_time_minute&quot;: duration_minutes,\n &quot;detour_tolerance_minute&quot;: 0},\n &quot;start&quot;: [40.72592726802, -73.9920434795]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&#x27;first_landmark_uuid&#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&#x27;total_time&#x27;], duration_minutes)\n \n # for elem in landmarks :\n # print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n assert comp_time &lt; 30, f&quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&quot;\n&gt; assert duration_minutes*0.8 &lt; result[&#x27;total_time&#x27;], f&quot;Trip too short: {result[&#x27;total_time&#x27;]} instead of {duration_minutes}&quot;\nE AssertionError: Trip too short: 406 instead of 600\nE assert (600 * 0.8) &lt; 406\n\nsrc/tests/test_main.py:302: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 211 landmarks in \t: 0.028 seconds\nINFO src.main:main.py:122 Total computation time\t: 0.701 seconds\nINFO src.main:main.py:127 Generated a trip of 406 minutes with 23 landmarks in 0.729 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_main.py::test_shopping": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_shopping", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_shopping</td>", "<td>start (0 | 5) - 9 - Shopping Area (538 | 40) - 4 - Grand Bazar (93 | 30) - 20 - Halles de Lyon Paul Bocuse (272 | 30) - 7 - Galeries Lafayette (197 | 30) - 3 - Westfield La Part-Dieu (546 | 30) - 2 - Muji (259 | 30) - 25 - Grand H\u00f4tel-Dieu (546 | 30) - 5 - finish (0 | 5) - 0</td>", "<td>300 min</td>", "<td>240 min</td>", "<td class=\"col-duration\">60 ms</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7b7aaac3a000&gt;\nrequest = &lt;FixtureRequest for &lt;Function test_shopping&gt;&gt;\n\n def test_shopping(client, request) : # pylint: disable=redefined-outer-name\n &quot;&quot;&quot;\n Test n\u00b03 : Custom test in Lyon centre to ensure shopping clusters are found.\n \n Args:\n client:\n request:\n &quot;&quot;&quot;\n start_time = time.time() # Start timer\n duration_minutes = 240\n \n response = client.post(\n &quot;/trip/new&quot;,\n json={\n &quot;preferences&quot;: {&quot;sightseeing&quot;: {&quot;type&quot;: &quot;sightseeing&quot;, &quot;score&quot;: 0},\n &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 0},\n &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5},\n &quot;max_time_minute&quot;: duration_minutes,\n &quot;detour_tolerance_minute&quot;: 0},\n &quot;start&quot;: [45.7576485, 4.8330241]\n }\n )\n result = response.json()\n landmarks = load_trip_landmarks(client, result[&#x27;first_landmark_uuid&#x27;])\n \n # Get computation time\n comp_time = time.time() - start_time\n \n # Add details to report\n log_trip_details(request, landmarks, result[&#x27;total_time&#x27;], duration_minutes)\n \n for elem in landmarks :\n print(elem)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n assert comp_time &lt; 30, f&quot;Computation time exceeded 30 seconds: {comp_time:.2f} seconds&quot;\n assert duration_minutes*0.8 &lt; result[&#x27;total_time&#x27;], f&quot;Trip too short: {result[&#x27;total_time&#x27;]} instead of {duration_minutes}&quot;\n&gt; assert duration_minutes*1.2 &gt; result[&#x27;total_time&#x27;], f&quot;Trip too long: {result[&#x27;total_time&#x27;]} instead of {duration_minutes}&quot;\nE AssertionError: Trip too long: 300 instead of 240\nE assert (240 * 1.2) &gt; 300\n\nsrc/tests/test_main.py:344: AssertionError\n\n----------------------------- Captured stdout call -----------------------------\nLandmark(start): [start @(45.7576485, 4.8330241), score=0, time_to_next=9]\nLandmark(shopping): [Shopping Area @(np.float64(45.76223053940519), np.float64(4.833794685873603)), score=538, time_to_next=4]\nLandmark(shopping): [Grand Bazar @(45.7632141, 4.8361975), score=93, time_to_next=20]\nLandmark(shopping): [Halles de Lyon Paul Bocuse @(45.7628282, 4.8505601), score=272, time_to_next=7]\nLandmark(shopping): [Galeries Lafayette @(45.7627107, 4.8556833), score=197, time_to_next=3]\nLandmark(shopping): [Westfield La Part-Dieu @(45.761331, 4.855676), score=546, time_to_next=2]\nLandmark(shopping): [Muji @(45.7615971, 4.8543781), score=259, time_to_next=25]\nLandmark(shopping): [Grand H\u00f4tel-Dieu @(45.7586955, 4.8364597), score=546, time_to_next=5]\nLandmark(finish): [finish @(45.7576485, 4.8330241), score=0]\n\n------------------------------ Captured log call -------------------------------\nINFO src.main:main.py:65 No end coordinates provided. Using start=end.\nINFO src.main:main.py:97 Fetched 7 landmarks in \t: 0.009 seconds\nINFO src.main:main.py:122 Total computation time\t: 0.047 seconds\nINFO src.main:main.py:127 Generated a trip of 300 minutes with 9 landmarks in 0.056 seconds.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/trip/new &quot;HTTP/1.1 200 OK&quot;\n\n"}]}, "renderCollapsed": ["passed"], "initialSort": "result", "title": "Backend Testing Report"}"></div> <script> (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ const { getCollapsedCategory, setCollapsedIds } = require('./storage.js') diff --git a/backend/src/main.py b/backend/src/main.py index 085fa29..cdae598 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -70,6 +70,7 @@ def new_trip(preferences: Preferences, osm_type='start', osm_id=0, attractiveness=0, + duration=0, must_do=True, n_tags = 0) @@ -79,6 +80,7 @@ def new_trip(preferences: Preferences, osm_type='end', osm_id=0, attractiveness=0, + duration=0, must_do=True, n_tags=0) diff --git a/backend/src/optimization/optimizer.py b/backend/src/optimization/optimizer.py index 86f98cc..54d5769 100644 --- a/backend/src/optimization/optimizer.py +++ b/backend/src/optimization/optimizer.py @@ -87,7 +87,7 @@ class Optimizer: # inequality matrix and vector A_ub = np.zeros(L*L, dtype=np.int16) - b_ub = round(max_time*self.overshoot) + b_ub = round(max_time*(1.1+max_time*self.overshoot)) for i, spot1 in enumerate(landmarks) : c[i] = spot1.attractiveness @@ -489,6 +489,17 @@ class Optimizer: return L + def warm_start(self, x: list[pl.LpVariable], L: int) : + + for i in range(L*L) : + x[i].setInitialValue(0) + + x[1].setInitialValue(1) + x[2*L-1].setInitialValue(1) + + return x + + def pre_processing(self, L: int, landmarks: list[Landmark], max_time: int, max_landmarks: int | None) : """ Preprocesses the optimization problem by setting up constraints and variables for the tour optimization. @@ -539,6 +550,7 @@ class Optimizer: self.respect_order(prob, x, L) # Respect order of visit (only works when max_time is limiting factor) self.respect_user_must(prob, x, L, landmarks) # Force to do/avoid landmarks set by user. + # return prob, self.warm_start(x, L) return prob, x @@ -561,7 +573,7 @@ class Optimizer: prob, x = self.pre_processing(L, landmarks, max_time, max_landmarks) # Solve the problem and extract results. - prob.solve(pl.PULP_CBC_CMD(msg=False, gapRel=0.1)) + prob.solve(pl.PULP_CBC_CMD(msg=False, gapRel=0.1, timeLimit=10, warmStart=False)) status = pl.LpStatus[prob.status] solution = [pl.value(var) for var in x] # The values of the decision variables (will be 0 or 1) diff --git a/backend/src/parameters/landmark_parameters.yaml b/backend/src/parameters/landmark_parameters.yaml index aa03e55..159f19f 100644 --- a/backend/src/parameters/landmark_parameters.yaml +++ b/backend/src/parameters/landmark_parameters.yaml @@ -1,12 +1,12 @@ city_bbox_side: 7500 #m radius_close_to: 50 -church_coeff: 0.65 -nature_coeff: 1.35 +church_coeff: 0.55 +nature_coeff: 1.4 overall_coeff: 10 tag_exponent: 1.15 image_bonus: 1.1 viewpoint_bonus: 5 -wikipedia_bonus: 1.1 +wikipedia_bonus: 1.25 name_bonus: 3 N_important: 40 pay_bonus: -1 diff --git a/backend/src/parameters/optimizer_parameters.yaml b/backend/src/parameters/optimizer_parameters.yaml index 4720ad0..79cd24c 100644 --- a/backend/src/parameters/optimizer_parameters.yaml +++ b/backend/src/parameters/optimizer_parameters.yaml @@ -3,4 +3,4 @@ detour_corridor_width: 300 average_walking_speed: 4.8 max_landmarks: 10 max_landmarks_refiner: 20 -overshoot: 1.1 +overshoot: 0.0016 diff --git a/backend/src/structs/landmark.py b/backend/src/structs/landmark.py index 326dbd8..50c9d78 100644 --- a/backend/src/structs/landmark.py +++ b/backend/src/structs/landmark.py @@ -51,7 +51,7 @@ class Landmark(BaseModel) : website_url : Optional[str] = None wiki_url : Optional[str] = None description : Optional[str] = None # TODO future - duration : Optional[int] = 0 + duration : Optional[int] = 5 name_en : Optional[str] = None # Unique ID of a given landmark diff --git a/backend/src/tests/test_main.py b/backend/src/tests/test_main.py index 9b68bad..8cbcdd3 100644 --- a/backend/src/tests/test_main.py +++ b/backend/src/tests/test_main.py @@ -50,7 +50,6 @@ def test_turckheim(client, request): # pylint: disable=redefined-outer-name # checks : assert response.status_code == 200 # check for successful planning assert isinstance(landmarks, list) # check that the return type is a list - assert duration_minutes*0.8 < int(result['total_time']) < duration_minutes*1.2, f"Trip duration not within 20\% of desired length" assert len(landmarks) > 2 # check that there is something to visit assert duration_minutes*0.8 < result['total_time'], f"Trip too short: {result['total_time']} instead of {duration_minutes}" assert duration_minutes*1.2 > result['total_time'], f"Trip too long: {result['total_time']} instead of {duration_minutes}" diff --git a/backend/src/utils/landmarks_manager.py b/backend/src/utils/landmarks_manager.py index 43a0211..6aabace 100644 --- a/backend/src/utils/landmarks_manager.py +++ b/backend/src/utils/landmarks_manager.py @@ -294,8 +294,6 @@ class LandmarkManager: elif value == 'cathedral' : landmark.is_place_of_worship = False landmark.duration = 10 - else : - landmark.duration = 5 else: self.set_landmark_score(landmark, landmarktype, preference_level)