Thank you for your interest in contributing to Raster-threading! This document provides guidelines for contributing to the project.
First, install GDAL system libraries:
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install libgdal-dev gdal-binmacOS (using Homebrew):
brew install gdalWindows: Install GDAL using OSGeo4W or conda:
conda install -c conda-forge gdal- Clone the repository:
git clone https://github.com/RichardScottOZ/Raster-threading.git
cd Raster-threading- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Install development dependencies:
pip install pytest pytest-covRun all tests:
pytest test_raster_threading.py -vRun tests with coverage:
pytest test_raster_threading.py --cov=raster_threading --cov-report=termRun specific test classes:
pytest test_raster_threading.py::TestSingleThread -v
pytest test_raster_threading.py::TestConcurrentReads -v
pytest test_raster_threading.py::TestStress -vThis project follows PEP 8 style guidelines. Please ensure your code:
- Uses meaningful variable and function names
- Includes docstrings for all public functions
- Has proper type hints where applicable
- Maintains the existing code structure
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Make your changes
- Add or update tests as needed
- Ensure all tests pass
- Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
- Provide a clear description of the changes
- Reference any related issues
- Ensure CI tests pass
- Keep changes focused and atomic
- Update documentation if needed
When reporting issues, please include:
- Python version
- GDAL version
- Operating system
- Steps to reproduce the issue
- Expected vs actual behavior
- Error messages or stack traces
This project emphasizes thread-safe GDAL operations. When adding features:
- Test single-threaded behavior first
- Add concurrent tests for thread safety
- Include stress tests with higher thread counts
- Test both GeoTIFF and ERS formats
Feel free to open an issue for questions or discussion!