Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ exclude =
docker-compose.yaml,
frontend,
*.md,
*/*.md,
*.txt

extend-select =
Expand Down
91 changes: 91 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug SunPower Integration",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/testing/debug_runner.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"env": {
"PYTHONPATH": "${workspaceFolder}:${workspaceFolder}/custom_components"
},
"cwd": "${workspaceFolder}",
"justMyCode": false,
"stopOnEntry": false
},
{
"name": "Test with Sample Data",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/testing/test_with_sample_data.py",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}:${workspaceFolder}/custom_components"
},
"cwd": "${workspaceFolder}",
"justMyCode": false,
"stopOnEntry": false
},
{
"name": "Debug HA Integration",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/testing/test_ha_integration.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"env": {
"PYTHONPATH": "${workspaceFolder}:${workspaceFolder}/custom_components"
},
"cwd": "${workspaceFolder}",
"justMyCode": false,
"stopOnEntry": false
},
{
"name": "Debug SunPower API Client",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/testing/test_api.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"env": {
"PYTHONPATH": "${workspaceFolder}:${workspaceFolder}/custom_components"
},
"cwd": "${workspaceFolder}",
"justMyCode": false,
"stopOnEntry": false
},
{
"name": "Debug Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"env": {
"PYTHONPATH": "${workspaceFolder}:${workspaceFolder}/custom_components"
},
"cwd": "${workspaceFolder}",
"justMyCode": false
},
{
"name": "Run Tests",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"tests/",
"-v",
"--tb=short"
],
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/.env",
"env": {
"PYTHONPATH": "${workspaceFolder}:${workspaceFolder}/custom_components"
},
"cwd": "${workspaceFolder}",
"justMyCode": false
}
]
}
44 changes: 44 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"python.defaultInterpreterPath": "./venv/bin/python",
"python.terminal.activateEnvironment": true,
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length",
"99"
],
"python.sortImports.args": [
"--profile",
"black"
],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"files.exclude": {
"**/__pycache__": true,
"**/*.pyc": true,
".pytest_cache": true,
".coverage": true,
"htmlcov": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python.testing.pytestArgs": [
"tests"
],
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true,
"python.analysis.extraPaths": [
"./custom_components"
]
}
Loading
Loading