Thank you for your interest in contributing to contextify! We welcome contributions from the community. This document outlines how to get started.
Please be respectful, inclusive, and professional in all interactions. We're committed to providing a welcoming environment for everyone.
git clone https://github.com/yourusername/contextify.git
cd contextifyuv venv
source .venv/bin/activate # On Windows: .venv\Scripts\Activate.ps1
uv pip install -e ".[dev]"git checkout -b feature/your-feature-nameAll contributions must adhere to:
- PEP 8 via
ruff check - Type hints for all function signatures
- Comprehensive docstrings (Google style)
- SOLID principles in design
- Specific error handling (no bare
except:)
Before committing, ensure your code passes quality checks:
# Check code style
ruff check src/
# Format code
ruff format src/
# Check type hints
mypy src/contextify/pytest
pytest --cov=src/contextify # With coverageTest the CLI from within the project:
python -m contextify.main --help
python -m contextify.main --verbose --output ./test_context.md[category] Brief summary (50 chars max)
Detailed explanation if needed. Reference issues with #123.
Examples:
[feature] Add support for .aicontextignore custom files[fix] Handle Unicode encoding errors in file reading[docs] Update README with examples
- Push your branch to your fork
- Create a PR against the main repository
- Provide a clear title and description
- Reference any related issues
- Respond to reviewer feedback respectfully
- Make requested changes in new commits
- Re-request review when ready
- Bug fixes: Fix issues reported in GitHub Issues
- Features: Implement new features or improve existing ones
- Performance: Optimize directory traversal or pattern matching
- Tests: Improve test coverage and add edge case tests
- Improve README and docstrings
- Add usage examples
- Create tutorials for specific use cases
- Answer questions in Issues
- Share contextify with others
- Provide feedback and suggestions
Before making significant changes, familiarize yourself with:
- Layered Architecture: CLI → Configuration → Traversal → Output
- Strategy Pattern: Used for flexible ignore rule sources
- SOLID Principles: Applied throughout the codebase
- Dependency Inversion: Components depend on abstractions, not concrete implementations
See the main README for more details on system design.
When reporting bugs, please include:
- Description: What went wrong?
- Steps to Reproduce: How can we reproduce it?
- Expected Behavior: What should have happened?
- Actual Behavior: What actually happened?
- Environment: Python version, OS, uv version, etc.
Example issue:
Title: contextify ignores hidden directories incorrectly
Description:
contextify is including files from .vscode/ even though it's in the default ignore list.
Steps:
1. Create .vscode/settings.json
2. Run contextify --verbose
3. Look at the output
Expected: .vscode files should be excluded
Actual: .vscode files are included
Environment: Python 3.11, macOS 13, uv 0.1.0
- Open a discussion for general questions
- Check existing issues before asking
- Read the README for usage questions
Thank you for contributing to contextify! 🙏