Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m49s
Run linting on the backend code / Build (pull_request) Successful in 30s
Run testing on the backend code / Build (pull_request) Failing after 45s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 32s
- Added landmarks_router.py to handle landmark retrieval based on user preferences and location. - Implemented optimization_router.py for trip optimization, including handling preferences and landmarks. - Created toilets_router.py to fetch toilet locations within a specified radius from a given location. - Enhanced error handling and logging across all new endpoints. - Generated a comprehensive report.html for test results and environment details.
1094 lines
76 KiB
HTML
1094 lines
76 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title id="head-title">Backend Testing Report</title>
|
|
<style type="text/css">body {
|
|
font-family: Helvetica, Arial, sans-serif;
|
|
font-size: 12px;
|
|
/* do not increase min-width as some may use split screens */
|
|
min-width: 800px;
|
|
color: #999;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
color: black;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 16px;
|
|
color: black;
|
|
}
|
|
|
|
p {
|
|
color: black;
|
|
}
|
|
|
|
a {
|
|
color: #999;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
/******************************
|
|
* SUMMARY INFORMATION
|
|
******************************/
|
|
#environment td {
|
|
padding: 5px;
|
|
border: 1px solid #e6e6e6;
|
|
vertical-align: top;
|
|
}
|
|
#environment tr:nth-child(odd) {
|
|
background-color: #f6f6f6;
|
|
}
|
|
#environment ul {
|
|
margin: 0;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
/******************************
|
|
* TEST RESULT COLORS
|
|
******************************/
|
|
span.passed,
|
|
.passed .col-result {
|
|
color: green;
|
|
}
|
|
|
|
span.skipped,
|
|
span.xfailed,
|
|
span.rerun,
|
|
.skipped .col-result,
|
|
.xfailed .col-result,
|
|
.rerun .col-result {
|
|
color: orange;
|
|
}
|
|
|
|
span.error,
|
|
span.failed,
|
|
span.xpassed,
|
|
.error .col-result,
|
|
.failed .col-result,
|
|
.xpassed .col-result {
|
|
color: red;
|
|
}
|
|
|
|
.col-links__extra {
|
|
margin-right: 3px;
|
|
}
|
|
|
|
/******************************
|
|
* RESULTS TABLE
|
|
*
|
|
* 1. Table Layout
|
|
* 2. Extra
|
|
* 3. Sorting items
|
|
*
|
|
******************************/
|
|
/*------------------
|
|
* 1. Table Layout
|
|
*------------------*/
|
|
#results-table {
|
|
border: 1px solid #e6e6e6;
|
|
color: #999;
|
|
font-size: 12px;
|
|
width: 100%;
|
|
}
|
|
#results-table th,
|
|
#results-table td {
|
|
padding: 5px;
|
|
border: 1px solid #e6e6e6;
|
|
text-align: left;
|
|
}
|
|
#results-table th {
|
|
font-weight: bold;
|
|
}
|
|
|
|
/*------------------
|
|
* 2. Extra
|
|
*------------------*/
|
|
.logwrapper {
|
|
max-height: 230px;
|
|
overflow-y: scroll;
|
|
background-color: #e6e6e6;
|
|
}
|
|
.logwrapper.expanded {
|
|
max-height: none;
|
|
}
|
|
.logwrapper.expanded .logexpander:after {
|
|
content: "collapse [-]";
|
|
}
|
|
.logwrapper .logexpander {
|
|
z-index: 1;
|
|
position: sticky;
|
|
top: 10px;
|
|
width: max-content;
|
|
border: 1px solid;
|
|
border-radius: 3px;
|
|
padding: 5px 7px;
|
|
margin: 10px 0 10px calc(100% - 80px);
|
|
cursor: pointer;
|
|
background-color: #e6e6e6;
|
|
}
|
|
.logwrapper .logexpander:after {
|
|
content: "expand [+]";
|
|
}
|
|
.logwrapper .logexpander:hover {
|
|
color: #000;
|
|
border-color: #000;
|
|
}
|
|
.logwrapper .log {
|
|
min-height: 40px;
|
|
position: relative;
|
|
top: -50px;
|
|
height: calc(100% + 50px);
|
|
border: 1px solid #e6e6e6;
|
|
color: black;
|
|
display: block;
|
|
font-family: "Courier New", Courier, monospace;
|
|
padding: 5px;
|
|
padding-right: 80px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
div.media {
|
|
border: 1px solid #e6e6e6;
|
|
float: right;
|
|
height: 240px;
|
|
margin: 0 5px;
|
|
overflow: hidden;
|
|
width: 320px;
|
|
}
|
|
|
|
.media-container {
|
|
display: grid;
|
|
grid-template-columns: 25px auto 25px;
|
|
align-items: center;
|
|
flex: 1 1;
|
|
overflow: hidden;
|
|
height: 200px;
|
|
}
|
|
|
|
.media-container--fullscreen {
|
|
grid-template-columns: 0px auto 0px;
|
|
}
|
|
|
|
.media-container__nav--right,
|
|
.media-container__nav--left {
|
|
text-align: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.media-container__viewport {
|
|
cursor: pointer;
|
|
text-align: center;
|
|
height: inherit;
|
|
}
|
|
.media-container__viewport img,
|
|
.media-container__viewport video {
|
|
object-fit: cover;
|
|
width: 100%;
|
|
max-height: 100%;
|
|
}
|
|
|
|
.media__name,
|
|
.media__counter {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-around;
|
|
flex: 0 0 25px;
|
|
align-items: center;
|
|
}
|
|
|
|
.collapsible td:not(.col-links) {
|
|
cursor: pointer;
|
|
}
|
|
.collapsible td:not(.col-links):hover::after {
|
|
color: #bbb;
|
|
font-style: italic;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.col-result {
|
|
width: 130px;
|
|
}
|
|
.col-result:hover::after {
|
|
content: " (hide details)";
|
|
}
|
|
|
|
.col-result.collapsed:hover::after {
|
|
content: " (show details)";
|
|
}
|
|
|
|
#environment-header h2:hover::after {
|
|
content: " (hide details)";
|
|
color: #bbb;
|
|
font-style: italic;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
|
|
#environment-header.collapsed h2:hover::after {
|
|
content: " (show details)";
|
|
color: #bbb;
|
|
font-style: italic;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/*------------------
|
|
* 3. Sorting items
|
|
*------------------*/
|
|
.sortable {
|
|
cursor: pointer;
|
|
}
|
|
.sortable.desc:after {
|
|
content: " ";
|
|
position: relative;
|
|
left: 5px;
|
|
bottom: -12.5px;
|
|
border: 10px solid #4caf50;
|
|
border-bottom: 0;
|
|
border-left-color: transparent;
|
|
border-right-color: transparent;
|
|
}
|
|
.sortable.asc:after {
|
|
content: " ";
|
|
position: relative;
|
|
left: 5px;
|
|
bottom: 12.5px;
|
|
border: 10px solid #4caf50;
|
|
border-top: 0;
|
|
border-left-color: transparent;
|
|
border-right-color: transparent;
|
|
}
|
|
|
|
.hidden, .summary__reload__button.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.summary__data {
|
|
flex: 0 0 550px;
|
|
}
|
|
.summary__reload {
|
|
flex: 1 1;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
.summary__reload__button {
|
|
flex: 0 0 300px;
|
|
display: flex;
|
|
color: white;
|
|
font-weight: bold;
|
|
background-color: #4caf50;
|
|
text-align: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
.summary__reload__button:hover {
|
|
background-color: #46a049;
|
|
}
|
|
.summary__spacer {
|
|
flex: 0 0 550px;
|
|
}
|
|
|
|
.controls {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.filters,
|
|
.collapse {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.filters button,
|
|
.collapse button {
|
|
color: #999;
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
text-decoration: underline;
|
|
}
|
|
.filters button:hover,
|
|
.collapse button:hover {
|
|
color: #ccc;
|
|
}
|
|
|
|
.filter__label {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<h1 id="title">Backend Testing Report</h1>
|
|
<p>Report generated on 13-Jul-2025 at 17:36:30 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
|
|
v4.1.1</p>
|
|
<div id="environment-header">
|
|
<h2>Environment</h2>
|
|
</div>
|
|
<table id="environment"></table>
|
|
<!-- TEMPLATES -->
|
|
<template id="template_environment_row">
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</template>
|
|
<template id="template_results-table__body--empty">
|
|
<tbody class="results-table-row">
|
|
<tr id="not-found-message">
|
|
<td colspan="7">No results found. Check the filters.</th>
|
|
</tr>
|
|
</template>
|
|
<template id="template_results-table__tbody">
|
|
<tbody class="results-table-row">
|
|
<tr class="collapsible">
|
|
</tr>
|
|
<tr class="extras-row">
|
|
<td class="extra" colspan="7">
|
|
<div class="extraHTML"></div>
|
|
<div class="media">
|
|
<div class="media-container">
|
|
<div class="media-container__nav--left"><</div>
|
|
<div class="media-container__viewport">
|
|
<img src="" />
|
|
<video controls>
|
|
<source src="" type="video/mp4">
|
|
</video>
|
|
</div>
|
|
<div class="media-container__nav--right">></div>
|
|
</div>
|
|
<div class="media__name"></div>
|
|
<div class="media__counter"></div>
|
|
</div>
|
|
<div class="logwrapper">
|
|
<div class="logexpander"></div>
|
|
<div class="log"></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</template>
|
|
<!-- END TEMPLATES -->
|
|
<div class="summary">
|
|
<div class="summary__data">
|
|
<h2>Summary</h2>
|
|
<div class="additional-summary prefix">
|
|
</div>
|
|
<p class="run-count">8 tests took 00:10:27.</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()">
|
|
<div>There are still tests running. <br />Reload this page to get the latest results!</div>
|
|
</div>
|
|
</div>
|
|
<div class="summary__spacer"></div>
|
|
<div class="controls">
|
|
<div class="filters">
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" />
|
|
<span class="failed">2 Failed,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" />
|
|
<span class="passed">6 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/>
|
|
<span class="xfailed">0 Expected failures,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xpassed" disabled/>
|
|
<span class="xpassed">0 Unexpected passes,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="error" disabled/>
|
|
<span class="error">0 Errors,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="rerun" disabled/>
|
|
<span class="rerun">0 Reruns</span>
|
|
</div>
|
|
<div class="collapse">
|
|
<button id="show_all_details">Show all details</button> / <button id="hide_all_details">Hide all details</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="additional-summary summary">
|
|
</div>
|
|
<div class="additional-summary postfix">
|
|
</div>
|
|
</div>
|
|
<table id="results-table">
|
|
<thead id="results-table-head">
|
|
<tr>
|
|
<th class="sortable" data-column-type="result">Result</th>
|
|
<th class="sortable" data-column-type="testId">Test</th>
|
|
<th>Detailed trip</th>
|
|
<th>Trip Duration</th>
|
|
<th>Target Duration</th>
|
|
<th>Execution time</th>
|
|
<th>Links</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</body>
|
|
<footer>
|
|
<div id="data-container" data-jsonblob="{"environment": {"Python": "3.12.3", "Platform": "Linux-6.8.0-63-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_trip_generation.py::test_trip[0-0-5-240-start_coords0-None]": [{"extras": [], "result": "Failed", "testId": "src/tests/test_trip_generation.py::test_trip[0-0-5-240-start_coords0-None]", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[0-0-5-240-start_coords0-None]</td>", "<td>start (0 | 0) - 4 - Vue sous-terraine du Parking des C\u00e9lestins (565 | 10) - 6 - Square des Estr\u00e9es (56 | 5) - 10 - Jardin Andr\u00e9 Malraux (78 | 5) - 4 - Esplanade (1748 | 10) - 6 - Parc des Hauteurs (98 | 5) - 18 - Tour des Deux Amants (355 | 10) - 53 - Square Louis Blanc (382 | 5) - 22 - Place Aristide Briand (78 | 5) - 34 - Le Rh\u00f4ne (559 | 5) - 28 - finish (0 | 0) - 0</td>", "<td>245 min</td>", "<td>240 min</td>", "<td class=\"col-duration\">00:09:28</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x785e069c7a10&gt;, request = &lt;FixtureRequest for &lt;Function test_trip[0-0-5-240-start_coords0-None]&gt;&gt;, sightseeing = 0, shopping = 0, nature = 5, max_time_minute = 240\nstart_coords = [45.7576485, 4.8330241], end_coords = None\n\n @pytest.mark.parametrize(\n &quot;sightseeing, shopping, nature, max_time_minute, start_coords, end_coords&quot;,\n [\n # Edge cases\n (0, 0, 5, 240, [45.7576485, 4.8330241], None), # Lyon, Bellecour - test shopping only\n \n # Realistic\n (5, 0, 0, 20, [48.0845881, 7.2804050], None), # Turckheim\n (5, 5, 5, 120, [45.7576485, 4.8330241], None), # Lyon, Bellecour\n (5, 2, 5, 240, [50.9423526, 6.9577780], None), # Cologne, centre\n (3, 5, 0, 180, [48.5846589226, 7.74078715721], None), # Strasbourg, centre\n (2, 4, 5, 180, [47.377884227, 8.5395114066], None), # Zurich, centre\n (5, 0, 5, 200, [48.85468881798671, 2.3423925755998374], None), # Paris, centre\n (5, 5, 5, 600, [40.72592726802, -73.9920434795], None), # New York, Lower Manhattan\n ]\n )\n def test_trip(client, request, sightseeing, shopping, nature, max_time_minute, start_coords, end_coords):\n \n start_time = time.time() # Start timer\n \n prefs = Preferences(\n sightseeing=Preference(type=&#x27;sightseeing&#x27;, score=sightseeing),\n shopping=Preference(type=&#x27;shopping&#x27;, score=shopping),\n nature=Preference(type=&#x27;nature&#x27;, score=nature),\n max_time_minute=max_time_minute,\n detour_tolerance_minute=0,\n )\n start = start_coords\n end = end_coords\n \n # Step 1: request the list of landmarks in the vicinty of the starting point\n response = client.post(\n &quot;/get/landmarks&quot;,\n json={\n &quot;preferences&quot;: prefs.model_dump(),\n &quot;start&quot;: start_coords,\n &quot;end&quot;: end_coords,\n }\n )\n landmarks = response.json()\n \n # Step 2: Feed the landmarks to the optimizer to compute the trip\n response = client.post(\n &quot;/optimize/trip&quot;,\n json={\n &quot;preferences&quot;: prefs.model_dump(),\n &quot;landmarks&quot;: landmarks,\n &quot;start&quot;: start,\n &quot;end&quot;: end,\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;], prefs.max_time_minute)\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: 567.86 seconds\nE assert 567.858460187912 &lt; 30\n\nsrc/tests/test_trip_generation.py:79: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (45.7576485, 4.8330241)\n\tTime: 240\n\tSightseeing: 0\n\tNature: 5\n\tShopping: 0\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (45.7576485, 4.8330241)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:108 Found 91 nature landmarks\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 84 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 84 landmarks in \t: 0.007 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (45.7576485, 4.8330241)\n\tTime: 240\n\tSightseeing: 0\n\tNature: 5\n\tShopping: 0\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 0 times, objective value : 6249\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 15 times, objective value : 3919\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 3.514 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 245 minutes with 11 landmarks in 3.514 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(45.7576485, 4.8330241), score=0, time_to_next=4]\n\tLandmark(nature): [Vue sous-terraine du Parking des C\u00e9lestins @(45.7597666, 4.8318664), score=565, time_to_next=6]\n\tLandmark(nature): [Square des Estr\u00e9es @(45.7613238, 4.8278969), score=56, time_to_next=10]\n\tLandmark(nature): [Jardin Andr\u00e9 Malraux @(45.7585166, 4.8215829), score=78, time_to_next=4]\n\tLandmark(nature): [Esplanade @(45.7603525, 4.8205849), score=1748, time_to_next=6]\n\tLandmark(nature): [Parc des Hauteurs @(45.7632417, 4.8182253), score=98, time_to_next=18]\n\tLandmark(nature): [Tour des Deux Amants @(45.7702868, 4.8101303), score=355, time_to_next=53]\n\tLandmark(nature): [Square Louis Blanc @(45.7644092, 4.8479543), score=382, time_to_next=22]\n\tLandmark(nature): [Place Aristide Briand @(45.7531331, 4.8497417), score=78, time_to_next=34]\n\tLandmark(nature): [Le Rh\u00f4ne @(45.7435106, 4.82879), score=559, time_to_next=28]\n\tLandmark(finish): [finish @(45.7576485, 4.8330241), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nERROR src.overpass.overpass:overpass.py:423 An error occured while parsing file cache/hollow_6863772e04bd1b3cdb36c53fd76f92a1.json as .json file: Error connecting to Overpass API: HTTP Error 429: Too Many Requests\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 279/280 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[5-0-0-20-start_coords1-None]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_trip_generation.py::test_trip[5-0-0-20-start_coords1-None]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[5-0-0-20-start_coords1-None]</td>", "<td>start (0 | 0) - 6 - H\u00f4tel de ville (238 | 5) - 1 - H\u00f4tel des Deux-Clefs (217 | 5) - 6 - finish (0 | 0) - 0</td>", "<td>23 min</td>", "<td>20 min</td>", "<td class=\"col-duration\">00:00:02</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (48.0845881, 7.280405)\n\tTime: 20\n\tSightseeing: 5\n\tNature: 0\n\tShopping: 0\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (48.0845881, 7.280405)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 9 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 7 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 7 landmarks in \t: 0.03 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (48.0845881, 7.280405)\n\tTime: 20\n\tSightseeing: 5\n\tNature: 0\n\tShopping: 0\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 0 times, objective value : 455\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 0 times, objective value : 455\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 0.093 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 23 minutes with 4 landmarks in 0.093 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(48.0845881, 7.280405), score=0, time_to_next=6]\n\tLandmark(sightseeing): [H\u00f4tel de ville @(48.0874108, 7.2779686), score=238, time_to_next=1]\n\tLandmark(sightseeing): [H\u00f4tel des Deux-Clefs @(48.0871764, 7.2776559), score=217, time_to_next=6]\n\tLandmark(finish): [finish @(48.0845881, 7.280405), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 1/1 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[5-5-5-120-start_coords2-None]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_trip_generation.py::test_trip[5-5-5-120-start_coords2-None]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[5-5-5-120-start_coords2-None]</td>", "<td>start (0 | 0) - 4 - Vue sous-terraine du Parking des C\u00e9lestins (565 | 10) - 15 - Esplanade (1748 | 10) - 0 - Lugdunum Mus\u00e9e et Th\u00e9\u00e2tres Romains (272 | 60) - 2 - Fourvi\u00e8re (1785 | 20) - 19 - finish (0 | 0) - 0</td>", "<td>140 min</td>", "<td>120 min</td>", "<td class=\"col-duration\">00:00:21</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (45.7576485, 4.8330241)\n\tTime: 120\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 5\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (45.7576485, 4.8330241)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 161 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 3 different sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:108 Found 91 nature landmarks\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:115 Found 10 shopping landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 5 different shopping clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 232 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 232 landmarks in \t: 0.092 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (45.7576485, 4.8330241)\n\tTime: 120\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 5\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 18 times, objective value : 3837\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 12 times, objective value : 4370\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 20.544 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 140 minutes with 6 landmarks in 20.544 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(45.7576485, 4.8330241), score=0, time_to_next=4]\n\tLandmark(nature): [Vue sous-terraine du Parking des C\u00e9lestins @(45.7597666, 4.8318664), score=565, time_to_next=15]\n\tLandmark(nature): [Esplanade @(45.7603525, 4.8205849), score=1748]\n\tLandmark(sightseeing): [Lugdunum Mus\u00e9e et Th\u00e9\u00e2tres Romains @(45.760294, 4.8204842), score=272, time_to_next=2]\n\tLandmark(sightseeing): [Fourvi\u00e8re @(45.7596274, 4.819224), score=1785, time_to_next=19]\n\tLandmark(finish): [finish @(45.7576485, 4.8330241), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 0/0 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[5-2-5-240-start_coords3-None]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_trip_generation.py::test_trip[5-2-5-240-start_coords3-None]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[5-2-5-240-start_coords3-None]</td>", "<td>start (0 | 0) - 2 - K\u00f6lner Dom (1616 | 10) - 12 - St. Kunibert (780 | 5) - 17 - K\u00f6ln Triangle (10129 | 10) - 13 - Gro\u00df St. Martin (634 | 5) - 4 - Rathaus (Spanischer Bau) (480 | 5) - 11 - Trinitatiskirche (633 | 5) - 6 - St. Georg (483 | 5) - 4 - Finanzamt K\u00f6ln-Mitte (483 | 5) - 14 - Oper der Stadt K\u00f6ln (632 | 5) - 1 - Schauspielhaus K\u00f6ln (507 | 5) - 5 - Kreissparkasse K\u00f6ln (728 | 5) - 2 - St. Aposteln (891 | 5) - 11 - Alte Wache (518 | 5) - 3 - St. Maria in der Kupfergasse (633 | 5) - 7 - St.Andreas (728 | 5) - 2 - Excelsior Hotel Ernst (825 | 5) - 2 - St. Mari\u00e4 Himmelfahrt (531 | 5) - 2 - finish (0 | 0) - 0</td>", "<td>213 min</td>", "<td>240 min</td>", "<td class=\"col-duration\">00:00:05</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (50.9423526, 6.957778)\n\tTime: 240\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 2\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (50.9423526, 6.957778)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 278 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:108 Found 61 nature landmarks\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:115 Found 5 shopping landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 4 different shopping clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 264 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 264 landmarks in \t: 0.102 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (50.9423526, 6.957778)\n\tTime: 240\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 2\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 1 times, objective value : 19248\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 11 times, objective value : 21231\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 4.87 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 213 minutes with 19 landmarks in 4.87 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(50.9423526, 6.957778), score=0, time_to_next=2]\n\tLandmark(sightseeing): [K\u00f6lner Dom @(50.941307, 6.9581112), score=1616, time_to_next=12]\n\tLandmark(sightseeing): [St. Kunibert @(50.9467494, 6.9626688), score=780, time_to_next=17]\n\tLandmark(nature): [K\u00f6ln Triangle @(50.9403874, 6.9718004), score=10129, time_to_next=13]\n\tLandmark(sightseeing): [Gro\u00df St. Martin @(50.9385743, 6.9616193), score=634, time_to_next=4]\n\tLandmark(sightseeing): [Rathaus (Spanischer Bau) @(50.9386624, 6.95873), score=480, time_to_next=11, secondary]\n\tLandmark(sightseeing): [Trinitatiskirche @(50.9333896, 6.9607359), score=633, time_to_next=6]\n\tLandmark(sightseeing): [St. Georg @(50.9319032, 6.9568456), score=483, time_to_next=4, secondary]\n\tLandmark(sightseeing): [Finanzamt K\u00f6ln-Mitte @(50.9311327, 6.9538126), score=483, time_to_next=14, secondary]\n\tLandmark(sightseeing): [Oper der Stadt K\u00f6ln @(50.9379922, 6.9512598), score=632, time_to_next=1, secondary]\n\tLandmark(sightseeing): [Schauspielhaus K\u00f6ln @(50.9374189, 6.9507855), score=507, time_to_next=5, secondary]\n\tLandmark(sightseeing): [Kreissparkasse K\u00f6ln @(50.9369529, 6.9464245), score=728, time_to_next=2]\n\tLandmark(sightseeing): [St. Aposteln @(50.9366002, 6.9449933), score=891, time_to_next=11]\n\tLandmark(sightseeing): [Alte Wache @(50.9412545, 6.9495581), score=518, time_to_next=3, secondary]\n\tLandmark(sightseeing): [St. Maria in der Kupfergasse @(50.9398145, 6.9502032), score=633, time_to_next=7]\n\tLandmark(sightseeing): [St.Andreas @(50.9419526, 6.9548971), score=728, time_to_next=2]\n\tLandmark(sightseeing): [Excelsior Hotel Ernst @(50.9421627, 6.9563448), score=825, time_to_next=2]\n\tLandmark(sightseeing): [St. Mari\u00e4 Himmelfahrt @(50.943059, 6.9566598), score=531, time_to_next=2, secondary]\n\tLandmark(finish): [finish @(50.9423526, 6.957778), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 0/0 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[3-5-0-180-start_coords4-None]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_trip_generation.py::test_trip[3-5-0-180-start_coords4-None]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[3-5-0-180-start_coords4-None]</td>", "<td>start (0 | 0) - 8 - \u00c9glise protestante Saint-Pierre-le-Jeune (208 | 5) - 6 - H\u00f4tel de Ville (198 | 5) - 4 - De la Grande \u00eele \u00e0 la Neustadt (248 | 5) - 8 - \u00c9glise Saint-Paul (235 | 5) - 6 - Bains municipaux de Strasbourg (327 | 5) - 9 - \u00c9glise catholique Sainte-Madeleine (168 | 5) - 6 - Cath\u00e9drale Notre-Dame (495 | 10) - 8 - \u00c9glise Saint-Nicolas (181 | 5) - 3 - Porte de l'H\u00f4pital (145 | 5) - 7 - \u00c9glise protestante Saint-Thomas (181 | 5) - 2 - Circuit \u00ab Petite France \u00bb (248 | 5) - 9 - Barrage Vauban (248 | 5) - 10 - \u00c9glise Catholique Saint-Jean-Baptiste (168 | 5) - 1 - finish (0 | 0) - 0</td>", "<td>157 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.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (48.5846589226, 7.74078715721)\n\tTime: 180\n\tSightseeing: 3\n\tNature: 0\n\tShopping: 5\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (48.5846589226, 7.74078715721)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 76 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:115 Found 3 shopping landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 2 different shopping clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 70 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 70 landmarks in \t: 0.039 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (48.5846589226, 7.74078715721)\n\tTime: 180\n\tSightseeing: 3\n\tNature: 0\n\tShopping: 5\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 1 times, objective value : 3182\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 6 times, objective value : 3050\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 3.846 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 157 minutes with 15 landmarks in 3.846 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(48.5846589226, 7.74078715721), score=0, time_to_next=8]\n\tLandmark(sightseeing): [\u00c9glise protestante Saint-Pierre-le-Jeune @(48.5855301, 7.7465472), score=208, time_to_next=6]\n\tLandmark(sightseeing): [H\u00f4tel de Ville @(48.5846612, 7.7506403), score=198, time_to_next=4]\n\tLandmark(sightseeing): [De la Grande \u00eele \u00e0 la Neustadt @(48.5849416, 7.7539938), score=248, time_to_next=8]\n\tLandmark(sightseeing): [\u00c9glise Saint-Paul @(48.5863214, 7.759848), score=235, time_to_next=6]\n\tLandmark(sightseeing): [Bains municipaux de Strasbourg @(48.5833343, 7.7595517), score=327, time_to_next=9]\n\tLandmark(sightseeing): [\u00c9glise catholique Sainte-Madeleine @(48.5799473, 7.7548339), score=168, time_to_next=6, secondary]\n\tLandmark(sightseeing): [Cath\u00e9drale Notre-Dame @(48.5818887, 7.7510342), score=495, time_to_next=8]\n\tLandmark(sightseeing): [\u00c9glise Saint-Nicolas @(48.5783593, 7.748501), score=181, time_to_next=3]\n\tLandmark(sightseeing): [Porte de l&#x27;H\u00f4pital @(48.5770255, 7.7495671), score=145, time_to_next=7, secondary]\n\tLandmark(sightseeing): [\u00c9glise protestante Saint-Thomas @(48.5796572, 7.7456235), score=181, time_to_next=2]\n\tLandmark(sightseeing): [Circuit \u00ab Petite France \u00bb @(48.5807382, 7.7450251), score=248, time_to_next=9]\n\tLandmark(sightseeing): [Barrage Vauban @(48.5795997, 7.7380036), score=248, time_to_next=10]\n\tLandmark(sightseeing): [\u00c9glise Catholique Saint-Jean-Baptiste @(48.584387, 7.7400892), score=168, time_to_next=1, secondary]\n\tLandmark(finish): [finish @(48.5846589226, 7.74078715721), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 0/0 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[2-4-5-180-start_coords5-None]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_trip_generation.py::test_trip[2-4-5-180-start_coords5-None]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[2-4-5-180-start_coords5-None]</td>", "<td>start (0 | 0) - 6 - Platzpromenade (187 | 5) - 13 - Polyterrasse (355 | 10) - 3 - Friedenskirche (83 | 5) - 9 - Karlsturm (1874 | 10) - 0 - Grossm\u00fcnster (202 | 5) - 1 - Helmhaus (173 | 60) - 8 - B\u00fcrkliplatz (565 | 10) - 0 - Ganymed (87 | 5) - 7 - Fraum\u00fcnster (222 | 5) - 7 - Lindenhof (1018 | 10) - 6 - St. Anna-Kapelle (83 | 5) - 6 - Pestalozzianlage (149 | 5) - 5 - finish (0 | 0) - 0</td>", "<td>206 min</td>", "<td>180 min</td>", "<td class=\"col-duration\">00:00:15</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (47.377884227, 8.5395114066)\n\tTime: 180\n\tSightseeing: 2\n\tNature: 5\n\tShopping: 4\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (47.377884227, 8.5395114066)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 85 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:108 Found 64 nature landmarks\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:115 Found 3 shopping landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 3 different shopping clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 145 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 145 landmarks in \t: 0.044 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (47.377884227, 8.5395114066)\n\tTime: 180\n\tSightseeing: 2\n\tNature: 5\n\tShopping: 4\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 18 times, objective value : 4603\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 7 times, objective value : 4998\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 14.429 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 206 minutes with 14 landmarks in 14.429 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(47.377884227, 8.5395114066), score=0, time_to_next=6]\n\tLandmark(nature): [Platzpromenade @(47.3808468, 8.5400135), score=187, time_to_next=13]\n\tLandmark(nature): [Polyterrasse @(47.3760957, 8.5465161), score=355, time_to_next=3]\n\tLandmark(sightseeing): [Friedenskirche @(47.3746359, 8.5464654), score=83, time_to_next=9, secondary]\n\tLandmark(nature): [Karlsturm @(47.3701486, 8.5436792), score=1874]\n\tLandmark(sightseeing): [Grossm\u00fcnster @(47.3701027, 8.5439722), score=202, time_to_next=1]\n\tLandmark(sightseeing): [Helmhaus @(47.3698596, 8.5431622), score=173, time_to_next=8]\n\tLandmark(nature): [B\u00fcrkliplatz @(47.3661525, 8.5415251), score=565]\n\tLandmark(sightseeing): [Ganymed @(47.3660139, 8.5412137), score=87, time_to_next=7]\n\tLandmark(sightseeing): [Fraum\u00fcnster @(47.3697135, 8.5412029), score=222, time_to_next=7]\n\tLandmark(nature): [Lindenhof @(47.3730646, 8.5413876), score=1018, time_to_next=6]\n\tLandmark(sightseeing): [St. Anna-Kapelle @(47.3727574, 8.536799), score=83, time_to_next=6, secondary]\n\tLandmark(nature): [Pestalozzianlage @(47.3755915, 8.5387409), score=149, time_to_next=5]\n\tLandmark(finish): [finish @(47.377884227, 8.5395114066), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 0/0 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[5-0-5-200-start_coords6-None]": [{"extras": [], "result": "Passed", "testId": "src/tests/test_trip_generation.py::test_trip[5-0-5-200-start_coords6-None]", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[5-0-5-200-start_coords6-None]</td>", "<td>start (0 | 0) - 12 - \u00c9glise Saint-Sulpice (760 | 5) - 15 - Pont des Arts (1256 | 10) - 6 - Palais du Louvre (991 | 5) - 8 - \u00c9glise Saint-Roch (662 | 5) - 12 - Temple de l'Oratoire du Louvre (840 | 5) - 5 - \u00c9glise Saint-Germain l'Auxerrois (691 | 5) - 7 - Jardin Nelson Mandela (562 | 5) - 11 - Square de la Tour Saint-Jacques (435 | 5) - 0 - Tour Saint-Jacques (1025 | 5) - 7 - Centre Georges Pompidou (1212 | 5) - 8 - H\u00f4tel de Ville (696 | 5) - 8 - Cath\u00e9drale Notre-Dame de Paris (1534 | 10) - 9 - Palais de Justice de Paris (608 | 5) - 3 - finish (0 | 0) - 0</td>", "<td>186 min</td>", "<td>200 min</td>", "<td class=\"col-duration\">00:00:08</td>", "<td class=\"col-links\"></td>"], "log": "------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (48.85468881798671, 2.3423925755998374)\n\tTime: 200\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 0\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (48.85468881798671, 2.3423925755998374)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 430 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:108 Found 137 nature landmarks\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 447 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 447 landmarks in \t: 0.086 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (48.85468881798671, 2.3423925755998374)\n\tTime: 200\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 0\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 4 times, objective value : 12777\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 7 times, objective value : 11272\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 8.309 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 186 minutes with 15 landmarks in 8.309 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(48.85468881798671, 2.3423925755998374), score=0, time_to_next=12]\n\tLandmark(sightseeing): [\u00c9glise Saint-Sulpice @(48.8509826, 2.3348577), score=760, time_to_next=15]\n\tLandmark(nature): [Pont des Arts @(48.8585951, 2.3376989), score=1256, time_to_next=6]\n\tLandmark(sightseeing): [Palais du Louvre @(48.8614768, 2.3351677), score=991, time_to_next=8]\n\tLandmark(sightseeing): [\u00c9glise Saint-Roch @(48.8653817, 2.3326659), score=662, time_to_next=12]\n\tLandmark(sightseeing): [Temple de l&#x27;Oratoire du Louvre @(48.8616725, 2.3400059), score=840, time_to_next=5]\n\tLandmark(sightseeing): [\u00c9glise Saint-Germain l&#x27;Auxerrois @(48.8595016, 2.3413445), score=691, time_to_next=7]\n\tLandmark(nature): [Jardin Nelson Mandela @(48.8626235, 2.344487), score=562, time_to_next=11, secondary]\n\tLandmark(nature): [Square de la Tour Saint-Jacques @(48.857913, 2.3487608), score=435, secondary]\n\tLandmark(sightseeing): [Tour Saint-Jacques @(48.8579983, 2.3489178), score=1025, time_to_next=7]\n\tLandmark(sightseeing): [Centre Georges Pompidou @(48.8605235, 2.3524395), score=1212, time_to_next=8]\n\tLandmark(sightseeing): [H\u00f4tel de Ville @(48.8564265, 2.352527), score=696, time_to_next=8]\n\tLandmark(sightseeing): [Cath\u00e9drale Notre-Dame de Paris @(48.8529372, 2.3498701), score=1534, time_to_next=9]\n\tLandmark(sightseeing): [Palais de Justice de Paris @(48.8556537, 2.3446072), score=608, time_to_next=3, secondary]\n\tLandmark(finish): [finish @(48.85468881798671, 2.3423925755998374), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 0/0 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &quot;HTTP/1.1 200 OK&quot;\n\n"}], "src/tests/test_trip_generation.py::test_trip[5-5-5-600-start_coords7-None]": [{"extras": [], "result": "Failed", "testId": "src/tests/test_trip_generation.py::test_trip[5-5-5-600-start_coords7-None]", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_trip_generation.py::test_trip[5-5-5-600-start_coords7-None]</td>", "<td>start (0 | 0) - 11 - Saint Mark's in-the-Bowery (662 | 5) - 6 - Grace Church (546 | 5) - 7 - Union Square Park (738 | 5) - 10 - Flatiron Building (648 | 5) - 3 - Madison Square Park (738 | 5) - 30 - Free Public Stargazing (1874 | 10) - 2 - Whitney Museum of American Art (575 | 60) - 4 - Southeast Overlook (787 | 10) - 2 - Northwest Overlook (565 | 10) - 40 - Duarte Square (783 | 5) - 1 - Albert Capsouto Park (519 | 5) - 4 - Tribeca Park (520 | 5) - 7 - Staple Street Skybridge (565 | 10) - 2 - Duane Park (519 | 5) - 3 - Washington Market Park (606 | 5) - 8 - One World Observatory (1499 | 10) - 0 - One World Trade Center (871 | 5) - 3 - 9/11 Memorial & Museum (780 | 60) - 19 - Collect Pond Park (555 | 5) - 4 - Columbus Park (738 | 5) - 10 - Capitale (840 | 5) - 14 - finish (0 | 0) - 0</td>", "<td>430 min</td>", "<td>600 min</td>", "<td class=\"col-duration\">00:00:05</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x785e069c7a10&gt;, request = &lt;FixtureRequest for &lt;Function test_trip[5-5-5-600-start_coords7-None]&gt;&gt;, sightseeing = 5, shopping = 5, nature = 5, max_time_minute = 600\nstart_coords = [40.72592726802, -73.9920434795], end_coords = None\n\n @pytest.mark.parametrize(\n &quot;sightseeing, shopping, nature, max_time_minute, start_coords, end_coords&quot;,\n [\n # Edge cases\n (0, 0, 5, 240, [45.7576485, 4.8330241], None), # Lyon, Bellecour - test shopping only\n \n # Realistic\n (5, 0, 0, 20, [48.0845881, 7.2804050], None), # Turckheim\n (5, 5, 5, 120, [45.7576485, 4.8330241], None), # Lyon, Bellecour\n (5, 2, 5, 240, [50.9423526, 6.9577780], None), # Cologne, centre\n (3, 5, 0, 180, [48.5846589226, 7.74078715721], None), # Strasbourg, centre\n (2, 4, 5, 180, [47.377884227, 8.5395114066], None), # Zurich, centre\n (5, 0, 5, 200, [48.85468881798671, 2.3423925755998374], None), # Paris, centre\n (5, 5, 5, 600, [40.72592726802, -73.9920434795], None), # New York, Lower Manhattan\n ]\n )\n def test_trip(client, request, sightseeing, shopping, nature, max_time_minute, start_coords, end_coords):\n \n start_time = time.time() # Start timer\n \n prefs = Preferences(\n sightseeing=Preference(type=&#x27;sightseeing&#x27;, score=sightseeing),\n shopping=Preference(type=&#x27;shopping&#x27;, score=shopping),\n nature=Preference(type=&#x27;nature&#x27;, score=nature),\n max_time_minute=max_time_minute,\n detour_tolerance_minute=0,\n )\n start = start_coords\n end = end_coords\n \n # Step 1: request the list of landmarks in the vicinty of the starting point\n response = client.post(\n &quot;/get/landmarks&quot;,\n json={\n &quot;preferences&quot;: prefs.model_dump(),\n &quot;start&quot;: start_coords,\n &quot;end&quot;: end_coords,\n }\n )\n landmarks = response.json()\n \n # Step 2: Feed the landmarks to the optimizer to compute the trip\n response = client.post(\n &quot;/optimize/trip&quot;,\n json={\n &quot;preferences&quot;: prefs.model_dump(),\n &quot;landmarks&quot;: landmarks,\n &quot;start&quot;: start,\n &quot;end&quot;: end,\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;], prefs.max_time_minute)\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 prefs.max_time_minute*0.8 &lt; result[&#x27;total_time&#x27;], f&quot;Trip too short: {result[&#x27;total_time&#x27;]} instead of {prefs.max_time_minute}&quot;\nE AssertionError: Trip too short: 430 instead of 600\nE assert (600 * 0.8) &lt; 430\nE + where 600 = Preferences(sightseeing=Preference(type=&#x27;sightseeing&#x27;, score=5), nature=Preference(type=&#x27;nature&#x27;, score=5), shopping=Preference(type=&#x27;shopping&#x27;, score=5), max_time_minute=600, detour_tolerance_minute=0).max_time_minute\n\nsrc/tests/test_trip_generation.py:80: AssertionError\n\n------------------------------ Captured log call -------------------------------\nINFO src.landmarks.landmarks_router:landmarks_router.py:46 Requested new trip generation. Details:\n\tCoordinates: (40.72592726802, -73.9920434795)\n\tTime: 600\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 5\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:80 Starting to fetch landmarks around (40.72592726802, -73.9920434795)...\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:95 Found 135 sightseeing landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:145 Found 0 sightseeing clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:108 Found 132 nature landmarks\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:115 Found 4 shopping landmarks\nINFO src.landmarks.cluster_manager:cluster_manager.py:137 Found 5 different shopping clusters.\nINFO src.landmarks.landmarks_manager:landmarks_manager.py:131 Found 265 landmarks in total.\nINFO src.landmarks.landmarks_router:landmarks_router.py:60 Fetched 265 landmarks in \t: 0.082 seconds\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/get/landmarks &quot;HTTP/1.1 200 OK&quot;\nINFO src.optimization.optimization_router:optimization_router.py:63 No end coordinates provided. Using start=end.\nINFO src.optimization.optimization_router:optimization_router.py:68 Requested new trip generation. Details:\n\tCoordinates: (40.72592726802, -73.9920434795)\n\tTime: 600\n\tSightseeing: 5\n\tNature: 5\n\tShopping: 5\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 4 times, objective value : 9738\nINFO src.optimization.optimizer:optimizer.py:637 Re-optimized 6 times, objective value : 15928\nINFO src.optimization.optimization_router:optimization_router.py:129 Total computation time\t: 4.462 seconds\nINFO src.optimization.optimization_router:optimization_router.py:134 Optimized a trip of 430 minutes with 23 landmarks in 4.462 seconds.\nINFO src.optimization.optimization_router:optimization_router.py:135 Detailed trip :\n\tLandmark(start): [start @(40.72592726802, -73.9920434795), score=0, time_to_next=11]\n\tLandmark(sightseeing): [Saint Mark&#x27;s in-the-Bowery @(40.7303555, -73.9870882), score=662, time_to_next=6, secondary]\n\tLandmark(sightseeing): [Grace Church @(40.7319828, -73.9909081), score=546, time_to_next=7, secondary]\n\tLandmark(nature): [Union Square Park @(40.7358088, -73.9904565), score=738, time_to_next=10]\n\tLandmark(sightseeing): [Flatiron Building @(40.74103, -73.9896864), score=648, time_to_next=3, secondary]\n\tLandmark(nature): [Madison Square Park @(40.7421868, -73.987872), score=738, time_to_next=30]\n\tLandmark(nature): [Free Public Stargazing @(40.740586, -74.0081171), score=1874, time_to_next=2]\n\tLandmark(sightseeing): [Whitney Museum of American Art @(40.739633, -74.0089385), score=575, time_to_next=4, secondary]\n\tLandmark(nature): [Southeast Overlook @(40.7416246, -74.0102566), score=787, time_to_next=2]\n\tLandmark(nature): [Northwest Overlook @(40.7425714, -74.0108254), score=565, time_to_next=40, secondary]\n\tLandmark(nature): [Duarte Square @(40.7225426, -74.005495), score=783, time_to_next=1]\n\tLandmark(nature): [Albert Capsouto Park @(40.7220728, -74.0058909), score=519, time_to_next=4, secondary]\n\tLandmark(nature): [Tribeca Park @(40.7202231, -74.0057003), score=520, time_to_next=7, secondary]\n\tLandmark(nature): [Staple Street Skybridge @(40.7183436, -74.0094133), score=565, time_to_next=2, secondary]\n\tLandmark(nature): [Duane Park @(40.7171626, -74.0094072), score=519, time_to_next=3, secondary]\n\tLandmark(nature): [Washington Market Park @(40.7170293, -74.0116432), score=606, time_to_next=8, secondary]\n\tLandmark(nature): [One World Observatory @(40.712949, -74.0130438), score=1499]\n\tLandmark(sightseeing): [One World Trade Center @(40.7129993, -74.0131894), score=871, time_to_next=3]\n\tLandmark(sightseeing): [9/11 Memorial &amp; Museum @(40.711456, -74.0127418), score=780, time_to_next=19]\n\tLandmark(nature): [Collect Pond Park @(40.716296, -74.0018559), score=555, time_to_next=4, secondary]\n\tLandmark(nature): [Columbus Park @(40.715093, -74.0000527), score=738, time_to_next=10]\n\tLandmark(sightseeing): [Capitale @(40.7189209, -73.9951923), score=840, time_to_next=14]\n\tLandmark(finish): [finish @(40.72592726802, -73.9920434795), score=0]\nINFO src.overpass.overpass:overpass.py:405 Trip successfully returned, starting to fill cache.\nINFO src.overpass.overpass:overpass.py:425 Successfully filled 0/0 cache files.\nINFO httpx:_client.py:1025 HTTP Request: POST http://testserver/optimize/trip &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')
|
|
|
|
class DataManager {
|
|
setManager(data) {
|
|
const collapsedCategories = [...getCollapsedCategory(data.renderCollapsed)]
|
|
const collapsedIds = []
|
|
const tests = Object.values(data.tests).flat().map((test, index) => {
|
|
const collapsed = collapsedCategories.includes(test.result.toLowerCase())
|
|
const id = `test_${index}`
|
|
if (collapsed) {
|
|
collapsedIds.push(id)
|
|
}
|
|
return {
|
|
...test,
|
|
id,
|
|
collapsed,
|
|
}
|
|
})
|
|
const dataBlob = { ...data, tests }
|
|
this.data = { ...dataBlob }
|
|
this.renderData = { ...dataBlob }
|
|
setCollapsedIds(collapsedIds)
|
|
}
|
|
|
|
get allData() {
|
|
return { ...this.data }
|
|
}
|
|
|
|
resetRender() {
|
|
this.renderData = { ...this.data }
|
|
}
|
|
|
|
setRender(data) {
|
|
this.renderData.tests = [...data]
|
|
}
|
|
|
|
toggleCollapsedItem(id) {
|
|
this.renderData.tests = this.renderData.tests.map((test) =>
|
|
test.id === id ? { ...test, collapsed: !test.collapsed } : test,
|
|
)
|
|
}
|
|
|
|
set allCollapsed(collapsed) {
|
|
this.renderData = { ...this.renderData, tests: [...this.renderData.tests.map((test) => (
|
|
{ ...test, collapsed }
|
|
))] }
|
|
}
|
|
|
|
get testSubset() {
|
|
return [...this.renderData.tests]
|
|
}
|
|
|
|
get environment() {
|
|
return this.renderData.environment
|
|
}
|
|
|
|
get initialSort() {
|
|
return this.data.initialSort
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
manager: new DataManager(),
|
|
}
|
|
|
|
},{"./storage.js":8}],2:[function(require,module,exports){
|
|
const mediaViewer = require('./mediaviewer.js')
|
|
const templateEnvRow = document.getElementById('template_environment_row')
|
|
const templateResult = document.getElementById('template_results-table__tbody')
|
|
|
|
function htmlToElements(html) {
|
|
const temp = document.createElement('template')
|
|
temp.innerHTML = html
|
|
return temp.content.childNodes
|
|
}
|
|
|
|
const find = (selector, elem) => {
|
|
if (!elem) {
|
|
elem = document
|
|
}
|
|
return elem.querySelector(selector)
|
|
}
|
|
|
|
const findAll = (selector, elem) => {
|
|
if (!elem) {
|
|
elem = document
|
|
}
|
|
return [...elem.querySelectorAll(selector)]
|
|
}
|
|
|
|
const dom = {
|
|
getStaticRow: (key, value) => {
|
|
const envRow = templateEnvRow.content.cloneNode(true)
|
|
const isObj = typeof value === 'object' && value !== null
|
|
const values = isObj ? Object.keys(value).map((k) => `${k}: ${value[k]}`) : null
|
|
|
|
const valuesElement = htmlToElements(
|
|
values ? `<ul>${values.map((val) => `<li>${val}</li>`).join('')}<ul>` : `<div>${value}</div>`)[0]
|
|
const td = findAll('td', envRow)
|
|
td[0].textContent = key
|
|
td[1].appendChild(valuesElement)
|
|
|
|
return envRow
|
|
},
|
|
getResultTBody: ({ testId, id, log, extras, resultsTableRow, tableHtml, result, collapsed }) => {
|
|
const resultBody = templateResult.content.cloneNode(true)
|
|
resultBody.querySelector('tbody').classList.add(result.toLowerCase())
|
|
resultBody.querySelector('tbody').id = testId
|
|
resultBody.querySelector('.collapsible').dataset.id = id
|
|
|
|
resultsTableRow.forEach((html) => {
|
|
const t = document.createElement('template')
|
|
t.innerHTML = html
|
|
resultBody.querySelector('.collapsible').appendChild(t.content)
|
|
})
|
|
|
|
if (log) {
|
|
// Wrap lines starting with "E" with span.error to color those lines red
|
|
const wrappedLog = log.replace(/^E.*$/gm, (match) => `<span class="error">${match}</span>`)
|
|
resultBody.querySelector('.log').innerHTML = wrappedLog
|
|
} else {
|
|
resultBody.querySelector('.log').remove()
|
|
}
|
|
|
|
if (collapsed) {
|
|
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
|
|
resultBody.querySelector('.extras-row').classList.add('hidden')
|
|
} else {
|
|
resultBody.querySelector('.collapsible > td')?.classList.remove('collapsed')
|
|
}
|
|
|
|
const media = []
|
|
extras?.forEach(({ name, format_type, content }) => {
|
|
if (['image', 'video'].includes(format_type)) {
|
|
media.push({ path: content, name, format_type })
|
|
}
|
|
|
|
if (format_type === 'html') {
|
|
resultBody.querySelector('.extraHTML').insertAdjacentHTML('beforeend', `<div>${content}</div>`)
|
|
}
|
|
})
|
|
mediaViewer.setup(resultBody, media)
|
|
|
|
// Add custom html from the pytest_html_results_table_html hook
|
|
tableHtml?.forEach((item) => {
|
|
resultBody.querySelector('td[class="extra"]').insertAdjacentHTML('beforeend', item)
|
|
})
|
|
|
|
return resultBody
|
|
},
|
|
}
|
|
|
|
module.exports = {
|
|
dom,
|
|
htmlToElements,
|
|
find,
|
|
findAll,
|
|
}
|
|
|
|
},{"./mediaviewer.js":6}],3:[function(require,module,exports){
|
|
const { manager } = require('./datamanager.js')
|
|
const { doSort } = require('./sort.js')
|
|
const storageModule = require('./storage.js')
|
|
|
|
const getFilteredSubSet = (filter) =>
|
|
manager.allData.tests.filter(({ result }) => filter.includes(result.toLowerCase()))
|
|
|
|
const doInitFilter = () => {
|
|
const currentFilter = storageModule.getVisible()
|
|
const filteredSubset = getFilteredSubSet(currentFilter)
|
|
manager.setRender(filteredSubset)
|
|
}
|
|
|
|
const doFilter = (type, show) => {
|
|
if (show) {
|
|
storageModule.showCategory(type)
|
|
} else {
|
|
storageModule.hideCategory(type)
|
|
}
|
|
|
|
const currentFilter = storageModule.getVisible()
|
|
const filteredSubset = getFilteredSubSet(currentFilter)
|
|
manager.setRender(filteredSubset)
|
|
|
|
const sortColumn = storageModule.getSort()
|
|
doSort(sortColumn, true)
|
|
}
|
|
|
|
module.exports = {
|
|
doFilter,
|
|
doInitFilter,
|
|
}
|
|
|
|
},{"./datamanager.js":1,"./sort.js":7,"./storage.js":8}],4:[function(require,module,exports){
|
|
const { redraw, bindEvents, renderStatic } = require('./main.js')
|
|
const { doInitFilter } = require('./filter.js')
|
|
const { doInitSort } = require('./sort.js')
|
|
const { manager } = require('./datamanager.js')
|
|
const data = JSON.parse(document.getElementById('data-container').dataset.jsonblob)
|
|
|
|
function init() {
|
|
manager.setManager(data)
|
|
doInitFilter()
|
|
doInitSort()
|
|
renderStatic()
|
|
redraw()
|
|
bindEvents()
|
|
}
|
|
|
|
init()
|
|
|
|
},{"./datamanager.js":1,"./filter.js":3,"./main.js":5,"./sort.js":7}],5:[function(require,module,exports){
|
|
const { dom, find, findAll } = require('./dom.js')
|
|
const { manager } = require('./datamanager.js')
|
|
const { doSort } = require('./sort.js')
|
|
const { doFilter } = require('./filter.js')
|
|
const {
|
|
getVisible,
|
|
getCollapsedIds,
|
|
setCollapsedIds,
|
|
getSort,
|
|
getSortDirection,
|
|
possibleFilters,
|
|
} = require('./storage.js')
|
|
|
|
const removeChildren = (node) => {
|
|
while (node.firstChild) {
|
|
node.removeChild(node.firstChild)
|
|
}
|
|
}
|
|
|
|
const renderStatic = () => {
|
|
const renderEnvironmentTable = () => {
|
|
const environment = manager.environment
|
|
const rows = Object.keys(environment).map((key) => dom.getStaticRow(key, environment[key]))
|
|
const table = document.getElementById('environment')
|
|
removeChildren(table)
|
|
rows.forEach((row) => table.appendChild(row))
|
|
}
|
|
renderEnvironmentTable()
|
|
}
|
|
|
|
const addItemToggleListener = (elem) => {
|
|
elem.addEventListener('click', ({ target }) => {
|
|
const id = target.parentElement.dataset.id
|
|
manager.toggleCollapsedItem(id)
|
|
|
|
const collapsedIds = getCollapsedIds()
|
|
if (collapsedIds.includes(id)) {
|
|
const updated = collapsedIds.filter((item) => item !== id)
|
|
setCollapsedIds(updated)
|
|
} else {
|
|
collapsedIds.push(id)
|
|
setCollapsedIds(collapsedIds)
|
|
}
|
|
redraw()
|
|
})
|
|
}
|
|
|
|
const renderContent = (tests) => {
|
|
const sortAttr = getSort(manager.initialSort)
|
|
const sortAsc = JSON.parse(getSortDirection())
|
|
const rows = tests.map(dom.getResultTBody)
|
|
const table = document.getElementById('results-table')
|
|
const tableHeader = document.getElementById('results-table-head')
|
|
|
|
const newTable = document.createElement('table')
|
|
newTable.id = 'results-table'
|
|
|
|
// remove all sorting classes and set the relevant
|
|
findAll('.sortable', tableHeader).forEach((elem) => elem.classList.remove('asc', 'desc'))
|
|
tableHeader.querySelector(`.sortable[data-column-type="${sortAttr}"]`)?.classList.add(sortAsc ? 'desc' : 'asc')
|
|
newTable.appendChild(tableHeader)
|
|
|
|
if (!rows.length) {
|
|
const emptyTable = document.getElementById('template_results-table__body--empty').content.cloneNode(true)
|
|
newTable.appendChild(emptyTable)
|
|
} else {
|
|
rows.forEach((row) => {
|
|
if (!!row) {
|
|
findAll('.collapsible td:not(.col-links', row).forEach(addItemToggleListener)
|
|
find('.logexpander', row).addEventListener('click',
|
|
(evt) => evt.target.parentNode.classList.toggle('expanded'),
|
|
)
|
|
newTable.appendChild(row)
|
|
}
|
|
})
|
|
}
|
|
|
|
table.replaceWith(newTable)
|
|
}
|
|
|
|
const renderDerived = () => {
|
|
const currentFilter = getVisible()
|
|
possibleFilters.forEach((result) => {
|
|
const input = document.querySelector(`input[data-test-result="${result}"]`)
|
|
input.checked = currentFilter.includes(result)
|
|
})
|
|
}
|
|
|
|
const bindEvents = () => {
|
|
const filterColumn = (evt) => {
|
|
const { target: element } = evt
|
|
const { testResult } = element.dataset
|
|
|
|
doFilter(testResult, element.checked)
|
|
const collapsedIds = getCollapsedIds()
|
|
const updated = manager.renderData.tests.map((test) => {
|
|
return {
|
|
...test,
|
|
collapsed: collapsedIds.includes(test.id),
|
|
}
|
|
})
|
|
manager.setRender(updated)
|
|
redraw()
|
|
}
|
|
|
|
const header = document.getElementById('environment-header')
|
|
header.addEventListener('click', () => {
|
|
const table = document.getElementById('environment')
|
|
table.classList.toggle('hidden')
|
|
header.classList.toggle('collapsed')
|
|
})
|
|
|
|
findAll('input[name="filter_checkbox"]').forEach((elem) => {
|
|
elem.addEventListener('click', filterColumn)
|
|
})
|
|
|
|
findAll('.sortable').forEach((elem) => {
|
|
elem.addEventListener('click', (evt) => {
|
|
const { target: element } = evt
|
|
const { columnType } = element.dataset
|
|
doSort(columnType)
|
|
redraw()
|
|
})
|
|
})
|
|
|
|
document.getElementById('show_all_details').addEventListener('click', () => {
|
|
manager.allCollapsed = false
|
|
setCollapsedIds([])
|
|
redraw()
|
|
})
|
|
document.getElementById('hide_all_details').addEventListener('click', () => {
|
|
manager.allCollapsed = true
|
|
const allIds = manager.renderData.tests.map((test) => test.id)
|
|
setCollapsedIds(allIds)
|
|
redraw()
|
|
})
|
|
}
|
|
|
|
const redraw = () => {
|
|
const { testSubset } = manager
|
|
|
|
renderContent(testSubset)
|
|
renderDerived()
|
|
}
|
|
|
|
module.exports = {
|
|
redraw,
|
|
bindEvents,
|
|
renderStatic,
|
|
}
|
|
|
|
},{"./datamanager.js":1,"./dom.js":2,"./filter.js":3,"./sort.js":7,"./storage.js":8}],6:[function(require,module,exports){
|
|
class MediaViewer {
|
|
constructor(assets) {
|
|
this.assets = assets
|
|
this.index = 0
|
|
}
|
|
|
|
nextActive() {
|
|
this.index = this.index === this.assets.length - 1 ? 0 : this.index + 1
|
|
return [this.activeFile, this.index]
|
|
}
|
|
|
|
prevActive() {
|
|
this.index = this.index === 0 ? this.assets.length - 1 : this.index -1
|
|
return [this.activeFile, this.index]
|
|
}
|
|
|
|
get currentIndex() {
|
|
return this.index
|
|
}
|
|
|
|
get activeFile() {
|
|
return this.assets[this.index]
|
|
}
|
|
}
|
|
|
|
|
|
const setup = (resultBody, assets) => {
|
|
if (!assets.length) {
|
|
resultBody.querySelector('.media').classList.add('hidden')
|
|
return
|
|
}
|
|
|
|
const mediaViewer = new MediaViewer(assets)
|
|
const container = resultBody.querySelector('.media-container')
|
|
const leftArrow = resultBody.querySelector('.media-container__nav--left')
|
|
const rightArrow = resultBody.querySelector('.media-container__nav--right')
|
|
const mediaName = resultBody.querySelector('.media__name')
|
|
const counter = resultBody.querySelector('.media__counter')
|
|
const imageEl = resultBody.querySelector('img')
|
|
const sourceEl = resultBody.querySelector('source')
|
|
const videoEl = resultBody.querySelector('video')
|
|
|
|
const setImg = (media, index) => {
|
|
if (media?.format_type === 'image') {
|
|
imageEl.src = media.path
|
|
|
|
imageEl.classList.remove('hidden')
|
|
videoEl.classList.add('hidden')
|
|
} else if (media?.format_type === 'video') {
|
|
sourceEl.src = media.path
|
|
|
|
videoEl.classList.remove('hidden')
|
|
imageEl.classList.add('hidden')
|
|
}
|
|
|
|
mediaName.innerText = media?.name
|
|
counter.innerText = `${index + 1} / ${assets.length}`
|
|
}
|
|
setImg(mediaViewer.activeFile, mediaViewer.currentIndex)
|
|
|
|
const moveLeft = () => {
|
|
const [media, index] = mediaViewer.prevActive()
|
|
setImg(media, index)
|
|
}
|
|
const doRight = () => {
|
|
const [media, index] = mediaViewer.nextActive()
|
|
setImg(media, index)
|
|
}
|
|
const openImg = () => {
|
|
window.open(mediaViewer.activeFile.path, '_blank')
|
|
}
|
|
if (assets.length === 1) {
|
|
container.classList.add('media-container--fullscreen')
|
|
} else {
|
|
leftArrow.addEventListener('click', moveLeft)
|
|
rightArrow.addEventListener('click', doRight)
|
|
}
|
|
imageEl.addEventListener('click', openImg)
|
|
}
|
|
|
|
module.exports = {
|
|
setup,
|
|
}
|
|
|
|
},{}],7:[function(require,module,exports){
|
|
const { manager } = require('./datamanager.js')
|
|
const storageModule = require('./storage.js')
|
|
|
|
const genericSort = (list, key, ascending, customOrder) => {
|
|
let sorted
|
|
if (customOrder) {
|
|
sorted = list.sort((a, b) => {
|
|
const aValue = a.result.toLowerCase()
|
|
const bValue = b.result.toLowerCase()
|
|
|
|
const aIndex = customOrder.findIndex((item) => item.toLowerCase() === aValue)
|
|
const bIndex = customOrder.findIndex((item) => item.toLowerCase() === bValue)
|
|
|
|
// Compare the indices to determine the sort order
|
|
return aIndex - bIndex
|
|
})
|
|
} else {
|
|
sorted = list.sort((a, b) => a[key] === b[key] ? 0 : a[key] > b[key] ? 1 : -1)
|
|
}
|
|
|
|
if (ascending) {
|
|
sorted.reverse()
|
|
}
|
|
return sorted
|
|
}
|
|
|
|
const durationSort = (list, ascending) => {
|
|
const parseDuration = (duration) => {
|
|
if (duration.includes(':')) {
|
|
// If it's in the format "HH:mm:ss"
|
|
const [hours, minutes, seconds] = duration.split(':').map(Number)
|
|
return (hours * 3600 + minutes * 60 + seconds) * 1000
|
|
} else {
|
|
// If it's in the format "nnn ms"
|
|
return parseInt(duration)
|
|
}
|
|
}
|
|
const sorted = list.sort((a, b) => parseDuration(a['duration']) - parseDuration(b['duration']))
|
|
if (ascending) {
|
|
sorted.reverse()
|
|
}
|
|
return sorted
|
|
}
|
|
|
|
const doInitSort = () => {
|
|
const type = storageModule.getSort(manager.initialSort)
|
|
const ascending = storageModule.getSortDirection()
|
|
const list = manager.testSubset
|
|
const initialOrder = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed', 'Skipped', 'Passed']
|
|
|
|
storageModule.setSort(type)
|
|
storageModule.setSortDirection(ascending)
|
|
|
|
if (type?.toLowerCase() === 'original') {
|
|
manager.setRender(list)
|
|
} else {
|
|
let sortedList
|
|
switch (type) {
|
|
case 'duration':
|
|
sortedList = durationSort(list, ascending)
|
|
break
|
|
case 'result':
|
|
sortedList = genericSort(list, type, ascending, initialOrder)
|
|
break
|
|
default:
|
|
sortedList = genericSort(list, type, ascending)
|
|
break
|
|
}
|
|
manager.setRender(sortedList)
|
|
}
|
|
}
|
|
|
|
const doSort = (type, skipDirection) => {
|
|
const newSortType = storageModule.getSort(manager.initialSort) !== type
|
|
const currentAsc = storageModule.getSortDirection()
|
|
let ascending
|
|
if (skipDirection) {
|
|
ascending = currentAsc
|
|
} else {
|
|
ascending = newSortType ? false : !currentAsc
|
|
}
|
|
storageModule.setSort(type)
|
|
storageModule.setSortDirection(ascending)
|
|
|
|
const list = manager.testSubset
|
|
const sortedList = type === 'duration' ? durationSort(list, ascending) : genericSort(list, type, ascending)
|
|
manager.setRender(sortedList)
|
|
}
|
|
|
|
module.exports = {
|
|
doInitSort,
|
|
doSort,
|
|
}
|
|
|
|
},{"./datamanager.js":1,"./storage.js":8}],8:[function(require,module,exports){
|
|
const possibleFilters = [
|
|
'passed',
|
|
'skipped',
|
|
'failed',
|
|
'error',
|
|
'xfailed',
|
|
'xpassed',
|
|
'rerun',
|
|
]
|
|
|
|
const getVisible = () => {
|
|
const url = new URL(window.location.href)
|
|
const settings = new URLSearchParams(url.search).get('visible')
|
|
const lower = (item) => {
|
|
const lowerItem = item.toLowerCase()
|
|
if (possibleFilters.includes(lowerItem)) {
|
|
return lowerItem
|
|
}
|
|
return null
|
|
}
|
|
return settings === null ?
|
|
possibleFilters :
|
|
[...new Set(settings?.split(',').map(lower).filter((item) => item))]
|
|
}
|
|
|
|
const hideCategory = (categoryToHide) => {
|
|
const url = new URL(window.location.href)
|
|
const visibleParams = new URLSearchParams(url.search).get('visible')
|
|
const currentVisible = visibleParams ? visibleParams.split(',') : [...possibleFilters]
|
|
const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',')
|
|
|
|
url.searchParams.set('visible', settings)
|
|
window.history.pushState({}, null, unescape(url.href))
|
|
}
|
|
|
|
const showCategory = (categoryToShow) => {
|
|
if (typeof window === 'undefined') {
|
|
return
|
|
}
|
|
const url = new URL(window.location.href)
|
|
const currentVisible = new URLSearchParams(url.search).get('visible')?.split(',').filter(Boolean) ||
|
|
[...possibleFilters]
|
|
const settings = [...new Set([categoryToShow, ...currentVisible])]
|
|
const noFilter = possibleFilters.length === settings.length || !settings.length
|
|
|
|
noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(','))
|
|
window.history.pushState({}, null, unescape(url.href))
|
|
}
|
|
|
|
const getSort = (initialSort) => {
|
|
const url = new URL(window.location.href)
|
|
let sort = new URLSearchParams(url.search).get('sort')
|
|
if (!sort) {
|
|
sort = initialSort || 'result'
|
|
}
|
|
return sort
|
|
}
|
|
|
|
const setSort = (type) => {
|
|
const url = new URL(window.location.href)
|
|
url.searchParams.set('sort', type)
|
|
window.history.pushState({}, null, unescape(url.href))
|
|
}
|
|
|
|
const getCollapsedCategory = (renderCollapsed) => {
|
|
let categories
|
|
if (typeof window !== 'undefined') {
|
|
const url = new URL(window.location.href)
|
|
const collapsedItems = new URLSearchParams(url.search).get('collapsed')
|
|
switch (true) {
|
|
case !renderCollapsed && collapsedItems === null:
|
|
categories = ['passed']
|
|
break
|
|
case collapsedItems?.length === 0 || /^["']{2}$/.test(collapsedItems):
|
|
categories = []
|
|
break
|
|
case /^all$/.test(collapsedItems) || collapsedItems === null && /^all$/.test(renderCollapsed):
|
|
categories = [...possibleFilters]
|
|
break
|
|
default:
|
|
categories = collapsedItems?.split(',').map((item) => item.toLowerCase()) || renderCollapsed
|
|
break
|
|
}
|
|
} else {
|
|
categories = []
|
|
}
|
|
return categories
|
|
}
|
|
|
|
const getSortDirection = () => JSON.parse(sessionStorage.getItem('sortAsc')) || false
|
|
const setSortDirection = (ascending) => sessionStorage.setItem('sortAsc', ascending)
|
|
|
|
const getCollapsedIds = () => JSON.parse(sessionStorage.getItem('collapsedIds')) || []
|
|
const setCollapsedIds = (list) => sessionStorage.setItem('collapsedIds', JSON.stringify(list))
|
|
|
|
module.exports = {
|
|
getVisible,
|
|
hideCategory,
|
|
showCategory,
|
|
getCollapsedIds,
|
|
setCollapsedIds,
|
|
getSort,
|
|
setSort,
|
|
getSortDirection,
|
|
setSortDirection,
|
|
getCollapsedCategory,
|
|
possibleFilters,
|
|
}
|
|
|
|
},{}]},{},[4]);
|
|
</script>
|
|
</footer>
|
|
</html> |