Skip to content

Commit

Permalink
Merge pull request #163 from madd0/devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
mitch-dc committed Jun 18, 2023
2 parents 9890ed4 + 3509970 commit 07ac673
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"postCreateCommand": "python .devcontainer/init.py",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
]
}
}
}
15 changes: 15 additions & 0 deletions .devcontainer/init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Initialize container with modules used by volkswage_we_connect_id component
"""

import json
import pip

PIP_ARGUMENTS = [ "install", "--user", "homeassistant" ]
MANIFEST_PATH = "custom_components/volkswagen_we_connect_id/manifest.json"

with open(MANIFEST_PATH, "r", encoding="utf8") as MANIFEST_FILE:
MANIFEST = json.load(MANIFEST_FILE)
REQUIREMENTS: list[str] = MANIFEST["requirements"]

pip.main(PIP_ARGUMENTS + REQUIREMENTS)

0 comments on commit 07ac673

Please sign in to comment.