Contributing¶
Thank you for your interest in contributing to cysox!
Development Setup¶
-
Clone the repository:
-
Install development dependencies:
-
Install libsox (see Installation).
-
Build the extension:
-
Run tests:
Code Style¶
- Follow PEP 8 for Python code
- Use type hints where possible
- Add docstrings to public functions and classes
- Keep lines under 100 characters
Testing¶
All changes must include tests:
# Run all tests
make test
# Run specific test file
pytest tests/test_sox_format.py
# Run with coverage
pytest --cov=cysox
Test requirements:
- All tests must pass
- New features need test coverage
- Bug fixes should include regression tests
Documentation¶
Build documentation locally:
Documentation is built with MkDocs. Add docstrings following Google style or NumPy style.
Pull Request Process¶
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests (
make test) - Update documentation if needed
- Submit a pull request
Commit Messages¶
Use clear, descriptive commit messages:
Add null pointer checks to EncodingInfo properties
- Added validation to compression, reverse_bytes, reverse_nibbles,
reverse_bits, and opposite_endian properties
- Raises RuntimeError if pointer is NULL
Reporting Issues¶
When reporting bugs, include:
- Python version
- Operating system
- cysox version (
cysox.__version__) - Minimal reproduction code
- Full error traceback
License¶
By contributing, you agree that your contributions will be licensed under the same license as the project (MIT).