forked from ollo69/ha-smartthinq-sensors
-
Notifications
You must be signed in to change notification settings - Fork 0
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 install required library
- Loading branch information
Showing
2 changed files
with
94 additions
and
39 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,43 +1,54 @@ | ||
{ | ||
"name": "SmartThinQ Sensors Component", | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.12", | ||
"postCreateCommand": "scripts/setup", | ||
"forwardPorts": [ | ||
8123 | ||
], | ||
"portsAttributes": { | ||
"8123": { | ||
"label": "Home Assistant", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.black-formatter", | ||
"ms-python.pylint", | ||
"ms-python.vscode-pylance", | ||
"visualstudioexptteam.vscodeintellicode", | ||
"redhat.vscode-yaml", | ||
"esbenp.prettier-vscode", | ||
"GitHub.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.testing.pytestArgs": ["--no-cov"], | ||
"python.analysis.autoSearchPaths": false, | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true | ||
} | ||
"name": "SmartThinQ Sensors Component", | ||
"dockerFile": "../Dockerfile.dev", | ||
"postCreateCommand": "scripts/setup", | ||
"forwardPorts": [ | ||
8123 | ||
], | ||
"portsAttributes": { | ||
"8123": { | ||
"label": "Home Assistant", | ||
"onAutoForward": "notify" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.black-formatter", | ||
"ms-python.pylint", | ||
"ms-python.vscode-pylance", | ||
"visualstudioexptteam.vscodeintellicode", | ||
"redhat.vscode-yaml", | ||
"esbenp.prettier-vscode", | ||
"GitHub.vscode-pull-request-github", | ||
"ryanluker.vscode-coverage-gutters" | ||
], | ||
"settings": { | ||
"files.eol": "\n", | ||
"editor.tabSize": 4, | ||
"python.pythonPath": "/usr/bin/python3", | ||
"python.testing.pytestArgs": [ | ||
"--no-cov" | ||
], | ||
"python.analysis.autoSearchPaths": false, | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnType": true, | ||
"files.trimTrailingWhitespace": true, | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "/usr/bin/zsh" | ||
} | ||
}, | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
} | ||
}, | ||
"remoteUser": "vscode", | ||
"features": { | ||
"rust": "latest" | ||
} | ||
} | ||
}, | ||
"remoteUser": "vscode", | ||
"features": { | ||
"rust": "latest" | ||
} | ||
} |
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,44 @@ | ||
FROM mcr.microsoft.com/devcontainers/python:1-3.12 | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# Uninstall pre-installed formatting and linting tools | ||
# They would conflict with our pinned versions | ||
RUN \ | ||
pipx uninstall pydocstyle \ | ||
&& pipx uninstall pycodestyle \ | ||
&& pipx uninstall mypy \ | ||
&& pipx uninstall pylint | ||
|
||
RUN \ | ||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
# Additional library needed by some tests and accordingly by VScode Tests Discovery | ||
bluez \ | ||
ffmpeg \ | ||
libudev-dev \ | ||
libavformat-dev \ | ||
libavcodec-dev \ | ||
libavdevice-dev \ | ||
libavutil-dev \ | ||
libgammu-dev \ | ||
libswscale-dev \ | ||
libswresample-dev \ | ||
libavfilter-dev \ | ||
libpcap-dev \ | ||
libturbojpeg0 \ | ||
libyaml-dev \ | ||
libxml2 \ | ||
git \ | ||
cmake \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install uv | ||
RUN pip3 install uv | ||
|
||
WORKDIR /workspaces | ||
|
||
# Set the default shell to bash instead of sh | ||
ENV SHELL /bin/bash |