Releases: fabriziosalmi/lws
v1.4.1
Release v1.4.1 - Testing & Modularization
🎯 Overview
This release focuses on improving code quality, testing infrastructure, and project organization. LWS now includes a comprehensive test suite with 96% code coverage and a properly modularized codebase.
✨ New Features
Comprehensive Test Suite
- 98 unit tests with 100% pass rate
- 96% code coverage across the core modules
- Pytest-based testing framework with:
pytest-covfor coverage reportingpytest-mockfor mocking capabilities- Organized test fixtures and markers
- HTML coverage reports
Test Coverage by Module
lws_core/__init__.py- 100%lws_core/proxmox.py- 100%lws_core/ssh.py- 98%lws_core/config.py- 97%lws_core/utils.py- 93%lws_core/logging_setup.py- 87%
Documentation Site
- Added project documentation site in
docs/directory - Comprehensive API reference
- Architecture documentation
- CLI reference guide
- Getting started guide
- Configuration documentation
🔧 Improvements
Code Modularization
- Properly modularized codebase with clear separation of concerns:
lws_core/config.py- Configuration managementlws_core/ssh.py- SSH operationslws_core/utils.py- Utility functionslws_core/proxmox.py- Proxmox API interactionslws_core/logging_setup.py- Logging configurationlws_commands/- Command modules
Enhanced .gitignore
- Added comprehensive Python development patterns
- Test coverage and cache exclusions
- IDE and OS-specific file exclusions
- Virtual environment patterns
- Temporary file patterns
Testing Infrastructure
pytest.iniconfiguration with coverage settingstests/conftest.pywith shared fixtures- Organized test files by module:
test_config.py(29 tests)test_ssh.py(15 tests)test_utils.py(32 tests)test_proxmox.py(22 tests)
📦 Dependencies
New Testing Dependencies
pytest>=7.4.0,<8.0.0
pytest-cov>=4.1.0,<5.0.0
pytest-mock>=3.11.0,<4.0.0
🧪 Test Categories
Configuration Tests
- YAML parsing and validation
- Region and availability zone validation
- Instance size configuration
- Sensitive data masking
- Error handling
SSH Tests
- Command execution with retry logic
- Connection timeout handling
- Password sanitization in logs
- sshpass dependency checking
Utility Tests
- Service status checking
- VMID generation
- Container operations (stop, start, resize, snapshot)
- Command processing
Proxmox Tests
- Local and remote command execution
- Error propagation
- Parameter validation
🚀 Running Tests
# Run all tests
pytest tests/
# Run with coverage report
pytest tests/ --cov=lws_core --cov-report=html
# Run specific test file
pytest tests/test_config.py -v
# Run by marker
pytest -m ssh # SSH tests only
pytest -m unit # Unit tests only📊 Code Quality Metrics
- Total Tests: 98
- Pass Rate: 100%
- Code Coverage: 96%
- Modules: Fully modularized
- Documentation: Comprehensive
🔍 What's Tested
✅ Configuration loading and validation
✅ SSH command execution with retries
✅ Proxmox API interactions
✅ Utility functions (VMID generation, container operations)
✅ Error handling and edge cases
✅ Password/secret sanitization
✅ Container lifecycle management
✅ Snapshot operations
📝 Breaking Changes
None - This is a backward-compatible release focused on quality improvements.
🐛 Bug Fixes
- Improved error handling in SSH operations
- Enhanced configuration validation
- Better logging for debugging
📖 Documentation
- Added
tests/TEST_SUMMARY.mdwith detailed test documentation - Documentation site in
docs/directory - Improved inline code documentation
- API reference documentation
- Architecture diagrams and guides
🙏 Acknowledgments
This release represents a significant improvement in code quality and maintainability, making LWS more reliable and easier to contribute to.
Installation
git clone https://github.com/fabriziosalmi/lws.git
cd lws
pip install -r requirements.txtQuick Start
# Run tests
pytest tests/
# View coverage
pytest tests/ --cov=lws_core --cov-report=html
open htmlcov/index.htmlFor full documentation, visit the documentation site.
v1.4.0
What's Changed
- Potential fix for code scanning alert no. 4: Information exposure through an exception by @fabriziosalmi in #8
Modularized lws.py
Full Changelog: 1.3.0...v1.4.0
v1.3.0
What's Changed
- Create Dockerfile by @GothShoot in #5
- 🔒 Security & Quality: Fix critical vulnerabilities and enhance code quality with 100% backward compatibility by @Copilot in #6
New Contributors
- @GothShoot made their first contribution in #5
- @Copilot made their first contribution in #6
Full Changelog: v1.2.0...1.3.0
What's Changed
- Create Dockerfile by @GothShoot in #5
- 🔒 Security & Quality: Fix critical vulnerabilities and enhance code quality with 100% backward compatibility by @Copilot in #6
New Contributors
- @GothShoot made their first contribution in #5
- @Copilot made their first contribution in #6
Full Changelog: v1.2.0...v1.3.0
v1.2.0
Full Changelog: v1.1.0...v1.2.0
v1.1.0
Full Changelog: v1.0.0...v1.1.0
v1.0.0
What's Changed
- Bump requests from 2.31.0 to 2.32.2 by @dependabot in #1
New Contributors
- @dependabot made their first contribution in #1
Full Changelog: https://github.com/fabriziosalmi/lws/commits/v1.0.0