Contributing
Contributions are welcome — bug fixes, new indices, documentation improvements, and test cases are all appreciated.
Setting up a development environment
git clone https://github.com/geoharkat/landsat9geo.git
cd landsat9geo
pip install -e ".[dev,viz]"
pytest # run the test suite
Coding standards
Safe division only — every band ratio must use
safe_ratio(). Never writea / bdirectly.Type hints on all public function signatures.
No hardcoded paths — file paths are always function arguments.
DEFLATE compression in all GeoTIFF outputs.
CRS rule — always reproject the vector to the raster CRS, never the other way round.
Place new features in the correct module (see Introduction → Architecture).
Adding a new spectral index
Add the function to
src/landsat9geo/indices.pyusingsafe_ratio.Include it in
compute_all_ratios()if it should be part of the standard batch.Export it in
__init__.pyif it is a commonly used public function.Add a test in
tests/test_core.py.Document the geological purpose in the function docstring.
Running tests
pytest -v
Submitting a pull request
Fork the repository.
Create a feature branch:
git checkout -b feature/my-indexCommit your changes:
git commit -m "Add laterite index"Push:
git push origin feature/my-indexOpen a Pull Request against
main.
Please include a short geological explanation of why the new index/feature is useful.
Reporting issues
Use the GitHub Issues page. When reporting a bug, include:
Your Python and
landsat9geoversion (python --version,python -c "import landsat9geo; print(landsat9geo.__version__)").The full traceback.
A minimal reproducing example if possible.