Thank you for your interest in contributing to FauxDB! This document provides guidelines and information for contributors.
- Rust 1.70 or later
- PostgreSQL 17 or later
- Git
-
Fork the repository
git clone https://github.com/your-username/fauxdb.git cd fauxdb -
Install dependencies
cargo build
-
Set up PostgreSQL
# Create test database createdb fauxdb_test -
Run tests
cargo test --test fauxdb_tests
We use rustfmt for consistent code formatting:
cargo fmtWe use clippy for additional linting:
cargo clippy -- -D warningsAll code must be tested:
# Run all tests
cargo test
# Run specific test suite
cargo test --test fauxdb_tests test_crud_operations
# Run with coverage
cargo tarpaulin --out Html-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write tests for new functionality
- Update documentation as needed
- Ensure all tests pass
-
Submit a pull request
- Provide a clear description of changes
- Reference any related issues
- Ensure CI passes
All new features must be tested with mongosh:
# Test with real MongoDB client
mongosh mongodb://localhost:27018/test --eval "db.runCommand({yourCommand: 1})"- Unit Tests: Test individual functions and modules
- Integration Tests: Test component interactions
- Compatibility Tests: Test MongoDB wire protocol compatibility
We maintain high code coverage. New code should include tests:
# Check current coverage
cargo tarpaulin --out Html
open tarpaulin-report.html- Use Rust doc comments for public APIs
- Include examples in documentation
- Document error conditions
- Update README.md for new features
- Keep examples current and working
When reporting issues:
- Check existing issues first
- Provide reproduction steps
- Include system information
- Add relevant logs
- Update version in Cargo.toml
- Update CHANGELOG.md
- Create release tag
- Build and test release
- Be respectful and constructive
- Help others learn and contribute
- Follow the code of conduct
- Ask questions if unsure
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and ideas
- Documentation: Check README and inline docs
Thank you for contributing to FauxDB!