Contributing to Manticore CockroachDB
Thank you for your interest in contributing to the Manticore CockroachDB client! This document provides guidelines and instructions for contributing to the project.
Development Setup
-
Clone the repository:
-
Create a virtual environment and install development dependencies:
-
Install pre-commit hooks (recommended):
Development Workflow
-
Create a new branch for your feature or bugfix:
-
Make your changes, ensuring you follow the code style guidelines
-
Add tests for your changes
-
Run the tests to make sure everything works:
-
Run type checking:
-
Format your code:
-
Commit your changes with a descriptive message:
-
Push your branch and create a pull request
Code Style Guidelines
- Follow PEP 8 style guide
- Use Black for code formatting
- Sort imports with isort
- Include type annotations for all function parameters and return values
- Write docstrings in the Google style format
Testing
- Write tests for all new features and bug fixes
- Ensure all tests pass before submitting a pull request
- Aim for high test coverage (>90%)
- Include both synchronous and asynchronous tests where applicable
Documentation
- Update documentation for any new features or changes to existing functionality
- Documentation is built with MkDocs and the Material theme
- To preview documentation locally:
- Document all public API methods with clear examples
Submitting a Pull Request
- Ensure your code passes all tests and quality checks
- Update documentation as needed
- Include a clear description of the changes in your pull request
- Link any related issues in the pull request description
- Wait for code review and address any feedback
Building and releasing
- Ensure all tests pass
- Update version number in:
manticore_cockroachdb/__init__.pysetup.pypyproject.toml- Update
CHANGELOG.mdwith the new version and changes - Build the package:
- Test the built package:
- Upload to PyPI (maintainers only):
Code of Conduct
Please be respectful and considerate of others when contributing to the project. We aim to create a welcoming and inclusive environment for all contributors.