soildb v0.4.0
Major release with API consolidation, improved developer experience, and production readiness.
Breaking Changes: See "Changed" section for migration details. Old API functions have straightforward replacements.
Added
- Unified spatial query API: Single
spatial_query()function for all geometry types - Unified bulk fetch API: Single
fetch_by_keys()function replacing specialized functions - Synchronous API wrapper:
.sync()decorator for all async functions for easier interactive use - SoilProfileCollection integration: Export soil horizon data to soilprofilecollection objects
- Soil water availability workflows: Integrated AWDB + SDA for comprehensive soil-water analysis
- Modular schema system: Improved schema architecture for extensibility
- Consolidated type mapping: Unified approach to type conversion across all data types
- Enhanced exception hierarchy: Structured error types (SDANetworkError, SDAQueryError, AWDBError)
- ResponseValidator: Improved response parsing and validation
- Error handling guide: Comprehensive documentation on handling network and query errors
- Troubleshooting guide: Solutions for common issues and performance optimization
Changed
- Breaking: Removed legacy
SpatialQueryandQueryBuilderclasses (useQuery()instead) - Breaking: Removed specialized fetch functions (use
fetch_by_keys()instead)fetch_mapunit_polygon()→fetch_by_keys(..., "mupolygon")fetch_component_by_mukey()→fetch_by_keys(..., "component", "mukey")fetch_chorizon_by_cokey()→fetch_by_keys(..., "chorizon", "cokey")fetch_survey_area_polygon()→fetch_by_keys(..., "sapolygon")
- Breaking: Removed spatial query functions (use
spatial_query()instead)query_mupolygon(),query_sapolygon(),query_featpoint(),query_featline()
- Breaking: Removed
soildb.modelsmodule (usesoildb.schema_systeminstead) - Sync API is now the primary documented interface (async available for advanced users)
- Improved fetch hierarchy with better pagination strategies
- Enhanced metadata parsing from fgdcmetadata column
Fixed
- SDA empty response handling
- SDAResponse data_quality_score calculation
- Custom column name generalization in high-level schemas
- Type annotations and mypy compliance
- Response validation for edge cases
Dependencies
- Added: hatchling (build system)
- Added: editables (editable installs)
- Added: build, quartodoc, quarto (documentation tools)
- Improved: pandas, polars, soilprofilecollection support
What's Changed
Full Changelog: https://github.com/brownag/py-soildb/commits/0.4.0