Thank you for your interest in contributing to Worklog Manager! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Coding Standards
- Testing Guidelines
- Commit Message Guidelines
- Pull Request Process
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors.
- Use welcoming and inclusive language
- Respect differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what's best for the project
- Show empathy towards other community members
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/worklog-manager.git cd worklog-manager - Create a branch for your feature or fix:
git checkout -b feature/your-feature-name
- Python 3.7 or higher
- Git for version control
- A code editor (VS Code recommended)
# Clone the repository
git clone https://github.com/your-username/worklog-manager.git
cd worklog-manager
# Run the application
python main.pyworklog-manager/
├── main.py # Application entry point
├── gui/ # User interface components
├── core/ # Business logic
├── data/ # Database and models
├── exporters/ # Export functionality
├── tests/ # Test suite
└── docs/ # Documentation
Before creating bug reports, please check existing issues to avoid duplicates.
When reporting bugs, include:
- Clear descriptive title
- Steps to reproduce the issue
- Expected vs. actual behavior
- Screenshots (if applicable)
- Environment details (OS, Python version)
- Relevant log files from
logs/directory
Enhancement suggestions are tracked as GitHub issues.
When suggesting enhancements, include:
- Clear use case and benefits
- Detailed description of proposed functionality
- Mockups or examples (if applicable)
- Potential implementation approach
- Choose an issue to work on or create one
- Comment on the issue to let others know you're working on it
- Fork and branch from
main - Implement your changes
- Test thoroughly
- Submit a pull request
Follow PEP 8 style guidelines:
- Use 4 spaces for indentation (no tabs)
- Maximum line length: 100 characters
- Use descriptive variable and function names
- Add docstrings to all functions, classes, and modules
- Use type hints where appropriate
Example:
def calculate_productive_time(start_time: datetime, end_time: datetime) -> int:
"""
Calculate productive work time in minutes.
Args:
start_time: Start of work session
end_time: End of work session
Returns:
Productive time in minutes
"""
delta = end_time - start_time
return int(delta.total_seconds() / 60)- Keep functions focused and single-purpose
- Limit function complexity (max 15-20 lines recommended)
- Use meaningful comments for complex logic
- Organize imports: standard library, third-party, local
- Avoid circular dependencies
- Follow existing UI patterns and conventions
- Maintain consistent spacing and alignment
- Provide user feedback for all actions
- Handle errors gracefully with user-friendly messages
- Support keyboard shortcuts where applicable
- Write tests for new features and bug fixes
- Aim for high test coverage (minimum 70%)
- Test edge cases and error conditions
- Use descriptive test names
Example:
def test_calculate_overtime_positive():
"""Test overtime calculation when work exceeds norm."""
work_minutes = 480 # 8 hours
result = calculate_overtime(work_minutes, work_norm=450)
assert result == 30# Run all tests
python -m pytest tests/
# Run specific test file
python -m pytest tests/test_time_calculator.py
# Run with coverage
python -m pytest --cov=. tests/Follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(export): add PDF export functionality
Implement PDF export using ReportLab library.
Includes formatting for daily summaries and analytics.
Closes #42
fix(timer): correct overtime calculation rounding
Fixed issue where overtime was rounding incorrectly
for sessions less than 30 seconds.
Fixes #38
- Update documentation if needed
- Add tests for new functionality
- Run all tests and ensure they pass
- Update CHANGELOG.md with your changes
- Ensure code follows style guidelines
- Rebase on latest
mainbranch
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
Describe testing performed
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] All tests passing
- [ ] No new warnings- At least one maintainer will review your PR
- Address any requested changes
- Once approved, a maintainer will merge your PR
- Your contribution will be included in the next release
- Questions? Open an issue with the
questionlabel - Stuck? Comment on your issue or PR
- Need clarification? Ask in the issue discussion
All contributors will be recognized in the project documentation and release notes.
Thank you for contributing to Worklog Manager! 🎉