|
| 1 | +# Development Guide for ragas |
| 2 | + |
| 3 | +This document provides guidelines for developing and contributing to the ragas project. |
| 4 | + |
| 5 | +## Setting up the Development Environment |
| 6 | + |
| 7 | +1. **Fork the Repository** |
| 8 | + Fork the [ragas repository](https://github.com/explodinggradients/ragas) on GitHub. |
| 9 | + |
| 10 | +2. **Clone your Fork** |
| 11 | + ``` |
| 12 | + git clone https://github.com/YOUR_USERNAME/ragas.git |
| 13 | + cd ragas |
| 14 | + ``` |
| 15 | + |
| 16 | +3. **Set up a Virtual Environment** |
| 17 | + ``` |
| 18 | + python -m venv venv |
| 19 | + source venv/bin/activate # On Windows, use `venv\Scripts\activate` |
| 20 | + ``` |
| 21 | + |
| 22 | +4. **Install Dependencies** |
| 23 | + ``` |
| 24 | + pip install -e ".[dev]" |
| 25 | + ``` |
| 26 | + |
| 27 | +## Development Workflow |
| 28 | + |
| 29 | +1. **Create a New Branch** |
| 30 | + ``` |
| 31 | + git checkout -b feature/your-feature-name |
| 32 | + ``` |
| 33 | + |
| 34 | +2. **Make Changes and Commit** |
| 35 | + ``` |
| 36 | + git add . |
| 37 | + git commit -m "Your descriptive commit message" |
| 38 | + ``` |
| 39 | + |
| 40 | +3. **Push Changes to Your Fork** |
| 41 | + ``` |
| 42 | + git push origin feature/your-feature-name |
| 43 | + ``` |
| 44 | + |
| 45 | +4. **Create a Pull Request** |
| 46 | + Go to the original ragas repository and create a new pull request from your feature branch. |
| 47 | + |
| 48 | +## Coding Standards |
| 49 | + |
| 50 | +- Follow PEP 8 guidelines for Python code. |
| 51 | +- Use type hints where possible. |
| 52 | +- Write docstrings for all functions, classes, and modules. |
| 53 | +- Ensure all tests pass before submitting a pull request. |
| 54 | + |
| 55 | +You can run the following command to check for code style issues: |
| 56 | +```bash |
| 57 | +make run-ci |
| 58 | +``` |
| 59 | + |
| 60 | +## Running Tests |
| 61 | + |
| 62 | +To run the test suite: |
| 63 | + |
| 64 | +```bash |
| 65 | +make tests |
| 66 | +``` |
| 67 | + |
| 68 | +## Documentation |
| 69 | + |
| 70 | +- Update documentation for any new features or changes to existing functionality. |
| 71 | +- Use [Google style](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) for docstrings. |
| 72 | + |
| 73 | +## Submitting Pull Requests |
| 74 | + |
| 75 | +1. Ensure your code adheres to the project's coding standards. |
| 76 | +2. Include tests for new functionality. |
| 77 | +3. Update documentation as necessary. |
| 78 | +4. Provide a clear description of the changes in your pull request. |
| 79 | + |
| 80 | +Thank you for contributing to ragas! |
0 commit comments