Add support for debugging and testing python in gitpod

This commit is contained in:
Kasper Seweryn 2022-07-17 02:06:25 +00:00 committed by JuniorJPDJ
commit 75a74b3ab7
14 changed files with 284 additions and 98 deletions

34
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,34 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach python debugger",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"django": true
},
{
"name": "Debug python",
"type": "python",
"request": "launch",
"module": "uvicorn",
"cwd": "${workspaceFolder}/api",
"envFile": "${workspaceFolder}/.gitpod/.env",
"args": [
"--reload", "config.asgi:application",
"--host", "0.0.0.0",
"--port", "5000",
"--reload-dir", "config/",
"--reload-dir", "funkwhale_api/"
],
"django": true
}
]
}

10
.vscode/settings.json vendored
View file

@ -1,3 +1,11 @@
{
"esbonio.sphinx.confDir": ""
"python.defaultInterpreterPath": "/workspace/funkwhale/api/.venv/bin/python",
"python.testing.cwd": "/workspace/funkwhale/api",
"python.envFile": "/workspace/funkwhale/.gitpod/.env",
"python.testing.pytestArgs": [
"--cov=funkwhale_api",
"tests/"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}