Spaces:
Sleeping
Sleeping
Merge pull request #9 from CintraAI/chore/add-CONTRIBUTING-and-gitignore
Browse filesFiles changed (2)
- .gitignoreAdded+53
- CONTRIBUTING.mdAdded+110
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253# Python cache files__pycache__/*.py[cod]*$py.class*.so.Pythonbuild/develop-eggs/dist/downloads/eggs/.eggs/lib/lib64/parts/sdist/var/wheels/*.egg-info/.installed.cfg*.egg
# Code parser cache~/.code_parser_cache/.code_parser_cache/
# Tree-sitter build artifacts*.sobuild/
# Virtual environmentsvenv/env/ENV/.env/.venv/env.bak/venv.bak/
# Editor/IDE files.idea/.vscode/*.swp*.swo.DS_Store.ipynb_checkpoints
# Local configuration.local/.history/
# Logs*.log123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110# Contributing to Code Chunker
Thank you for your interest in contributing to Code Chunker! This document provides guidelines and information for contributing to this project.
## Table of Contents- [Code of Conduct](#code-of-conduct)- [Getting Started](#getting-started)- [How to Contribute](#how-to-contribute)- [Development Setup](#development-setup)- [Pull Request Process](#pull-request-process)- [Testing Guidelines](#testing-guidelines)- [Style Guidelines](#style-guidelines)
## Code of Conduct
By participating in this project, you agree to maintain a respectful and inclusive environment. We expect all contributors to:- Use welcoming and inclusive language- Be respectful of differing viewpoints and experiences- Gracefully accept constructive criticism- Focus on what is best for the community
## Getting Started
1. Fork the repository2. Clone your fork locally3. Create a new branch for your feature or bugfix4. Make your changes following our guidelines5. Push to your fork6. Submit a Pull Request
## How to Contribute
There are several ways to contribute to Code Chunker:
1. **Bug Reports**: Submit detailed bug reports using the GitHub issue tracker2. **Feature Requests**: Propose new features through GitHub issues3. **Code Contributions**: Submit Pull Requests with improvements or new features4. **Documentation**: Help improve or translate documentation5. **Testing**: Add or improve test coverage
## Pull Request Process
1. Update the README.md with details of changes if applicable2. Add appropriate unit tests for any new functionality3. Ensure all tests pass by running: ```bash python -m unittest discover ```4. Update documentation as needed5. Ensure your code follows our style guidelines6. Create a Pull Request with a clear title and description
## Testing Guidelines
- Write unit tests for all new functionality- Maintain or improve code coverage- Follow the existing test structure in `test_code_chunker.py`- Test multiple file types and edge cases- Include both positive and negative test cases
### Test Examples- Test basic functionality with simple code files- Test edge cases (empty files, large files)- Test different programming languages (Python, JavaScript, CSS, etc.)- Test with various token limits- Test error handling scenarios
## Style Guidelines
### Python Code Style- Follow PEP 8 guidelines- Use type hints for function parameters and return values- Keep functions focused and single-purpose- Write clear docstrings for classes and functions- Use meaningful variable and function names
### Code Organization- Keep related functionality together- Maintain clear separation of concerns- Follow the existing project structure- Use appropriate design patterns
## Language Support
When adding support for new programming languages:1. Update the `language_extension_map` in `CodeParser.py`2. Add appropriate node types in `_get_node_types_of_interest`3. Include test files for the new language4. Update documentation accordingly
## Documentation
- Keep README.md up to date- Document all new features- Include docstrings for new functions and classes- Add comments for complex logic- Update API documentation if applicable
## Questions or Need Help?
Feel free to:- Open an issue for general questions- Join our discussions in GitHub Discussions- Reach out to maintainers for guidance
## License
By contributing to Code Chunker, you agree that your contributions will be licensed under the same license as the main project.
Thank you for contributing to Code Chunker!.gitignoreAdded+53
CONTRIBUTING.mdAdded+110