First off, thank you for considering contributing to CommitLoom! While I maintain this project personally, I welcome contributions that help make CommitLoom better.
By participating in this project, you agree to maintain a respectful and constructive environment. I expect everyone to:
- Be respectful of differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what's best for the community
- Show empathy towards other community members
Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps
- Explain which behavior you expected to see instead and why
- Include any error messages or logs
If you have a suggestion for the project, I'd love to hear it! Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- A clear and descriptive title
- A detailed description of the proposed functionality
- Any possible drawbacks or considerations
- If possible, examples of similar features in other projects
- Fork the repo and create your branch from
main
- If you've added code that should be tested, add tests
- Ensure the test suite passes
- Make sure your code follows the existing style
- Update the documentation if needed
-
Clone your fork:
git clone https://github.com/your-username/commitloom.git cd commitloom
-
Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
-
Install dependencies:
poetry install
-
Set up pre-commit hooks:
poetry run pre-commit install
This project uses:
- Ruff for linting and formatting
- MyPy for type checking
- Line length limit of 88 characters (Black compatible)
- Double quotes for strings
- Type hints are required for all functions
from typing import List, Optional
def process_data(input_data: List[str], max_items: Optional[int] = None) -> List[str]:
"""Process the input data and return filtered results.
Args:
input_data: List of strings to process
max_items: Optional maximum number of items to return
Returns:
List of processed strings
"""
processed = [item.strip().lower() for item in input_data if item]
if max_items is not None:
return processed[:max_items]
return processed
- All new features should include tests
- Maintain or improve test coverage
- Run tests with:
poetry run pytest
- Check coverage with:
poetry run pytest --cov
- Keep the README.md up to date
- Document all public functions and classes
- Include docstrings with type information
- Update CHANGELOG.md for significant changes
I use CommitLoom itself for commit messages! However, if you're writing them manually:
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters
- Reference issues and pull requests liberally after the first line
Feel free to open an issue with your question or reach out to me directly at [email protected].
Thank you for contributing to CommitLoom! 🧵