Skip to content

Conversation

@Nikhil172913832
Copy link
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes Setup Dev Containers #407) and the maintainers have approved on my working plan.

Summary

Adds Development Container configuration to provide a consistent development environment for contributors. Includes:

  • .devcontainer/Containerfile with multi-architecture support (x86_64/amd64 and arm64)
  • .devcontainer/devcontainer.json with VS Code extensions (Python, Pylance, Ruff) and settings
  • .devcontainer/.dockerignore to optimize build performance
  • Essential build tools: git, curl, wget, build-essential, libffi-dev, hatch
  • Automatic setup: git submodule initialization and hatch environment creation

Breaking Changes

None.

Motivation

Development containers lower the barrier to contributions by providing a pre-configured environment with all necessary dependencies. This addresses issue #407 by:

  • Eliminating manual setup for Python tooling and virtual environments
  • Supporting both x86_64 and arm64 architectures
  • Working seamlessly with GitHub Codespaces and VS Code Dev Containers
  • Ensuring consistent development experience across all platforms

Test Plan

  • Built container successfully for both amd64 and arm64 using docker buildx build --platform linux/amd64,linux/arm64
  • Verified all dependencies install correctly (git, hatch, cffi, libffi-dev)
  • Ran existing test suite to confirm no regressions:
    • tests/test_error.py: 6/6 tests passed
    • tests/test_util.py: 29/29 tests passed
    • tests/test_pact.py: 21/21 tests passed (1 skipped)
  • Tested container functionality: Python 3.13, hatch commands, workspace mounting

Related issues/PRs

Closes #407

Copilot AI review requested due to automatic review settings November 20, 2025 08:27
Copilot finished reviewing on behalf of Nikhil172913832 November 20, 2025 08:30
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51%. Comparing base (8e53032) to head (722aeb5).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1354   +/-   ##
====================================
  Coverage    51%     51%           
====================================
  Files        31      31           
  Lines      3727    3727           
====================================
  Hits       1936    1936           
  Misses     1791    1791           
Flag Coverage Δ
tests 51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Development Container configuration to provide a consistent development environment across all platforms. The implementation includes a multi-architecture Containerfile, VS Code-specific configuration with Python tooling (Ruff, Pylance, pytest), and build optimization through .dockerignore.

Key changes:

  • Multi-arch development container based on Python 3.13-slim with essential build tools
  • VS Code integration with Python extensions and formatting/linting settings
  • Automated environment setup via postCreateCommand for git submodules and hatch

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.devcontainer/Containerfile Defines the container image with Python 3.13, build tools, and hatch installation via pipx
.devcontainer/devcontainer.json Configures VS Code extensions, Python settings, workspace mount, and post-creation commands
.devcontainer/.dockerignore Excludes development artifacts and cache directories from the container build context

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Setup Dev Containers

1 participant