Thank you for your interest in contributing to Xplainit! This document provides guidelines and instructions for contributing.
Be respectful, inclusive, and constructive in all interactions with the community.
-
Fork the repository and clone it locally
-
Set up your development environment:
cd xplainit-framework cargo build cargo test
-
Create a branch for your work:
git checkout -b feature/your-feature-name
# Build all packages
cargo build
# Build in release mode
cargo build --release
# Build specific package
cargo build -p xplainit-core# Run all tests
cargo test
# Run tests for specific package
cargo test -p xplainit-core
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocaptureBefore submitting a PR, ensure your code passes all checks:
# Format code
cargo fmt --all
# Run clippy
cargo clippy --all-targets --all-features -- -D warnings
# Run all tests
cargo test --all
# Check documentation
cargo doc --no-deps- Follow Rust standard formatting (
cargo fmt) - Pass all clippy lints (
cargo clippy) - Write clear, self-documenting code
- Add comments for complex logic
- Use meaningful variable and function names
- Add doc comments (
///) for all public APIs - Include examples in doc comments where helpful
- Update README.md if adding new features
- Add inline comments for complex algorithms
- Write unit tests for new functionality
- Add integration tests for multi-component features
- Ensure all tests pass before submitting PR
- Aim for high test coverage (>80%)
- Test edge cases and error conditions
Use clear, descriptive commit messages:
feat: Add support for custom event filters
fix: Resolve memory leak in event store
docs: Update README with new examples
test: Add integration tests for error analysis
perf: Optimize event pipeline throughput
Prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation changestest:- Test additions or modificationsperf:- Performance improvementsrefactor:- Code refactoringchore:- Maintenance tasks
- Update documentation for any changed functionality
- Add tests for new features
- Ensure all CI checks pass
- Write a clear PR description explaining:
- What changes were made
- Why the changes were necessary
- How to test the changes
- Link related issues using
Fixes #123orRelates to #456 - Request review from maintainers
- Code follows project style guidelines
- All tests pass (
cargo test) - Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy) - Documentation is updated
- Commit messages are clear
- Changes are focused and atomic
xplainit-framework/
├── xplainit-core/ # Core Rust library
│ ├── src/ # Source code
│ ├── tests/ # Integration tests
│ ├── examples/ # Usage examples
│ └── benches/ # Benchmarks
├── xplainit-python/ # Python bindings
├── xplainit-js/ # JavaScript bindings
└── docs/ # Additional documentation
- Language runtime integrations (Python, JavaScript, Java, etc.)
- Performance optimizations
- Additional event types
- Enhanced error analysis
- Documentation improvements
- Add more examples
- Improve error messages
- Add unit tests
- Fix typos in documentation
- Add inline code comments
- Custom filter implementations
- New output formatters
- Advanced analysis algorithms
- Cross-language debugging features
When contributing language bindings:
- Follow the language's conventions and idioms
- Provide comprehensive examples
- Write tests in the target language
- Document installation and setup
- Ensure compatibility with common versions
- Profile code before and after changes
- Run benchmarks to measure impact
- Avoid unnecessary allocations
- Consider memory usage
- Optimize hot paths
- Issues: Open an issue for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
- Documentation: Check the docs/ directory for guides
By contributing to Xplainit, you agree that your contributions will be licensed under the MIT License.
Contributors will be acknowledged in:
- CHANGELOG.md for each release
- Project README.md
- Release notes
Thank you for contributing to Xplainit! 🚀