Thank you for your interest in contributing to GeoQA! This document provides guidelines and instructions for contributing.
- Python 3.9+
- Git
- A code editor (VS Code recommended)
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/geoqa.git cd geoqa -
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # Linux/Mac .venv\Scripts\activate # Windows
-
Install in development mode:
pip install -e ".[dev]" -
Run tests to verify setup:
pytest
-
Create a branch for your work:
git checkout -b feature/your-feature-name
-
Make your changes following the code style guidelines below.
-
Write tests for new functionality.
-
Run the test suite:
pytest
-
Format your code:
black geoqa/ tests/ isort geoqa/ tests/
-
Commit your changes with a clear message:
git commit -m "feat: add new quality check for overlapping features" -
Push and create a Pull Request.
- Formatter: Black (line length = 100)
- Import sorting: isort (black profile)
- Linter: Ruff
- Type hints: Required for all public functions
- Docstrings: Google-style docstrings for all public modules, classes, and functions
def check_validity(gdf: gpd.GeoDataFrame) -> dict[str, Any]:
"""Check geometry validity for all features.
Args:
gdf: The GeoDataFrame to validate.
Returns:
Dictionary with valid_count, invalid_count, and invalid_indices.
Raises:
ValueError: If the GeoDataFrame has no geometry column.
"""
...Follow Conventional Commits:
feat:— New featurefix:— Bug fixdocs:— Documentation changestest:— Test additions/modificationsrefactor:— Code refactoringstyle:— Formatting changeschore:— Build/CI changes
- Write tests in the
tests/directory using pytest. - Aim for comprehensive coverage of new functionality.
- Use fixtures for common test data.
Be respectful and constructive. We follow the Contributor Covenant Code of Conduct.
Open an issue or start a discussion on GitHub. We're happy to help!