Skip to content

chore: add support for dev containers #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025

Conversation

AsCress
Copy link
Contributor

@AsCress AsCress commented Mar 29, 2025

⚠️ #195 SHOULD BE MERGED BEFORE THIS!

Adds support for Dev Containers in our repository.

What is a Dev Container ?

A development container (or dev container for short) allows you to use a container as a full-featured development environment. It can be used to run an application, to separate tools, libraries, or runtimes needed for working with a codebase, and to aid in continuous integration and testing.
Think of working in a development container as running a project inside a Docker container.
With a Dev Container, the idea is that you don't have to spend time on setting up the dev env on your own PC. All the dependencies and tools are already set up inside the container.

Demonstration

A video demonstration on how to build the firmware inside the Dev Container:

dev_container.mp4

Summary by Sourcery

Add support for development containers to simplify project setup and development environment configuration

New Features:

  • Implement Dev Container configuration to provide a standardized development environment

Documentation:

  • Update README.md with detailed instructions for using Dev Containers in the project

Chores:

  • Add .devcontainer configuration files to support containerized development workflow

@AsCress AsCress added the chore label Mar 29, 2025
@AsCress AsCress requested a review from bessman March 29, 2025 15:00
@AsCress AsCress self-assigned this Mar 29, 2025
Copy link
Contributor

sourcery-ai bot commented Mar 29, 2025

Reviewer's Guide by Sourcery

This pull request introduces Dev Container support for the repository. It adds the necessary configuration files (docker-compose.yml and devcontainer.json) and updates the README with instructions on how to use the Dev Container. The Dev Container provides a pre-configured development environment with all the necessary dependencies to build, run, and test the project.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added Dev Container configuration files.
  • Added a docker-compose.yml file to define the container's services, volumes, and build context.
  • Added a devcontainer.json file to configure VS Code's Dev Container extension.
.devcontainer/docker-compose.yml
.devcontainer/devcontainer.json
Updated the README to include instructions on how to use the Dev Container.
  • Added a new section on Dev Container usage.
  • Provided instructions on how to open the repository in a Dev Container using VS Code.
  • Included a link to a demonstration video.
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @AsCress - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a .dockerignore file to reduce the size of the image built by the dev container.
  • The command: sleep infinity in docker-compose.yml is a common trick, but consider using a more descriptive command or a health check.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@bessman bessman merged commit 37b91ab into fossasia:main Apr 6, 2025
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants