Skip to content

Commit

Permalink
build: add devcontainer for development environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgoette committed Oct 24, 2024
1 parent 34d2d24 commit 1b2b7a8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:3",
"postCreateCommand": "pip3 install -r requirements-test.txt",
"customizations": { // Customization for VSCode-specific settings and extensions.
"vscode": {
"extensions": [
"charliermarsh.ruff", // Linter/formatter for Python.
"ms-python.pylint", // Pylint for Python linting.
"ms-python.vscode-pylance", // Pylance for Python language support and intellisense.
"visualstudioexptteam.vscodeintellicode", // IntelliCode for AI-assisted code suggestions.
"redhat.vscode-yaml", // YAML file support.
"esbenp.prettier-vscode", // Prettier for code formatting.
"GitHub.vscode-pull-request-github", // GitHub Pull Request extension.
"njpwerner.autodocstring", // Extension for automatically generating Python docstrings.
"usernamehw.errorlens" // Highlights errors and warnings inline within the editor.
],
"settings": {
"pylint.importStrategy": "fromEnvironment", // Uses the Pylint available in the environment.
"editor.formatOnPaste": false, // Disable auto-formatting on paste.
"editor.formatOnSave": true, // Enable auto-formatting on save.
"editor.formatOnType": true, // Enable auto-formatting while typing.
"files.trimTrailingWhitespace": true, // Automatically remove trailing whitespace when saving files.
"yaml.customTags": [ // YAML-specific tags, useful for Home Assistant configuration files.
"!input scalar", // YAML tag used to define input variables in Home Assistant configurations, allowing user input for component configuration.
"!secret scalar", // YAML tag used to reference sensitive data stored in secrets.yaml, ensuring that sensitive information is not exposed in the main configuration files.
"!include_dir_named scalar", // Custom tag that allows including all YAML files in a specified directory as named imports, useful for organizing configuration files by component or domain.
"!include_dir_list scalar", // Custom tag for including a list of YAML files from a specified directory, typically used for grouping configurations of similar components.
"!include_dir_merge_list scalar", // Custom tag for merging lists from multiple YAML files in a directory, useful for combining configurations without duplicating code.
"!include_dir_merge_named scalar" // Custom tag for merging named imports from multiple YAML files, allowing more structured and organized configurations.
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff" // Specifies the default formatter for Python code as 'ruff'.
}
}
}
},
"remoteUser": "root"
}

0 comments on commit 1b2b7a8

Please sign in to comment.