Skip to content

Commit

Permalink
Add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
klejejs committed Jun 15, 2024
1 parent 74661b0 commit bd2bbb6
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
19 changes: 19 additions & 0 deletions devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "HA Thermia Water Heater Integration",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12",
"postCreateCommand": "./scripts/setup.sh",
"remoteUser": "vscode",
"customizations": {
"vscode": {
"settings": {
"python.pythonPath": "/usr/local/bin/python"
},
"extensions": [
"GitHub.copilot",
"github.vscode-pull-request-github",
"ms-python.python",
"ms-python.vscode-pylance"
]
}
}
}
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
homeassistant==2024.4.1
ThermiaOnlineAPI==5.0.0
19 changes: 19 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

# Install dependencies

install_packages() {
python -m pip \
install \
--upgrade \
--disable-pip-version-check \
"${@}"
}

install_packages "pip<23.2,>=21.3.1"
install_packages setuptools wheel
install_packages -r requirements.txt

0 comments on commit bd2bbb6

Please sign in to comment.