Welcome to the py-clash-bot project! We appreciate your interest in contributing. This document provides guidelines and instructions for contributing to the project.
- Prerequisites
- Setting up Development Environment
- Development Workflow
- Testing
- Submitting Changes
- Code Style
- Additional Guidelines
- Licensing
Before contributing, ensure you have the following tools installed:
- uv - Fast Python package installer and resolver
- Make (or equivalent like
nmakeon Windows) - For running project commands - Git - Version control
-
Clone the repository
git clone https://github.com/pyclashbot/py-clash-bot.git cd py-clash-bot -
Install dependencies
make setup
-
Run development script
make dev
- Development mode:
make dev - Build Windows installer:
make build-msi
make setup- Install project dependenciesmake dev- Run the application in development modemake lint- Run all pre-commit checks on all filesmake build-msi- Build Windows MSI installer
Before submitting changes, ensure your code works correctly:
- Run the application and verify it starts without errors
- Test your specific changes thoroughly
- Check for any linting issues (the project uses ruff for code formatting)
git checkout -b feature/your-feature-nameuvx pre-commit install- Write clear, well-documented code
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
git add .
git commit -m "feat: add your feature description"Use conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for adding tests
git push origin feature/your-feature-nameThen create a pull request on GitHub with:
- Clear description of changes
- Any relevant screenshots or examples
- Reference to related issues (if applicable)
The project uses several tools to maintain code quality:
- ruff - Code linting and formatting
- isort - Import sorting
- pre-commit - Automated code quality checks
# Run all pre-commit checks on all files
make lint- Be respectful and constructive in discussions
- Ask questions if something is unclear
- Provide context when reporting issues
- Update documentation for any API changes
- Add comments to complex code sections
- Include examples for new features
- Test your changes thoroughly
- Consider edge cases and error conditions
- Verify the application still works as expected
- Consider the impact of your changes on performance
- Profile code if making significant changes
- Follow existing patterns for optimization
If you need help or have questions:
- Check existing issues and pull requests
- Search the documentation
- Create a new issue with clear details
- Join our community discussions
By contributing to py-clash-bot, you agree that:
-
Your contributions are your original work or you have the right to submit them under the project's licenses.
-
You grant a license to your contributions under the same terms as the project:
- Source code contributions are licensed under the py-clash-bot Non-Commercial Copyleft License 1.0 (NC-CL-1.0)
- Asset contributions (images, documentation) are licensed under CC BY-NC-SA 4.0
-
You understand the non-commercial restriction - your contributions, along with the project, may not be used commercially without separate agreement with the maintainers.
-
Your contributions become part of the project - From the moment your contribution is merged, it is included under the project's dual-license and may be distributed accordingly.
- Do not include proprietary or commercially-licensed content
- Clearly attribute any third-party content and ensure license compatibility
- Game assets from Clash Royale are property of Supercell - reference images are used for detection purposes only
If you're interested in using py-clash-bot commercially, please contact the maintainers to discuss licensing options.
Thank you for contributing to py-clash-bot! 🚀