|
1 | | -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
2 | | -// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/python-3 |
3 | 1 | { |
4 | 2 | "name": "ha-elro-connects", |
5 | | - "build": { |
6 | | - "dockerfile": "Dockerfile", |
7 | | - "context": "..", |
8 | | - "args": { |
9 | | - // Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9 |
10 | | - "VARIANT": "3.11", |
11 | | - // Options |
12 | | - "INSTALL_NODE": "false", |
13 | | - "NODE_VERSION": "lts/*" |
14 | | - } |
| 3 | + "context": "..", |
| 4 | + "postCreateCommand": "script/setup", |
| 5 | + "dockerFile": "./Dockerfile", |
| 6 | + "containerEnv": { |
| 7 | + "PYTHONASYNCIODEBUG": "1" |
15 | 8 | }, |
16 | | - |
17 | | - // Set *default* container specific settings.json values on container create. |
18 | | - "settings": { |
19 | | - "terminal.integrated.profiles.linux": { |
20 | | - "zsh (login)": { |
21 | | - "path": "zsh", |
22 | | - "args": ["-l"] |
23 | | - } |
24 | | - }, |
25 | | - "python.pythonPath": "/usr/local/bin/python", |
26 | | - "python.languageServer": "Pylance", |
27 | | - "python.linting.enabled": true, |
28 | | - "python.linting.pylintEnabled": true, |
29 | | - "python.formatting.provider": "black", |
30 | | - "python.testing.pytestArgs": [], |
31 | | - "editor.formatOnPaste": false, |
32 | | - "editor.formatOnSave": true, |
33 | | - "editor.formatOnType": true, |
34 | | - "files.trimTrailingWhitespace": true, |
35 | | - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
36 | | - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
37 | | - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
38 | | - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
39 | | - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
40 | | - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
41 | | - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
42 | | - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
43 | | - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint" |
| 9 | + "features": { |
| 10 | + "ghcr.io/devcontainers/features/github-cli:1": {} |
44 | 11 | }, |
45 | | - |
46 | | - // Add the IDs of extensions you want installed when the container is created. |
47 | | - "extensions": [ |
48 | | - "ms-python.python", |
49 | | - "ms-python.vscode-pylance", |
50 | | - "visualstudioexptteam.vscodeintellicode", |
51 | | - "redhat.vscode-yaml", |
52 | | - "esbenp.prettier-vscode", |
53 | | - "GitHub.vscode-pull-request-github" |
54 | | - ], |
55 | | - |
56 | | - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
57 | | - "forwardPorts": [], |
58 | | - |
59 | | - // Use 'postCreateCommand' to run commands after the container is created. |
60 | | - "postCreateCommand": "pip3 install --user -r requirements_dev.txt && pre-commit install", |
61 | | - |
62 | | - // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
63 | | - "remoteUser": "vscode", |
64 | | - |
65 | | - // Advertize container environment |
66 | | - "containerEnv": { "DEVCONTAINER": "1" }, |
67 | | - |
68 | | - // Setup appdaemon environment |
69 | | - "runArgs": [ |
70 | | - "--env-file", |
71 | | - "${localWorkspaceFolder}/.devcontainer/devcontainer.env" |
72 | | - ] |
| 12 | + "appPort": [], |
| 13 | + "runArgs": ["-e", "GIT_EDITOR=code --wait"], |
| 14 | + "customizations": { |
| 15 | + "vscode": { |
| 16 | + "extensions": [ |
| 17 | + "charliermarsh.ruff", |
| 18 | + "ms-python.python", |
| 19 | + "ms-python.pylint", |
| 20 | + "ms-python.vscode-pylance", |
| 21 | + "visualstudioexptteam.vscodeintellicode", |
| 22 | + "redhat.vscode-yaml", |
| 23 | + "esbenp.prettier-vscode", |
| 24 | + "GitHub.vscode-pull-request-github" |
| 25 | + ], |
| 26 | + // Please keep this file in sync with settings in .vscode/settings.default.json |
| 27 | + "settings": { |
| 28 | + "python.experiments.optOutFrom": ["pythonTestAdapter"], |
| 29 | + "python.defaultInterpreterPath": "/home/vscode/.local/ic-venv/bin/python", |
| 30 | + "python.pythonPath": "/home/vscode/.local/ic-venv/bin/python", |
| 31 | + "python.terminal.activateEnvInCurrentTerminal": true, |
| 32 | + "python.testing.pytestArgs": ["--no-cov"], |
| 33 | + "editor.formatOnPaste": false, |
| 34 | + "editor.formatOnSave": true, |
| 35 | + "editor.formatOnType": true, |
| 36 | + "files.trimTrailingWhitespace": true, |
| 37 | + "terminal.integrated.profiles.linux": { |
| 38 | + "zsh": { |
| 39 | + "path": "/usr/bin/zsh" |
| 40 | + } |
| 41 | + }, |
| 42 | + "terminal.integrated.defaultProfile.linux": "zsh", |
| 43 | + "yaml.customTags": [ |
| 44 | + "!input scalar", |
| 45 | + "!secret scalar", |
| 46 | + "!include_dir_named scalar", |
| 47 | + "!include_dir_list scalar", |
| 48 | + "!include_dir_merge_list scalar", |
| 49 | + "!include_dir_merge_named scalar" |
| 50 | + ], |
| 51 | + "[python]": { |
| 52 | + "editor.defaultFormatter": null, |
| 53 | + "editor.formatOnSave": true, |
| 54 | + "python.formatting.provider": "black", |
| 55 | + "python.formatting.blackArgs": ["-l 120"], |
| 56 | + "editor.formatOnType": true, |
| 57 | + "python.formatting.blackPath": "/usr/local/py-utils/bin/black" |
| 58 | + } |
| 59 | + } |
| 60 | + } |
| 61 | + } |
73 | 62 | } |
0 commit comments