Adds devcontainer definition for easier cloud development#263
Adds devcontainer definition for easier cloud development#263hanseartic wants to merge 4 commits intopytoyoda:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a robust development container setup, streamlining the onboarding process for new contributors and ensuring a consistent development environment across different machines. By leveraging VS Code Dev Containers, it simplifies dependency management and tool configuration, allowing developers to quickly get started with the project. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a devcontainer for easier cloud development, which is a valuable addition. My review includes suggestions to improve the configuration for better consistency and efficiency. Specifically, I've recommended aligning the Poetry version with the project's lock file, removing the unnecessary Node.js installation, configuring the devcontainer to use ruff in line with project standards, and updating comments to prevent confusion.
| @@ -0,0 +1,19 @@ | |||
| # [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster | |||
There was a problem hiding this comment.
The comment listing available Python versions is missing 3.13, which is the version currently being used. Updating this comment will improve clarity for other developers.
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3.13, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
| "vscode": { | ||
| // Set *default* container specific settings.json values on container create. | ||
| "settings": { | ||
| "python.defaultInterpreterPath": "/usr/local/bin/python", | ||
| "python.linting.enabled": true, | ||
| "python.linting.pylintEnabled": true, | ||
| "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", | ||
| "python.formatting.blackPath": "/usr/local/py-utils/bin/black", | ||
| "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", | ||
| "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", | ||
| "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", | ||
| "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", | ||
| "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", | ||
| "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", | ||
| "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint" | ||
| }, | ||
|
|
||
| // Add the IDs of extensions you want installed when the container is created. | ||
| "extensions": ["ms-python.python", "ms-python.vscode-pylance"] | ||
| } | ||
| }, | ||
|
|
||
| // Use 'forwardPorts' to make a list of ports inside the container available locally. |
There was a problem hiding this comment.
The project's pyproject.toml specifies ruff for linting and formatting. To ensure a consistent development environment, the devcontainer should be configured to use ruff as well. This involves adding the ruff VS Code extension, setting it as the default formatter, and disabling pylint.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff"
]
}| "postCreateCommand": "pip install poetry==2.3.0 && poetry install", | ||
|
|
||
| // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
| "remoteUser": "vscode" |
There was a problem hiding this comment.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
for more information, see https://pre-commit.ci
No description provided.