Skip to content

Latest commit

 

History

History
116 lines (86 loc) · 2.85 KB

File metadata and controls

116 lines (86 loc) · 2.85 KB

Contributing to CloudMusic

Thank you for your interest in contributing to CloudMusic! 🎵

How to Contribute

Reporting Bugs

If you find a bug, please open an issue with:

  • Clear description of the bug
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Screenshots (if applicable)
  • Your environment (OS, Python version, etc.)

Suggesting Features

Have a great idea? Open an issue with:

  • Clear description of the feature
  • Use case and benefits
  • Mockups or examples (if applicable)

Submitting Pull Requests

  1. Fork the repository
  2. Create a branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: make test
  5. Format code: make format
  6. Run linters: make lint
  7. Commit changes: git commit -m "Add amazing feature"
  8. Push to branch: git push origin feature/amazing-feature
  9. Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/CloudMusic.git
cd CloudMusic

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or: .venv\Scripts\activate  # Windows

# Install development dependencies
make dev

# Run tests
make test

# Run CloudMusic
make run

Code Style

We use:

  • Black for code formatting
  • isort for import sorting
  • mypy for type checking
  • flake8 for linting

Run make format before committing.

Project Structure

cloudmusic/
├── api.py              # NetEase API client
├── player.py           # Audio player controller
├── config.py           # Configuration management
├── downloader.py       # Concurrent downloader
└── tui/
    ├── app.py          # Main TUI application
    ├── widgets.py      # Custom widgets
    ├── themes.py       # Theme definitions
    ├── keybindings.py  # Keyboard shortcuts
    ├── search.py       # Search with autocomplete
    ├── notifications.py # Notification system
    └── dialogs.py      # Modal dialogs

Testing

  • Write tests for new features
  • Ensure all tests pass: make test
  • Aim for >80% code coverage

Commit Messages

Follow Conventional Commits:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes (formatting)
  • refactor: Code refactoring
  • test: Adding/updating tests
  • chore: Maintenance tasks

Example: feat: add lyrics search functionality

Need Help?

  • Open an issue with the question label
  • Start a discussion

License

By contributing, you agree that your contributions will be licensed under the MIT License.


Thank you for contributing! ❤️