Thank you for considering contributing to this Python project template! This document provides guidelines and information for contributors.
This template follows a practical, experience-driven approach:
- Features are added when actually needed, not because they're trendy
- Real-world usage drives decisions, not theoretical best practices
- Simplicity over complexity - the template should be easy to understand and modify
- Opinionated but flexible - strong defaults that can be easily customized
- Use the GitHub issue template
- Include clear reproduction steps
- Mention which project type (library/CLI) is affected
- Include your environment details (Python version, OS, etc.)
- Explain the real-world use case
- Describe how it fits with existing features
- Consider if it belongs in the template or should be project-specific
- Improve existing documentation clarity
- Add missing examples or use cases
- Fix typos and formatting issues
- Follow the existing code style and patterns
- Test with both library and CLI project types
- Update documentation if needed
- Keep changes focused and atomic
-
Fork and clone the repository
git clone https://github.com/your-username/python-template.git cd python-template -
Test template generation
# Test library generation cookiecutter . --no-input project_type=library # Test CLI generation cookiecutter . --no-input project_type=cli-application # Clean up test projects rm -rf my-python-project
-
Validate generated projects
cd test-project pip install -e ".[dev]" pytest
- Always test both project types (library and CLI)
- Verify generated projects install correctly
- Check that all template variables render properly
- Test with different input values
- Ensure tests pass in generated projects
- Verify configuration loading works
- Test logging functionality
- Check CLI features (for CLI projects)
- Follow existing patterns in the template
- Use meaningful variable names in cookiecutter.json
- Keep template files focused and readable
- Comment complex Jinja2 logic
Use clear, descriptive commit messages:
feat: add new featurefix: resolve issue with Xdocs: improve README examplesrefactor: simplify configuration loadingtest: add validation for CLI projects
- Create a focused PR - one feature or fix per PR
- Update documentation if your changes affect usage
- Test thoroughly with both project types
- Write a clear description of what changed and why
- Be responsive to feedback and questions
- Open an issue for questions about contributing
- Check existing issues and PRs for similar discussions
- Feel free to propose changes to these guidelines
All contributors will be recognized in the project. Thank you for helping make this template better for everyone!