CintraAI/code-chunker
5
1# Contributing to Code Chunker2 3Thank you for your interest in contributing to Code Chunker! This document provides guidelines and information for contributing to this project.4 5## Table of Contents6- [Code of Conduct](#code-of-conduct)7- [Getting Started](#getting-started)8- [How to Contribute](#how-to-contribute)9- [Development Setup](#development-setup)10- [Pull Request Process](#pull-request-process)11- [Testing Guidelines](#testing-guidelines)12- [Style Guidelines](#style-guidelines)13 14## Code of Conduct15 16By participating in this project, you agree to maintain a respectful and inclusive environment. We expect all contributors to:17- Use welcoming and inclusive language18- Be respectful of differing viewpoints and experiences19- Gracefully accept constructive criticism20- Focus on what is best for the community21 22## Getting Started23 241. Fork the repository252. Clone your fork locally263. Create a new branch for your feature or bugfix274. Make your changes following our guidelines285. Push to your fork296. Submit a Pull Request30 31## How to Contribute32 33There are several ways to contribute to Code Chunker:34 351. **Bug Reports**: Submit detailed bug reports using the GitHub issue tracker362. **Feature Requests**: Propose new features through GitHub issues373. **Code Contributions**: Submit Pull Requests with improvements or new features384. **Documentation**: Help improve or translate documentation395. **Testing**: Add or improve test coverage40 41## Pull Request Process42 431. Update the README.md with details of changes if applicable442. Add appropriate unit tests for any new functionality453. Ensure all tests pass by running:46 ```bash47 python -m unittest discover48 ```494. Update documentation as needed505. Ensure your code follows our style guidelines516. Create a Pull Request with a clear title and description52 53## Testing Guidelines54 55- Write unit tests for all new functionality56- Maintain or improve code coverage57- Follow the existing test structure in `test_code_chunker.py`58- Test multiple file types and edge cases59- Include both positive and negative test cases60 61### Test Examples62- Test basic functionality with simple code files63- Test edge cases (empty files, large files)64- Test different programming languages (Python, JavaScript, CSS, etc.)65- Test with various token limits66- Test error handling scenarios67 68## Style Guidelines69 70### Python Code Style71- Follow PEP 8 guidelines72- Use type hints for function parameters and return values73- Keep functions focused and single-purpose74- Write clear docstrings for classes and functions75- Use meaningful variable and function names76 77### Code Organization78- Keep related functionality together79- Maintain clear separation of concerns80- Follow the existing project structure81- Use appropriate design patterns82 83## Language Support84 85When adding support for new programming languages:861. Update the `language_extension_map` in `CodeParser.py`872. Add appropriate node types in `_get_node_types_of_interest`883. Include test files for the new language894. Update documentation accordingly90 91## Documentation92 93- Keep README.md up to date94- Document all new features95- Include docstrings for new functions and classes96- Add comments for complex logic97- Update API documentation if applicable98 99## Questions or Need Help?100 101Feel free to:102- Open an issue for general questions103- Join our discussions in GitHub Discussions104- Reach out to maintainers for guidance105 106## License107 108By contributing to Code Chunker, you agree that your contributions will be licensed under the same license as the main project.109 110Thank you for contributing to Code Chunker!