|
| 1 | +# Contributing to Anyparser Core |
| 2 | + |
| 3 | +First off, thank you for considering contributing to Anyparser Core! It's people like you that make Anyparser Core such a great tool for AI data preparation. |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +By participating in this project, you are expected to uphold our Code of Conduct: |
| 8 | + |
| 9 | +- Use welcoming and inclusive language |
| 10 | +- Be respectful of differing viewpoints and experiences |
| 11 | +- Gracefully accept constructive criticism |
| 12 | +- Focus on what is best for the community |
| 13 | +- Show empathy towards other community members |
| 14 | + |
| 15 | +## How Can I Contribute? |
| 16 | + |
| 17 | +### Reporting Bugs |
| 18 | + |
| 19 | +Before creating bug reports, please check the issue list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible: |
| 20 | + |
| 21 | +* **Use a clear and descriptive title** |
| 22 | +* **Describe the exact steps which reproduce the problem** |
| 23 | +* **Provide specific examples to demonstrate the steps** |
| 24 | +* **Describe the behavior you observed after following the steps** |
| 25 | +* **Explain which behavior you expected to see instead and why** |
| 26 | +* **Include any error messages or stack traces** |
| 27 | + |
| 28 | +> **Note:** When reporting bugs, do not include any sensitive information or API keys. |
| 29 | +
|
| 30 | +### Suggesting Enhancements |
| 31 | + |
| 32 | +Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include: |
| 33 | + |
| 34 | +* **Use a clear and descriptive title** |
| 35 | +* **Provide a step-by-step description of the suggested enhancement** |
| 36 | +* **Provide specific examples to demonstrate the steps** |
| 37 | +* **Describe the current behavior and explain the behavior you expected to see** |
| 38 | +* **Explain why this enhancement would be useful for AI data preparation** |
| 39 | + |
| 40 | +### Pull Requests |
| 41 | + |
| 42 | +* Fork the repo and create your branch from `main` |
| 43 | +* If you've added code that should be tested, add tests |
| 44 | +* If you've changed APIs, update the documentation |
| 45 | +* Ensure the test suite passes |
| 46 | +* Make sure your code lints |
| 47 | +* Issue that pull request! |
| 48 | + |
| 49 | +## Development Process |
| 50 | + |
| 51 | +1. Fork the repository |
| 52 | +2. Create a new branch for your feature or bugfix: `git checkout -b feature-name` |
| 53 | +3. Make your changes |
| 54 | +4. Write or update tests as needed |
| 55 | +5. Run the test suite |
| 56 | +6. Push to your fork and submit a pull request |
| 57 | + |
| 58 | +### Setting Up Development Environment |
| 59 | + |
| 60 | +```bash |
| 61 | +# Clone your fork |
| 62 | +git clone https://github.com/your-username/anyparser_core.git |
| 63 | +cd anyparser_core |
| 64 | + |
| 65 | +# Prerequisites |
| 66 | +# Make sure you have Poetry installed on your system |
| 67 | +# Visit https://python-poetry.org/docs for installation instructions |
| 68 | + |
| 69 | +# Install dependencies (including dev dependencies) |
| 70 | +make install-dev |
| 71 | + |
| 72 | +# Or alternatively using Poetry directly: |
| 73 | +poetry install --with dev |
| 74 | +``` |
| 75 | + |
| 76 | +### Running Tests |
| 77 | + |
| 78 | +```bash |
| 79 | +# Run tests with verbose output |
| 80 | +make test |
| 81 | + |
| 82 | +# Run tests with coverage report |
| 83 | +make coverage |
| 84 | + |
| 85 | +# View coverage report in browser |
| 86 | +make coverage-view |
| 87 | +``` |
| 88 | + |
| 89 | +### Code Style |
| 90 | + |
| 91 | +We use the following tools to maintain code quality: |
| 92 | + |
| 93 | +* **Black** for code formatting |
| 94 | + |
| 95 | +Please ensure your code passes all linting checks: |
| 96 | + |
| 97 | +```bash |
| 98 | +# Format code with Black |
| 99 | +make lint |
| 100 | +``` |
| 101 | + |
| 102 | +## Documentation |
| 103 | + |
| 104 | +* Keep docstrings up to date |
| 105 | +* Follow Google-style docstring format |
| 106 | +* Update README.md if needed |
| 107 | +* Add examples for new features |
| 108 | + |
| 109 | +## Core Focus Areas |
| 110 | + |
| 111 | +We especially welcome contributions in these areas: |
| 112 | + |
| 113 | +1. **AI Data Preparation Enhancements** |
| 114 | + - Improvements to RAG-focused features |
| 115 | + - Better support for AI model training data extraction |
| 116 | + - Enhanced structured data extraction |
| 117 | + |
| 118 | +2. **Performance Optimizations** |
| 119 | + - Speed improvements for large document processing |
| 120 | + - Memory usage optimizations |
| 121 | + - Batch processing enhancements |
| 122 | + |
| 123 | +3. **New Model Support** |
| 124 | + - Integration with new OCR models |
| 125 | + - Support for additional document types |
| 126 | + - Enhanced language support |
| 127 | + |
| 128 | +4. **Documentation and Examples** |
| 129 | + - Better examples for AI/ML use cases |
| 130 | + - Improved API documentation |
| 131 | + - Tutorial content |
| 132 | + |
| 133 | +## Community |
| 134 | + |
| 135 | +* Join our [Community Discussions](https://github.com/anyparser/anyparser_core/discussions) |
| 136 | +* Follow our [GitHub repository](https://github.com/anyparser/anyparser_core) |
| 137 | +* Check out our [Documentation](https://docs.anyparser.com) |
| 138 | + |
| 139 | +## License |
| 140 | + |
| 141 | +By contributing to Anyparser Core, you agree that your contributions will be licensed under its Apache-2.0 license. |
0 commit comments