Skip to content

Adds devcontainer definition for easier cloud development#263

Open
hanseartic wants to merge 4 commits intopytoyoda:mainfrom
hanseartic:ft/add_devcontainer
Open

Adds devcontainer definition for easier cloud development#263
hanseartic wants to merge 4 commits intopytoyoda:mainfrom
hanseartic:ft/add_devcontainer

Conversation

@hanseartic
Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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

  • Devcontainer Setup: Introduced a new .devcontainer directory containing a Dockerfile and devcontainer.json to enable a standardized development environment.
  • Python Environment Configuration: Configured the devcontainer to use Python 3.13 and included various Python linting and formatting tools like Pylint, Black, and Flake8 within the VS Code settings.
  • VS Code Integration: Specified VS Code extensions (Python, Pylance) and default settings within the devcontainer for a consistent developer experience.
  • Dependency Management: Included a postCreateCommand to install poetry and project dependencies upon container creation, streamlining project setup.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .devcontainer/Dockerfile
@@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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

Comment thread .devcontainer/devcontainer.json Outdated
Comment thread .devcontainer/devcontainer.json Outdated
Comment on lines +19 to +41
"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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The poetry.lock file indicates it was generated with Poetry version 2.3.2. To ensure a reproducible environment and avoid potential dependency conflicts, the postCreateCommand should install the same version of Poetry.

	"postCreateCommand": "pip install poetry==2.3.2 && poetry install",

hanseartic and others added 2 commits March 23, 2026 22:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant