Contributing¶
Thank you for your interest in contributing to speclib.
Development Setup¶
git clone https://github.com/chrislyonsKY/speclib.git
cd speclib
pip install -e ".[all]"
pre-commit install
Code Standards¶
- Python 3.11+ with type hints on all function signatures
- Google-style docstrings
rufffor linting and formattingpathlib.Pathfor all file operationsnumpyfor spectral array operations (no pandas in core)
Testing¶
- Tests mirror the
src/directory structure - Ingestion adapters require integration tests against sample data
- Export formats require round-trip tests
- Spectral resampling must be validated against USGS references
Pull Requests¶
- Fork the repository
- Create a feature branch from
main - Write tests for new functionality
- Ensure
ruff checkandpytestpass - Submit a pull request with a clear description
Contributing Spectral Data¶
Researchers can contribute calibrated spectral data to the library via Pull Request.
Requirements¶
- Calibrated reflectance only (0.0-1.0 scale). Uncalibrated or raw DN data is not accepted.
- Institutional affiliation required — you must provide a verifiable affiliation (university, agency, lab).
- Supported measurement types: laboratory, field, and airborne (drone/aircraft).
- See Quality Standards for full requirements.
How to Contribute¶
- Fork the repository
- Copy
data/contributions/TEMPLATE/todata/contributions/your-name/ - Fill in
contribution.yamlwith your metadata (name, affiliation, instrument, calibration method) - Add your CSV data files (columns:
wavelength_um,reflectance,error) - Submit a Pull Request
The CI pipeline automatically validates your data format. A maintainer will review your credentials, instrument setup, and data quality before approving the PR.
Contributed spectra enter the library as COMMUNITY tier and may be promoted to CURATED status after additional verification.
Reporting Issues¶
Use GitHub Issues for bug reports and feature requests.
License¶
By contributing, you agree that your contributions will be licensed under GPL-3.0-only.