-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore/replace deprecated devcontainer image #431
base: master
Are you sure you want to change the base?
Changes from all commits
c3a2526
852c6bc
89f2ae7
377fcfd
dd19537
1a1a7ab
4df5055
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,42 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details. | ||
{ | ||
"image": "ghcr.io/ludeeus/devcontainer/integration:stable", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.12", | ||
"name": "Nordpool integration development", | ||
"context": "..", | ||
"appPort": [ | ||
"9123:8123" | ||
], | ||
"postCreateCommand": "container install", | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters", | ||
"ms-python.vscode-pylance" | ||
// Mount 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. | ||
"mounts": [ | ||
"source=${localWorkspaceFolder}/custom_components,target=${containerWorkspaceFolder}/config/custom_components,type=bind,consistency=cached" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.analysis.autoSearchPaths": false, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
|
||
"postCreateCommand": "scripts/setup", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"github.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters", | ||
"ms-python.vscode-pylance" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.analysis.autoSearchPaths": false, | ||
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.formatting.provider": "black", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
} | ||
}, | ||
"remoteUser": "vscode", | ||
"features": {} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
colorlog==6.8.2 | ||
homeassistant==2024.6.4 | ||
pip>=21.3.1 | ||
numpy |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,6 @@ if [[ ! -d "${PWD}/config" ]]; then | |
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer needed since custom_components is mounted in devcontainer.json. Pythonpath won’t work anymore (unless you remove dependency on nordpool package) due to name collision with integration package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have already removed the nordpool dependency. Please add it back so the scripts still works without dev container. |
||
|
||
echo $PWD | ||
|
||
# Start Home Assistant | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this hass pinned here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the new devcontainer setup, HASS dependency is pinned here in requirements. These dependencies are for development only and are installed by the
setup
script. In the previous devcontainer setup I believe HASS was installed by default in the container image. The previous image also contained a script for selecting HASS version.The pin 2024.6 is from integration_blueprint and somewhat arbitrary I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please drop numpy and unpin homeassistant. We want the latest regular version