Thank you for your interest in contributing to ValidKit! We welcome contributions from the community.
We follow Conventional Commits specification for clear and consistent commit history.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
feat: New featurefix: Bug fixdocs: Documentation only changesstyle: Code style changes (formatting, etc)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementstest: Adding missing tests or correcting existing testsbuild: Changes that affect the build system or external dependenciesci: Changes to CI configuration files and scriptschore: Other changes that don't modify src or test files
feat: add async context manager support
fix: correct timeout handling in batch operations
docs: add async/await examples to README
By participating in this project, you agree to abide by our Code of Conduct:
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on constructive criticism
- Respect differing viewpoints and experiences
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Python version and OS
- Relevant code snippets
- Check if the feature has been requested
- Open a new issue with:
- Clear use case
- Proposed implementation (if any)
- Benefits to users
-
Fork the repository and clone locally
-
Create a feature branch from
main:git checkout -b feat/your-feature-name # or git checkout -b fix/your-bug-fix -
Set up your development environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e ".[dev]"
-
Make your changes following Python best practices
-
Write/update tests to maintain coverage
-
Run all checks:
pytest mypy validkit flake8 validkit black validkit --check
Follow our commit convention:
# Single line commit
git commit -m "feat: add timeout configuration"
# Multi-line commit with details
git commit -m "feat: add batch result filtering" -m "- Add filter_invalid option to batch results
- Support custom validation rules
- Update type hints for new options
- Add async examples to documentation"Your PR title should follow the same convention as commits:
feat: add async generator for streaming resultsfix: handle connection pool exhaustiondocs: add FastAPI integration exampleperf: optimize memory usage for large batches
In your PR description, include:
## What
Brief description of what this PR does
## Why
The problem it solves or feature it adds
Closes #[issue number]
## How
- Technical approach taken
- Any async/await considerations
- Breaking changes (if any)
## Testing
- Unit tests added/updated
- Async tests included
- Manual testing performed
- Python versions tested
## Checklist
- [ ] Tests pass locally
- [ ] Type hints are correct
- [ ] Code is formatted with Black
- [ ] Documentation updated
- [ ] No breaking changes (or documented)## What
Adds support for streaming validation results using async generators
## Why
Large batch validations can consume significant memory
Closes #45
## How
- Implemented AsyncGenerator for result streaming
- Added chunk_size parameter to control memory usage
- Maintains backwards compatibility with list returns
## Testing
- Added async generator tests
- Tested with 100K email batches
- Memory usage reduced by 80%
- Tested on Python 3.8, 3.10, 3.12
## Checklist
- [x] Tests pass locally
- [x] Type hints are correct
- [x] Code is formatted with Black
- [x] Documentation updated
- [x] No breaking changes- Ensure all GitHub Actions checks pass
- Respond to code review feedback promptly
- Keep your branch up to date with
main - Be prepared to make changes based on feedback
# Clone your fork
git clone https://github.com/YOUR_USERNAME/python-sdk.git
cd python-sdk
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install# Run all tests
pytest
# Run with coverage
pytest --cov=validkit
# Run specific test file
pytest tests/test_client.py
# Run tests in watch mode
pytest-watchWe use:
- Black for code formatting
- isort for import sorting
- flake8 for linting
- mypy for type checking
Run all checks:
# Format code
black .
# Sort imports
isort .
# Run linter
flake8
# Type check
mypy validkit- Add docstrings to all public functions/classes
- Update README.md for user-facing changes
- Add examples for new features
- Keep documentation clear and concise
Follow conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions/changesrefactor:Code refactoringstyle:Code style changeschore:Maintenance tasks
Examples:
feat: add webhook support for batch processing
fix: handle rate limit errors correctly
docs: update batch verification examples
- Update version in
pyproject.toml - Update CHANGELOG.md
- Create release PR
- After merge, tag release:
git tag v1.2.3 - Push tags:
git push --tags - GitHub Actions will publish to PyPI
- Open an issue for questions
- Join our Discord
- Email: developers@validkit.com
Thank you for contributing! 🎉