Contributing to EngramDB
Thank you for your interest in contributing to EngramDB! This document provides guidelines and instructions for contributing to the project.Code of Conduct
Please be respectful and considerate of others when contributing to EngramDB. We aim to foster an inclusive and welcoming community.Getting Started
Prerequisites
- Rust 2021 edition
- Cargo
- Python 3.7+ (for Python bindings)
- Git
Setting Up the Development Environment
- Clone the repository:
- Build the project:
- Run the tests:
- For Python development:
Development Workflow
Branching Strategy
main: The main development branchfeature/*: Feature branchesbugfix/*: Bug fix branchesrelease/*: Release branches
main and submit pull requests back to main.
Commit Messages
Follow these guidelines for commit messages:- Use the present tense (“Add feature” not “Added feature”)
- Use the imperative mood (“Move cursor to…” not “Moves cursor to…”)
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
Pull Request Process
- Ensure your code passes all tests
- Update the documentation if necessary
- Add tests for new functionality
- Ensure your code follows the project’s coding style
- Submit a pull request with a clear description of the changes
Coding Standards
Rust
- Follow the Rust API Guidelines
- Use
rustfmtto format your code - Use
clippyto catch common mistakes - Write documentation comments for public API
- Add tests for new functionality
Python
- Follow PEP 8
- Use type hints where appropriate
- Write docstrings for public API
- Add tests for new functionality
Testing
Rust Tests
- Unit tests should be in the same file as the code they test
- Integration tests should be in the
tests/directory - Use
cargo testto run all tests
Python Tests
- Tests should be in the
python/tests/directory - Use
pytestto run tests
Documentation
- Update the documentation when adding or changing features
- Write clear and concise documentation
- Include examples where appropriate
- Use Markdown for documentation files
Feature Requests and Bug Reports
- Use the GitHub issue tracker to submit feature requests and bug reports
- Clearly describe the issue or feature
- Include steps to reproduce for bugs
- Include expected and actual behavior
Project Structure
Release Process
- Update version numbers in:
Cargo.tomlpython/Cargo.tomlpython/pyproject.toml
- Update the CHANGELOG.md
- Create a new release branch:
release/vX.Y.Z - Create a pull request to
main - After merging, tag the release:
git tag vX.Y.Z - Push the tag:
git push origin vX.Y.Z - Create a new release on GitHub
- Publish to crates.io:
cargo publish - Publish to PyPI:
cd python && maturin publish
License
By contributing to EngramDB, you agree that your contributions will be licensed under the project’s MIT License.Contact
If you have questions or need help, you can:- Open an issue on GitHub
- Reach out to the maintainers directly

