Skip to content

Conversation

@cemizm
Copy link

@cemizm cemizm commented Nov 20, 2025

Proposed change

Add a VS Code devcontainer configuration for zha-device-handlers to make local development and testing easier and more reproducible:

  • Add a .devcontainer/Dockerfile based on mcr.microsoft.com/devcontainers/python:1-3.12 with common build dependencies for Python packages.
  • Add .devcontainer/devcontainer.json to configure the workspace, recommended extensions and a postCreateCommand that runs script/setup to create the virtualenv and install dev dependencies.
  • Add .devcontainer/README.md documenting what the devcontainer does and how to use it with VS Code / Dev Containers.

This change is purely for development workflow convenience and does not affect any runtime code, quirks, or released packages.
Motivation: make onboarding easier for contributors, have a reproducible dev environment, and keep the local development environment of contributors (including mine) clean and less cluttered.

Additional information

  • No functional changes to ZHA quirks or device handling.
  • No impact on Home Assistant users; this only affects contributors who opt into using the devcontainer / GitHub Codespaces.
  • The intention of this PR is to improve the contributor experience and provide a clean, isolated environment for development without polluting the host system with additional tooling and dependencies.
  • I’m not sure if adding a .devcontainer setup is desired in this repository; if this is not welcome or does not fit the maintainers' preferences, I’m happy to adjust the PR or close it again.

Device diagnostics

Not applicable – this PR does not add or modify any device quirks and only introduces development tooling (.devcontainer).

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.24%. Comparing base (bf73aa9) to head (0962abb).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4509   +/-   ##
=======================================
  Coverage   92.24%   92.24%           
=======================================
  Files         369      369           
  Lines       12094    12094           
=======================================
  Hits        11156    11156           
  Misses        938      938           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheJulianJES TheJulianJES self-requested a review November 20, 2025 20:44
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