Contributing to Logmancer
We welcome contributions! This document provides guidelines for contributing to Logmancer.
Getting Started
Fork the repository on GitHub
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/logmancer.git cd logmancer
Install development dependencies:
uv sync --all-groups
Create a branch for your changes:
git checkout -b feature/your-feature-name
Development Setup
Run tests:
uv run pytest
Check code quality:
uv run black logmancer/ tests/
uv run isort logmancer/ tests/
uv run ruff check logmancer/ tests/
Run tests with coverage:
uv run pytest --cov=logmancer --cov-report=html
Build documentation:
cd docs
uv run make html
Code Style
Follow PEP 8 style guide
Use Black for code formatting
Use isort for import sorting
Maximum line length: 100 characters
Add type hints where appropriate
Testing
Write tests for all new features
Maintain test coverage above 95%
Use pytest fixtures for common setup
Mock external dependencies
Test both sync and async code paths
Documentation
Add docstrings to all public functions/classes
Update API documentation if needed
Add examples for new features
Update changelog with your changes
Pull Request Process
Update tests - Ensure all tests pass
Update documentation - Document your changes
Update changelog - Add entry to CHANGELOG.md
Run quality checks - Black, isort, ruff
Create pull request - Describe your changes clearly
Address review comments - Work with maintainers
Commit Messages
Use clear, descriptive commit messages:
Add notification system for error alerts
- Implement Email backend
- Implement Slack backend
- Implement Telegram backend
- Add tests for all backends
Questions?
Open an issue on GitHub
Contact the maintainers
License
By contributing, you agree that your contributions will be licensed under the MIT License.