Contributing to Cova
Thank you for your interest in contributing to Cova! This document provides guidelines and instructions for contributing to the project.
Table of Contents
- Code of Conduct
- Getting Started
- Development Workflow
- Documentation
- Issue Guidelines
- Pull Request Guidelines
- Code Style
- Testing
Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate of others.
Getting Started
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/cova.git cd cova - Set up the development environment:
# Install Rust (if not already installed) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Install development tools rustup component add rustfmt clippy
Development Workflow
-
Create a new branch for your feature/fix:
git checkout -b type/area/description # Example: git checkout -b feat/algebra/vector-spaces -
Make your changes following the Code Style guidelines
-
Run tests and checks:
cargo test cargo fmt --all -- --check cargo clippy --all-targets --all-features -- -D warnings -
Commit your changes following the Commit Message Format
-
Push your branch and create a Pull Request
Documentation
Harness provides two types of documentation that you should be familiar with:
API Documentation
The Rust API documentation for all crates can be viewed using:
just docs
This will build and open the Rust API documentation in your browser. This documentation is automatically generated from your code comments and should be kept up to date.
Book Documentation
The comprehensive book documentation can be viewed using:
just book
This will serve the book documentation locally and open it in your browser. The book includes detailed explanations of mathematical concepts, examples, and usage guides.
When contributing, please:
- Keep API documentation up to date with your code changes
- Update the book documentation if you add new features or change existing behavior
- Add examples to both API docs and the book where appropriate
- Ensure mathematical definitions and references are accurate
Issue Guidelines
When creating issues, please use the provided templates and follow these guidelines:
Title Format
type(area): brief description
Where:
typeis one of:feat,fix,refactor,docs,test,choreareais one of:algebra,space
Labels
Please use appropriate labels to categorize your issue:
- Area labels:
area: algebra,area: space - Priority labels:
priority: critical/high/medium/low - Type labels:
type: enhancement,type: refactor - Technical labels:
tech: performance,tech: security,tech: testing
Pull Request Guidelines
- Use the provided PR template
- Ensure your PR title follows the format:
type(area): description - Link related issues using
closes #issue_number - Keep PRs focused and small when possible
- Include tests for new features or bug fixes
- Update documentation as needed
Code Style
- Follow Rust's official style guide
- Use
rustfmtfor formatting - Run
cargo clippyto catch common mistakes - Document public APIs thoroughly
- Use meaningful variable and function names
- Keep functions focused and small
Testing
- Write unit tests for all new functionality
- Include examples in documentation
- Run all tests before submitting PRs
- Consider edge cases and error conditions
Commit Message Format
Follow this format for commit messages:
type(area): description
[optional body]
[optional footer]
Where:
typeis one of:feat,fix,refactor,docs,test,choreareais one of:algebra,space- Description is a brief summary of changes
- Body provides additional context if needed
- Footer references issues or PRs
Questions?
If you have any questions, feel free to:
- Open an issue with the
questionlabel - Join our community discussions
- Contact the maintainers