Thank you for your interest in contributing to the Musical Dynamics Training Software! This document provides guidelines and information for contributors.
- Python 3.8 or higher
- Git
- A MIDI-compatible device (for testing)
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Piano-Dynamics-Midi-Trainer.git cd Piano-Dynamics-Midi-Trainer -
Set up the development environment:
make dev-setup
-
Create a feature branch:
git checkout -b feature/your-feature-name
We use several tools to maintain code quality:
- Black: Code formatting
- Flake8: Linting
- MyPy: Type checking
- Pre-commit: Automated quality checks
# Format code
make format
# Run linting
make lint
# Run all checks
make check
# Run tests
make testPre-commit hooks are automatically installed with make dev-setup. They will run on every commit to ensure code quality.
To run manually:
pre-commit run --all-files- Follow PEP 8 guidelines
- Use type hints for all function parameters and return values
- Write docstrings for all public functions and classes
- Keep functions small and focused
- Use meaningful variable and function names
- Write tests for all new functionality
- Ensure all tests pass before submitting
- Aim for high test coverage
- Use descriptive test names
Use conventional commit format:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Test changeschore: Maintenance tasks
Examples:
feat(gui): add settings dialog for color customization
fix(midi): handle MIDI port connection errors gracefully
docs(readme): add troubleshooting section
- Bug fixes
- Performance improvements
- Better error handling
- Enhanced documentation
- New features (see roadmap in README)
- UI/UX improvements
- Additional MIDI device support
- Platform-specific optimizations
- Code refactoring
- Additional test coverage
- Documentation improvements
When reporting bugs, please include:
- Operating system and version
- Python version
- MIDI device make and model
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Error messages (if any)
- Screenshots (if applicable)
When suggesting features:
- Describe the problem you're trying to solve
- Explain your proposed solution
- Consider the impact on existing functionality
- Think about implementation complexity
-
Ensure your code is ready:
- All tests pass
- Code is formatted and linted
- Documentation is updated
-
Create a pull request with:
- Clear description of changes
- Reference to any related issues
- Screenshots (for UI changes)
-
Wait for review and address any feedback
-
Maintainers will merge once approved
When adding new features, please update:
- README.md: User-facing documentation
- Docstrings: Code documentation
- Type hints: Function signatures
- Tests: Usage examples
To test MIDI functionality:
- Connect your MIDI device
- Run the application:
musical-dynamics-trainer --verbose
- Test different dynamics by varying your playing intensity
- Verify visual feedback matches expected behavior
- Be respectful and inclusive
- Focus on the code, not the person
- Provide constructive feedback
- Help others learn and grow
- Issues: Use GitHub issues for bugs and feature requests
- Discussions: Use GitHub discussions for questions and ideas
- Documentation: Check the README and code comments
Contributors will be recognized in:
- README.md: Contributors section
- Release notes: For significant contributions
- GitHub: Contributor statistics
Thank you for contributing to making this project better! 🎹✨