-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update devcontainer to Python 3.11 and bump to Home Assistant 2023.8.2 (
#251)
- Loading branch information
Showing
12 changed files
with
88 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"image": "ghcr.io/ludeeus/devcontainer/integration:latest", | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", | ||
"name": "ha-nest-protect", | ||
"context": "..", | ||
"appPort": [ | ||
"8123:8123" | ||
], | ||
"postCreateCommand": "container install && pip install -r requirements_dev.txt && pre-commit install && pre-commit install-hooks", | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"github.copilot", | ||
"ms-python.vscode-pylance" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "/bin/bash" | ||
} | ||
}, | ||
"python.analysis.autoSearchPaths": false, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.linting.pylintArgs": [ | ||
"--disable", | ||
"import-error" | ||
], | ||
"python.formatting.provider": "black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true, | ||
"python.linting.mypyEnabled": true, | ||
"forwardPorts": [8123], | ||
"portsAttributes": { | ||
"8123": { | ||
"label": "Home Assistant", | ||
"onAutoForward": "openBrowserOnce" | ||
} | ||
}, | ||
"postCreateCommand": "pip install -r requirements_dev.txt && pre-commit install && pre-commit install-hooks", | ||
"containerEnv": { | ||
"DEVCONTAINER": "1" | ||
}, | ||
"remoteUser": "vscode", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.vscode-pylance", | ||
"ms-python.python", | ||
"redhat.vscode-yaml", | ||
"esbenp.prettier-vscode", | ||
"GitHub.vscode-pull-request-github", | ||
"GitHub.copilot" | ||
], | ||
"settings": { | ||
"python.pythonPath": "/usr/local/bin/python", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,3 +200,7 @@ cython_debug/ | |
.history | ||
.ionide | ||
|
||
# Devcontainer | ||
config | ||
!.vscode/tasks.json | ||
!.vscode/launch.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,15 @@ | ||
{ | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
// Example of attaching to local debug server | ||
"name": "Python: Attach Local", | ||
"type": "python", | ||
"request": "attach", | ||
"port": 5678, | ||
"host": "localhost", | ||
"pathMappings": [ | ||
{ | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "." | ||
} | ||
] | ||
}, | ||
{ | ||
// Example of attaching to my production server | ||
"name": "Python: Attach Remote", | ||
"type": "python", | ||
"request": "attach", | ||
"port": 5678, | ||
"host": "homeassistant.local", | ||
"pathMappings": [ | ||
{ | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "/usr/src/homeassistant" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Home Assistant with Nest Protect", | ||
"type": "python", | ||
"request": "launch", | ||
"python": "/usr/local/bin/python", | ||
"module": "homeassistant", | ||
"cwd": "${workspaceFolder}", | ||
"justMyCode": false, | ||
"args": ["--debug", "-c", "config"] | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
default_config: | ||
|
||
logger: | ||
default: info | ||
logs: | ||
custom_components.nest_protect: debug | ||
|
||
# If you need to debug uncomment the line below (doc: https://www.home-assistant.io/integrations/debugpy/) | ||
|
||
# debugpy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
homeassistant==2023.1.7 | ||
homeassistant==2023.8.2 | ||
pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
-r requirements_dev.txt | ||
|
||
pytest==7.2.0 | ||
pytest-socket==0.5.1 | ||
pytest-homeassistant-custom-component==0.12.49 # 2023.1.7 | ||
pytest==7.3.1 | ||
pytest-socket==0.6.0 | ||
pytest-homeassistant-custom-component==0.13.51 # 2023.8.2 | ||
pytest-timeout==2.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
# Create config dir if not present | ||
if [[ ! -d "${PWD}/config" ]]; then | ||
mkdir -p "${PWD}/config" | ||
hass --config "${PWD}/config" --script ensure_config | ||
fi | ||
|
||
# Set the path to custom_components | ||
## This let's us have the structure we want <root>/custom_components/integration_blueprint | ||
## while at the same time have Home Assistant configuration inside <root>/config | ||
## without resulting to symlinks. | ||
export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components" | ||
|
||
# Start Home Assistant | ||
hass --config "${PWD}/config" --debug |