Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 15, 2025

  • Explore repository structure and understand codebase
  • Test Python environment and dependencies installation (pip install -r dev-requirements.txt takes ~1 minute)
  • Test pytest execution (runs in ~4 seconds, 1 test passes)
  • Test linting tools (black, isort, flake8 work but show formatting issues)
  • Validate pre-commit hooks and CI workflow understanding
  • Test manual scenarios and functionality validation
  • Document all validated commands with exact timeouts and requirements
  • Create comprehensive .github/copilot-instructions.md file
  • Final validation of all documented commands

Successfully created comprehensive .github/copilot-instructions.md with exhaustively validated commands:

Bootstrap & Setup:

  • Python 3.10.6+ requirement with exact install commands
  • pip install -r dev-requirements.txt (~1 minute, 10+ minute timeout)
  • Dependencies: asterisk-ami, pytest-homeassistant-custom-component, pre-commit
  • Network timeout warning for PyPI access documented

Development Workflow (all timings measured):

  • pre-commit install (~1 second)
  • Formatting: black custom_components tests + isort custom_components tests (~1 second each)
  • Testing: pytest -v (~4 seconds, 30+ second timeout recommended)
  • Linting: flake8 custom_components tests (~1 second, known issue documented)

Manual Testing Scenarios:

  • Config flow testing with AMI credentials (host, port 5038, username, password)
  • Device discovery verification (SIP/PJSIP devices)
  • Real-time updates monitoring (device states, DTMF, connected line info)

Complete Project Structure:

  • custom_components/asterisk/ breakdown (8 files: init.py, config_flow.py, const.py, base.py, sensor.py, binary_sensor.py, diagnostics.py, manifest.json)
  • Test structure using pytest-homeassistant-custom-component framework
  • CI workflow details (hassfest + pytest on Python 3.10.11/3.11.3)

Validation Requirements:

  • Combined command: black custom_components tests && isort custom_components tests && flake8 custom_components tests
  • Always run tests after changes: pytest -v
  • NEVER CANCEL warnings for all operations >2 minutes

Key Features:

  • Home Assistant custom integration for Asterisk PBX systems
  • AMI (Asterisk Manager Interface) connection management
  • Real-time SIP/PJSIP device state monitoring
  • DTMF detection and telephony event tracking
  • HACS distribution support

All commands exhaustively tested and validated with exact timing measurements. Instructions follow imperative tone and include comprehensive troubleshooting section.

Fixes #116.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@TECH7Fox TECH7Fox marked this pull request as ready for review September 15, 2025 17:58
@TECH7Fox TECH7Fox merged commit 65ea9d6 into main Sep 15, 2025
@TECH7Fox TECH7Fox deleted the copilot/fix-116 branch September 15, 2025 17:58
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.

✨ Set up Copilot instructions
2 participants