diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..594abb81c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.7 + +WORKDIR /workspace + +# Install Python dependencies from requirements.txt if it exists +COPY requirements.txt requirements_tests.txt /workspace/ +RUN pip install -r requirements.txt \ + && pip3 install -r requirements_tests.txt \ + && pip install black tox + +# Set the default shell to bash instead of sh +ENV SHELL /bin/bash diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..a27fe99b0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +// See https://aka.ms/vscode-remote/devcontainer.json for format details. +{ + "name": "Hass.io dev", + "context": "..", + "dockerFile": "Dockerfile", + "extensions": [ + "ms-python.python" + ], + "settings": { + "python.pythonPath": "/usr/local/bin/python", + "python.linting.pylintEnabled": true, + "python.linting.enabled": true, + "python.formatting.provider": "black", + "editor.formatOnPaste": false, + "editor.formatOnSave": true, + "editor.formatOnType": true + } +} \ No newline at end of file