diff --git a/.gitignore b/.gitignore index d6dc777..475a549 100644 --- a/.gitignore +++ b/.gitignore @@ -173,4 +173,5 @@ cython_debug/ # PyPI configuration file .pypirc -venv \ No newline at end of file +venv +.ruff_cache \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..9bbadfa --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ + + +{ + "recommendations": [ + "charliermarsh.ruff", + "ms-python.python", + "ckolkman.vscode-postgres", + "ms-vscode.makefile-tools", + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..e9a0ffa --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug: Backend", + "type": "debugpy", + "request": "launch", + "module": "uvicorn", + "cwd": "${workspaceFolder}/backend", + "args": [ + "app.main:app", + "--reload", + "--reload-include", + "backend/src", + "--port", + "8080" + ], + "jinja": true, + "justMyCode": false, + "consoleName": "Backend", + "preLaunchTask": "Start DB", + "python": "${workspaceFolder}/venv/bin/python", + }, + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 8ec1907..e9c0073 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,11 @@ { - "python.defaultInterpreterPath": ".venv/bin/python", + "python.defaultInterpreterPath": "venv/bin/python", "editor.formatOnSave": true, "[python]": { - "editor.defaultFormatter": "ms-python.python", - "editor.formatOnSave": true, + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.codeActionsOnSave": { + "source.fixAll": "explicit", + "source.organizeImports": "explicit" + } }, } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..29df3df --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Start All", + "type": "shell", + "command": "docker compose up -d", + "problemMatcher": [] + }, + { + "label": "Start DB", + "type": "shell", + "command": "docker compose up -d db", + "problemMatcher": [] + }, + ] +} \ No newline at end of file diff --git a/Makefile b/Makefile index 23bf884..6db9358 100644 --- a/Makefile +++ b/Makefile @@ -19,3 +19,6 @@ start: clean: rm -rf $(VENV_DIR) +clean-db: + docker compose down -v db + diff --git a/backend/requirements.txt b/backend/requirements.txt index fc946e7..b137471 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -7,3 +7,4 @@ pydantic-settings python-dotenv pg8000 asyncpg +greenlet