latest api use
This commit is contained in:
187
.vscode/launch.json
vendored
187
.vscode/launch.json
vendored
@@ -2,55 +2,174 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Flask App",
|
||||
"name": "Debug FastAPI App",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/src/server/app.py",
|
||||
"program": "${workspaceFolder}/src/server/fastapi_app.py",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"env": {
|
||||
"FLASK_APP": "app.py",
|
||||
"FLASK_ENV": "development",
|
||||
"PYTHONPATH": "${workspaceFolder}/src;${workspaceFolder}"
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"JWT_SECRET_KEY": "your-secret-key-here-debug",
|
||||
"PASSWORD_SALT": "default-salt-debug",
|
||||
"MASTER_PASSWORD": "admin123",
|
||||
"LOG_LEVEL": "DEBUG",
|
||||
"ANIME_DIRECTORY": "${workspaceFolder}/data/anime",
|
||||
"DATABASE_URL": "sqlite:///${workspaceFolder}/data/aniworld.db"
|
||||
},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": [],
|
||||
"jinja": true,
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "${workspaceFolder}/src",
|
||||
"python": "C:/Users/lukas/anaconda3/envs/AniWorld/python.exe"
|
||||
},
|
||||
{
|
||||
"name": "Python: CLI Tool",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/src/main.py",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}"
|
||||
},
|
||||
"args": [],
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}"
|
||||
"stopOnEntry": false,
|
||||
"autoReload": {
|
||||
"enable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Python: Pytest",
|
||||
"name": "Debug FastAPI with Uvicorn",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "uvicorn",
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"args": [
|
||||
"src.server.fastapi_app:app",
|
||||
"--host",
|
||||
"127.0.0.1",
|
||||
"--port",
|
||||
"8000",
|
||||
"--reload",
|
||||
"--log-level",
|
||||
"debug"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"JWT_SECRET_KEY": "your-secret-key-here-debug",
|
||||
"PASSWORD_SALT": "default-salt-debug",
|
||||
"MASTER_PASSWORD": "admin123",
|
||||
"LOG_LEVEL": "DEBUG",
|
||||
"ANIME_DIRECTORY": "${workspaceFolder}/data/anime",
|
||||
"DATABASE_URL": "sqlite:///${workspaceFolder}/data/aniworld.db"
|
||||
},
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Debug CLI App",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/src/cli/Main.py",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"LOG_LEVEL": "DEBUG",
|
||||
"ANIME_DIRECTORY": "${workspaceFolder}/data/anime"
|
||||
},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": [
|
||||
// Add arguments as needed for CLI testing
|
||||
// Example: "${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopOnEntry": false
|
||||
},
|
||||
{
|
||||
"name": "Debug Tests",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "pytest",
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"args": [
|
||||
"tests/",
|
||||
"-v"
|
||||
"${workspaceFolder}/tests",
|
||||
"-v",
|
||||
"--tb=short",
|
||||
"--no-header",
|
||||
"--disable-warnings"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}"
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"JWT_SECRET_KEY": "test-secret-key",
|
||||
"PASSWORD_SALT": "test-salt",
|
||||
"MASTER_PASSWORD": "admin123",
|
||||
"LOG_LEVEL": "DEBUG",
|
||||
"ANIME_DIRECTORY": "${workspaceFolder}/test_data/anime",
|
||||
"DATABASE_URL": "sqlite:///${workspaceFolder}/test_data/test_aniworld.db"
|
||||
},
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Debug Unit Tests Only",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "pytest",
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"args": [
|
||||
"${workspaceFolder}/tests/unit",
|
||||
"-v",
|
||||
"--tb=short"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"JWT_SECRET_KEY": "test-secret-key",
|
||||
"PASSWORD_SALT": "test-salt",
|
||||
"LOG_LEVEL": "DEBUG"
|
||||
},
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Debug Integration Tests Only",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "pytest",
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"args": [
|
||||
"${workspaceFolder}/tests/integration",
|
||||
"-v",
|
||||
"--tb=short"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"JWT_SECRET_KEY": "test-secret-key",
|
||||
"PASSWORD_SALT": "test-salt",
|
||||
"MASTER_PASSWORD": "admin123",
|
||||
"LOG_LEVEL": "DEBUG",
|
||||
"ANIME_DIRECTORY": "${workspaceFolder}/test_data/anime",
|
||||
"DATABASE_URL": "sqlite:///${workspaceFolder}/test_data/test_aniworld.db"
|
||||
},
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Debug FastAPI Production Mode",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"module": "uvicorn",
|
||||
"python": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"args": [
|
||||
"src.server.fastapi_app:app",
|
||||
"--host",
|
||||
"0.0.0.0",
|
||||
"--port",
|
||||
"8000",
|
||||
"--workers",
|
||||
"1"
|
||||
],
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}/src:${workspaceFolder}",
|
||||
"JWT_SECRET_KEY": "production-secret-key-change-me",
|
||||
"PASSWORD_SALT": "production-salt-change-me",
|
||||
"MASTER_PASSWORD": "admin123",
|
||||
"LOG_LEVEL": "INFO",
|
||||
"ANIME_DIRECTORY": "${workspaceFolder}/data/anime",
|
||||
"DATABASE_URL": "sqlite:///${workspaceFolder}/data/aniworld.db"
|
||||
},
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"python.defaultInterpreterPath": "./aniworld/Scripts/python.exe",
|
||||
"python.defaultInterpreterPath": "C:\\Users\\lukas\\anaconda3\\envs\\AniWorld\\python.exe",
|
||||
"python.terminal.activateEnvironment": true,
|
||||
"python.condaPath": "C:\\Users\\lukas\\anaconda3\\Scripts\\conda.exe",
|
||||
"python.terminal.activateEnvInCurrentTerminal": true,
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.flake8Enabled": true,
|
||||
"python.linting.pylintEnabled": true,
|
||||
|
||||
166
.vscode/tasks.json
vendored
Normal file
166
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Run FastAPI Server",
|
||||
"type": "shell",
|
||||
"command": "conda",
|
||||
"args": [
|
||||
"run",
|
||||
"-n",
|
||||
"AniWorld",
|
||||
"python",
|
||||
"-m",
|
||||
"uvicorn",
|
||||
"src.server.fastapi_app:app",
|
||||
"--host",
|
||||
"127.0.0.1",
|
||||
"--port",
|
||||
"8000",
|
||||
"--reload"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"isBackground": true
|
||||
},
|
||||
{
|
||||
"label": "Run CLI Application",
|
||||
"type": "shell",
|
||||
"command": "conda",
|
||||
"args": [
|
||||
"run",
|
||||
"-n",
|
||||
"AniWorld",
|
||||
"python",
|
||||
"src/cli/Main.py"
|
||||
],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run All Tests",
|
||||
"type": "shell",
|
||||
"command": "conda",
|
||||
"args": [
|
||||
"run",
|
||||
"-n",
|
||||
"AniWorld",
|
||||
"python",
|
||||
"-m",
|
||||
"pytest",
|
||||
"tests/",
|
||||
"-v",
|
||||
"--tb=short"
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run Unit Tests",
|
||||
"type": "shell",
|
||||
"command": "conda",
|
||||
"args": [
|
||||
"run",
|
||||
"-n",
|
||||
"AniWorld",
|
||||
"python",
|
||||
"-m",
|
||||
"pytest",
|
||||
"tests/unit/",
|
||||
"-v"
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run Integration Tests",
|
||||
"type": "shell",
|
||||
"command": "conda",
|
||||
"args": [
|
||||
"run",
|
||||
"-n",
|
||||
"AniWorld",
|
||||
"python",
|
||||
"-m",
|
||||
"pytest",
|
||||
"tests/integration/",
|
||||
"-v"
|
||||
],
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Install Dependencies",
|
||||
"type": "shell",
|
||||
"command": "conda",
|
||||
"args": [
|
||||
"run",
|
||||
"-n",
|
||||
"AniWorld",
|
||||
"pip",
|
||||
"install",
|
||||
"-r",
|
||||
"requirements.txt"
|
||||
],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "new"
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user