Go to file
matthias.lotz fdddba7469 Phase 1: Foundation & Quality Tools
Implemented comprehensive development infrastructure:

1.1 Code Quality Tools:
- Created pyproject.toml with configurations for:
  * Black (code formatter, line-length=100)
  * isort (import sorter, black profile)
  * mypy (type checker, lenient settings for gradual adoption)
  * pytest (test runner with coverage)
  * ruff (modern linter replacing flake8/pylint)
  * bandit (security scanner)
- Added .pre-commit-config.yaml with:
  * File hygiene hooks (trailing whitespace, EOF, YAML/JSON checks)
  * Code formatting (black, isort, ruff)
  * Security checks (bandit)
- Created requirements-dev.txt for development dependencies
- Added .gitignore for Python projects

1.2 Test Infrastructure:
- Created tests/conftest.py with shared fixtures:
  * Config fixtures (mqtt_config, odoo_config, bridge_config, etc.)
  * MQTT client mocks (mock_mqtt_client, mock_paho_mqtt_client)
  * Odoo client mocks (mock_odoo_client, mock_requests)
  * Device/parser fixtures (shelly_pm_message, mock_parser)
  * Session detector & event queue fixtures
- Created tests/helpers.py with test utilities:
  * assert_event_valid, assert_mqtt_topic_valid
  * create_mock_mqtt_message
  * wait_for_condition helper
- Created tests/fixtures/ with specialized fixtures:
  * mqtt_fixtures.py: MQTT message factory, simulated broker
  * config_fixtures.py: Config file factory, minimal/full configs
  * device_fixtures.py: Device events, session events, Shelly payloads

1.3 CI/CD Pipeline:
- Created .github/workflows/iot-bridge-test.yml:
  * Lint job: ruff, black, isort, bandit
  * Type check job: mypy
  * Test job: pytest on Python 3.10, 3.11, 3.12 with coverage
  * Integration test job: with Mosquitto MQTT broker service
  * Docker build test job
  * Quality gate job: ensures all checks pass

Documentation:
- Updated README.md with Development section:
  * Local setup instructions
  * Code quality tools usage
  * Testing commands
  * Updated project structure diagram

Benefits:
- Automated code quality checks via pre-commit hooks
- Comprehensive test fixtures reduce test boilerplate
- CI/CD pipeline catches issues early
- Matrix testing ensures Python 3.10-3.12 compatibility
- Foundation for gradual type safety improvements (Phase 3)

See OPTIMIZATION_PLAN.md Phase 1 for details.
2026-02-18 22:11:25 +01:00
.github/workflows Phase 1: Foundation & Quality Tools 2026-02-18 22:11:25 +01:00
extra-addons/open_workshop/open_workshop_mqtt feat: IoT Bridge Health Monitoring & Dynamic MQTT Reconnection 2026-02-18 20:36:11 +01:00
iot_bridge Phase 1: Foundation & Quality Tools 2026-02-18 22:11:25 +01:00
odoo@fd43f0445a initial MQTT Development 2026-02-11 21:07:32 +01:00
.gitignore initial version 2026-02-10 20:00:27 +01:00
.readthedocs.yaml feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
DEPLOYMENT.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
DOCUMENTATION_STRATEGY.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
FEATURE_REQUEST_DEVICE_STATUS.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
FEATURE_REQUEST_OPEN_WORKSHOP_MQTT_IoT.md feat: benutzerfreundliche GUI für Device-Konfiguration mit Auto-Config-Push 2026-02-17 00:09:51 +01:00
IMPLEMENTATION_PLAN_DEVICE_STATUS.md feat: Add automatic API documentation generation and device status monitoring 2026-02-15 11:03:22 +01:00
IMPLEMENTATION_PLAN.md Update Implementation Plan 2026-02-18 21:20:22 +01:00