pylint update and better tour viz
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m41s
Run linting on the backend code / Build (pull_request) Failing after 30s
Run testing on the backend code / Build (pull_request) Failing after 1m47s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 38s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m41s
Run linting on the backend code / Build (pull_request) Failing after 30s
Run testing on the backend code / Build (pull_request) Failing after 1m47s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 38s
This commit is contained in:
parent
a718b883d7
commit
b56647f12e
@ -11,6 +11,7 @@ httpx = "*"
|
||||
exceptiongroup = "*"
|
||||
pytest-html = "*"
|
||||
typing-extensions = "*"
|
||||
dill = "*"
|
||||
|
||||
[packages]
|
||||
numpy = "*"
|
||||
|
5
backend/Pipfile.lock
generated
5
backend/Pipfile.lock
generated
@ -1,7 +1,7 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "4b48cf17e386da01e0b323e8444797de47837b8ee298aa4646ea7f93d67755d5"
|
||||
"sha256": "0af258788e2a8ae214f9af013cd7a7b19fb3adb941d4ea1de23902daf9062f5a"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {},
|
||||
@ -1687,7 +1687,8 @@
|
||||
"sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a",
|
||||
"sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c"
|
||||
],
|
||||
"markers": "python_version >= '3.11'",
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==0.3.9"
|
||||
},
|
||||
"exceptiongroup": {
|
||||
|
@ -328,7 +328,7 @@ div.media {
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="title">Backend Testing Report</h1>
|
||||
<p>Report generated on 20-Nov-2024 at 16:43:04 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
|
||||
<p>Report generated on 21-Nov-2024 at 14:51:16 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">3 tests took 00:00:09.</p>
|
||||
<p class="run-count">3 tests took 00:00:43.</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()">
|
||||
@ -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-48-generic-x86_64-with-glibc2.39", "Packages": {"pytest": "8.3.3", "pluggy": "1.5.0"}, "Plugins": {"html": "4.1.1", "metadata": "3.1.1", "anyio": "4.6.2.post1"}}, "tests": {"src/tests/test_main.py::test_new_trip_invalid_prefs": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_new_trip_invalid_prefs", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_new_trip_invalid_prefs</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">12 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "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 - Porte de France (257) - 5 - finish (0) - 0</td>", "<td>15 min</td>", "<td>15 min</td>", "<td class=\"col-duration\">18 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "src/tests/test_main.py::test_bellecour": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_bellecour", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_bellecour</td>", "<td>start (0) - 3 - M\u00e9morial Lyonnais du G\u00e9nocide Arm\u00e9nien (265) - 4 - \u00c9glise Saint-Fran\u00e7ois-de-Sales (211) - 7 - Basilique Saint-Martin d'Ainay (333) - 11 - finish (0) - 0</td>", "<td>40 min</td>", "<td>35 min</td>", "<td class=\"col-duration\">00:00:08</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x7bca5bce57c0&gt;\nrequest = &lt;FixtureRequest for &lt;Function test_bellecour&gt;&gt;\n\n def test_bellecour(client, request) :\n duration_minutes = 35\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}, &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5}, &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5}, &quot;max_time_minute&quot;: duration_minutes, &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 osm_ids = landmarks_to_osmid(landmarks)\n \n # Create the trip string\n trip_string = [f&quot;{landmark.name} ({landmark.attractiveness}) - {landmark.time_to_reach_next}&quot; for landmark in landmarks]\n \n # Pass additional info to pytest for reporting\n request.node.trip_details = trip_string\n request.node.trip_duration = str(result[&#x27;total_time&#x27;])\n request.node.target_duration = str(duration_minutes)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n assert duration_minutes*0.8 &lt; int(result[&#x27;total_time&#x27;]) &lt; duration_minutes*1.2\n&gt; assert 136200148 in osm_ids # check for Cath\u00e9drale St. Jean in trip\nE assert 136200148 in [0, 265922306, 82260098, 82254733, 0]\n\nsrc/tests/test_main.py:78: AssertionError\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-49-generic-x86_64-with-glibc2.39", "Packages": {"pytest": "8.3.3", "pluggy": "1.5.0"}, "Plugins": {"html": "4.1.1", "metadata": "3.1.1", "anyio": "4.6.2.post1"}}, "tests": {"src/tests/test_main.py::test_new_trip_invalid_prefs": [{"extras": [], "result": "Passed", "testId": "src/tests/test_main.py::test_new_trip_invalid_prefs", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_new_trip_invalid_prefs</td>", "<td>N/A</td>", "<td>N/A</td>", "<td>N/A</td>", "<td class=\"col-duration\">15 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "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 - Porte de France (257) - 5 - finish (0) - 0</td>", "<td>15 min</td>", "<td>15 min</td>", "<td class=\"col-duration\">29 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "src/tests/test_main.py::test_bellecour": [{"extras": [], "result": "Failed", "testId": "src/tests/test_main.py::test_bellecour", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">src/tests/test_main.py::test_bellecour</td>", "<td>start (0) - 11 - Impasse Turquet (387) - 9 - Site historique de Lyon (681) - 13 - Fontaine des Jacobins (163) - 6 - finish (0) - 0</td>", "<td>54 min</td>", "<td>50 min</td>", "<td class=\"col-duration\">00:00:43</td>", "<td class=\"col-links\"></td>"], "log": "client = &lt;starlette.testclient.TestClient object at 0x79ec42b03980&gt;\nrequest = &lt;FixtureRequest for &lt;Function test_bellecour&gt;&gt;\n\n def test_bellecour(client, request) :\n duration_minutes = 50\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}, &quot;nature&quot;: {&quot;type&quot;: &quot;nature&quot;, &quot;score&quot;: 5}, &quot;shopping&quot;: {&quot;type&quot;: &quot;shopping&quot;, &quot;score&quot;: 5}, &quot;max_time_minute&quot;: duration_minutes, &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 osm_ids = landmarks_to_osmid(landmarks)\n \n # Create the trip string\n trip_string = [f&quot;{landmark.name} ({landmark.attractiveness}) - {landmark.time_to_reach_next}&quot; for landmark in landmarks]\n \n # Pass additional info to pytest for reporting\n request.node.trip_details = trip_string\n request.node.trip_duration = str(result[&#x27;total_time&#x27;])\n request.node.target_duration = str(duration_minutes)\n \n # checks :\n assert response.status_code == 200 # check for successful planning\n assert duration_minutes*0.8 &lt; int(result[&#x27;total_time&#x27;]) &lt; duration_minutes*1.2\n&gt; assert 136200148 in osm_ids # check for Cath\u00e9drale St. Jean in trip\nE assert 136200148 in [0, 120502985, 236823541, 25101472, 0]\n\nsrc/tests/test_main.py:78: AssertionError\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')
|
||||
|
@ -36,7 +36,7 @@ def test_turckheim(client, request):
|
||||
landmarks = load_trip_landmarks(client, result['first_landmark_uuid'])
|
||||
|
||||
# Create the trip string
|
||||
trip_string = [f"{landmark.name} ({landmark.attractiveness}) - {landmark.time_to_reach_next}" for landmark in landmarks]
|
||||
trip_string = [f"{landmark.name} ({landmark.attractiveness} | {landmark.duration}) - {landmark.time_to_reach_next}" for landmark in landmarks]
|
||||
|
||||
# Pass additional info to pytest for reporting
|
||||
request.node.trip_details = trip_string
|
||||
|
Loading…
x
Reference in New Issue
Block a user