Thank you for your interest in contributing to Vedyut! This document provides guidelines for contributing to the project.
- Rust (1.70+): Install Rust
- Python (3.10+): Install Python
- uv: Install uv
- Git: For version control
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/vedyut.git cd vedyut -
Set up Python environment:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv sync --all-extras
-
Build Rust workspace:
cd rust cargo build cargo test --all
-
Run API server:
cd .. uvicorn python.vedyut.api.main:app --reload -
Run tests:
# Python tests pytest tests/ -v # Rust tests cd rust cargo test --all
feature/- New features (e.g.,feature/add-vedic-support)fix/- Bug fixes (e.g.,fix/segmentation-error)docs/- Documentation updates (e.g.,docs/api-examples)perf/- Performance improvements (e.g.,perf/optimize-sandhi)
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and write tests
-
Run checks:
# Format Python code ruff format . # Lint Python code ruff check . # Format Rust code cd rust cargo fmt --all # Lint Rust code cargo clippy --all-targets --all-features
-
Run tests:
# Python tests pytest tests/ -v --cov # Rust tests cd rust cargo test --all
-
Commit your changes:
git add . git commit -m "feat: add your feature description"
Use conventional commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Adding or updating testsperf:- Performance improvementsrefactor:- Code refactoring
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
-
Implementing Pāṇinian Rules
- Currently: 2000+ rules implemented
- Goal: 4000 rules
- Files:
rust/vedyut-prakriya/src/ - Knowledge needed: Aṣṭādhyāyī, Sanskrit grammar
-
Improving Segmentation Accuracy
- Current: ~85% accuracy
- Goal: 95%+ accuracy
- Files:
rust/vedyut-cheda/src/ - Knowledge needed: Sandhi rules, disambiguation
-
Vedic Sanskrit Support
- Accents (udātta, anudātta, svarita)
- Vedic sandhi rules
- Special dhātus and pratyayas
-
ML Models for Disambiguation
- Neural models for choosing best segmentation
- Part-of-speech tagging
- Context-aware analysis
-
Performance Optimization
- Target: <50ms per verse
- Profiling and benchmarking
- Memory optimization
-
Documentation & Tutorials
- API examples
- Jupyter notebooks
- Video tutorials
- Grammar explanations
-
Testing
- Add test cases for edge cases
- Integration tests
- Benchmark tests
-
CLI Tool
- Command-line interface for batch processing
- Interactive mode
-
Web UI
- React frontend
- WASM integration
- Interactive examples
- Follow PEP 8
- Use type hints
- Use
rufffor formatting and linting - Maximum line length: 100 characters
Example:
def transliterate(text: str, from_scheme: str, to_scheme: str) -> str:
"""Transliterate text between schemes.
Args:
text: Input text
from_scheme: Source script
to_scheme: Target script
Returns:
Transliterated text
"""
# Implementation
pass- Follow Rust style guide
- Use
cargo fmtfor formatting - Use
cargo clippyfor linting - Write doc comments for public APIs
Example:
/// Transliterate text from one scheme to another
///
/// # Arguments
/// * `text` - The input text
/// * `from` - Source scheme
/// * `to` - Target scheme
///
/// # Returns
/// Transliterated text
pub fn transliterate(text: &str, from: Scheme, to: Scheme) -> String {
// Implementation
String::new()
}- Use
pytestfor testing - Aim for >80% code coverage
- Test both success and error cases
- Use
pytest-asynciofor async tests
def test_transliterate_iast_to_devanagari():
result = transliterate("dharmakṣetre", "iast", "devanagari")
assert result == "धर्मक्षेत्रे"- Write unit tests in same file
- Write integration tests in
tests/directory - Use
criterionfor benchmarks
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_transliterate() {
let result = transliterate("dharmakSetre", Scheme::Slp1, Scheme::Devanagari);
assert_eq!(result, "धर्मक्षेत्रे");
}
}- Update README.md for user-facing changes
- Write docstrings for all public APIs
- Add examples in doc comments
- Update API documentation in
docs/
- Ensure all tests pass locally
- Update documentation if needed
- Add tests for new features
- Keep PRs focused - one feature/fix per PR
- Write clear commit messages
- Reference issues in PR description (e.g., "Fixes #123")
## Description
Brief description of changes
## Related Issues
Fixes #123
## Changes
- Added X
- Fixed Y
- Updated Z
## Testing
- [ ] Added unit tests
- [ ] Added integration tests
- [ ] Manual testing completed
## Checklist
- [ ] Code follows style guidelines
- [ ] Tests pass locally
- [ ] Documentation updated
- [ ] CHANGELOG.md updated (if applicable)- Discord: Join #vedyut channel
- GitHub Discussions: For questions and ideas
- Mailing List: vedyut-discuss
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Help others learn and grow
Feel free to:
- Open an issue for questions
- Join our Discord server
- Email the maintainers
Thank you for contributing to Vedyut! 🙏