-
Notifications
You must be signed in to change notification settings - Fork 1
Release v0.2.0 - Major Modernization and Feature Expansion #1
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Switch to GPL-3.0-or-later to ensure all derivative works remain open source and contribute back to the community.
- Remove poetry.lock and poetry.toml - Add uv.lock for dependency management - Replace flake8 with ruff for linting - Update pyproject.toml with ruff configuration - Update VSCode settings to use ruff instead of flake8 BREAKING CHANGE: Requires uv instead of poetry for dependency management
…r CLI - Add dataclasses for structured data (SystemStatus, HelpInfo, OutputRouting, StreamStatus) - Implement high-level KVM class with type-safe methods for device operations - Refactor CLI to use KVM class instead of direct Device access - Add helper method for raw output to eliminate code duplication - Rename console.py to cli.py and update pyproject.toml entrypoint - Update README.md with comprehensive library usage examples - Document tested device models (EZ-SW41HA-KVMU3L and EZ-SW41HA-KVMU3P) - Maintain backward compatibility with raw, pretty, and JSON output formats
BREAKING CHANGES: - Require Python 3.10+ (was 3.8+) - Change SystemStatus.system_address from string to int - Remove KVMCommandNotSupportedError exception class - Remove unsupported CLI commands (input edid, input signal, system address, system auto-mode) - Remove unsupported KVM methods (get_input_signal_status, get_edid_info) Features: - Add device address support (0-99) for multi-device setups on same serial port - Add device discovery command to scan for devices on address range - Add set-address command to change device addresses - Add unified --format flag (raw/json/pretty) for all query commands - Add raw_response and command fields to all response models - Add comprehensive pytest test suite with pytest-reserial for recording/replaying serial traffic - Add test helper scripts (test-record.sh, test-replay.sh, test-with-hardware.sh) - Add command validation to prevent injection attacks Improvements: - Refactor CLI to use match statements for format handling - Add address prefix support (Axx) for commands to addressed devices - Add DeviceResponse base class for all response models - Improve error handling and validation - Add extensive documentation for testing, address management, and command support status Documentation: - Document all working and unsupported commands based on firmware 2.03 testing - Add comprehensive testing guide with three modes (replay/hardware/record) - Add device chaining and multi-device setup documentation - Add output format documentation with examples - Document command support status and firmware limitations Configuration: - Add pytest configuration with coverage settings - Add dev dependencies: pytest, pytest-cov, pytest-reserial - Update .gitignore for devenv, direnv, and pre-commit files
Remove separate format_pretty_* helper functions and inline their logic directly into the command handlers to simplify code structure.
BREAKING CHANGE: raw_response field changed from str to list[str] in all response models - Move DiscoveredDevice model from cli.py to models.py for better organization - Change raw_response type from str to list[str] across all DeviceResponse models - Replace string manipulation with regex patterns for robust parsing in KVM class - Add comprehensive docstrings to parsing methods explaining expected formats - Fix raw_response output by joining list elements in CLI echo statements - Update all tests to reflect new list[str] type for raw_response - Improve code formatting for long parameter lists and click options - Add detailed docstring to KVM.__init__ method
Remove SerialConfig dataclass and parsing logic as RS232 settings are hardcoded and provide no value to users.
BREAKING CHANGE: KVM methods now return KVMResponse[T] wrapper instead of direct model types - Add generic KVMResponse[T] wrapper for type-safe response handling - Replace string stream status with StreamState enum (ON/OFF) - Refactor _execute_command to accept parser function instead of boolean - Remove unused DeviceResponse base class and SerialConfig - Simplify data models to contain only parsed data - Update CLI and tests for new response structure
- Remove incomplete 'Performance tests' comment from test_integration.py - Remove unnecessary reserial fixture from test_kvm_error_handling() since it only validates parameters without device interaction - Remove empty test entry from test_integration.jsonl
- Add AUR installation method - Fix repository URL placeholder - Reorganize CLI sections for better UX (KVM switching first) - Simplify Output Formats and Multi-Device Setup sections - Remove redundant Error Handling and Data Models sections - Streamline testing documentation - Reorganize Command Support Status (working commands first) - Fix command categorization (GET vs SET) - Remove PROTOCOL.md (documents different device) - Remove docs/ezcoo1.docx (V1 protocol for different device)
- Add check/build composite actions for linting and packaging - Add CI workflow for PR validation - Document release process for GitHub, PyPI, and AUR
Document breaking changes, new features, and improvements including KVM interface, multi-device support, CLI rewrite, tooling migration (Poetry→uv, flake8→ruff), and test suite.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release v0.2.0 - Major Modernization and Feature Expansion
This PR introduces significant improvements to ezcoo-cli, transforming it from a basic CLI tool into a comprehensive, type-safe library with extensive testing and modern Python tooling.
Important: License Change
This release changes the project license from Apache-2.0 to GPL-3.0-or-later. This means all derivative works must also be licensed under GPL-3.0-or-later and remain open source. If you were using this project under Apache-2.0, you may continue to use versions ≤0.1.1 under that license, but v0.2.0 and later are GPL-licensed.
Overview
This release represents a complete modernization of the project with breaking changes to improve maintainability, type safety, and usability both as a CLI tool and as a Python library.
Added
High-Level KVM Interface
KVMclass inkvm.pyproviding type-safe, structured interface for library usageKVMResponse[T]wrapper ensuring type safety for all operationsMulti-Device Support
discovercommand to find all devices with their firmware versionsEnhanced CLI Commands
Complete rewrite replacing simple
console.py:status: Show system status with firmware version and addresshelp: Display device help informationinput switch: Switch inputs with output selectionoutput routing: Query current input-to-output routingoutput stream: Check output stream statusedid get/set: Manage EDID data for inputsdiscover: Find all devices on the serial bus--format raw|json|prettyComprehensive Testing
Device,KVM, and CLI commandstest-record.sh,test-replay.sh,test-with-hardware.shDocumentation & CI/CD
docs/RELEASING.mdwith complete manual release process (GitHub, PyPI, AUR)Breaking Changes
Build System & Tooling
uv.lockand PEP 621 formatCLI Changes
cli.pyreplacesconsole.py--addressfor multi-device support,--formatfor output controlAPI Changes
DeviceErrorandDeviceConnectionErrorexceptionsKVMResponse[T]objects instead of raw stringsSelf,type[])Dependencies
attrs,mypy,flake8,flake8-black,flake8-import-orderpytest,pytest-cov,pytest-reserial,ruffclick≥8.1.3,pyserial≥3.5Fixed
Testing
All tests pass with hardware replay:
CI workflow validates:
Checklist
Migration Guide: Users upgrading from v0.1.x should:
--format rawfor old behavior)KVMclass instead of directDeviceaccess