-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add comprehensive STAC catalog support #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Implement core STAC functionality in new stac.py module - Add STAC I/O methods to IOMixin: - to_stac_item() and from_stac_item() for dataset conversion - to_stac_collection() for multi-dataset collections - save_stac_item() and save_stac_collection() for file output - load_stac_item() and load_stac_collection() for file input - Add comprehensive unit tests for all STAC functionality - Add STAC as an optional dependency in pyproject.toml - Include STAC support documentation and proposal
…d documentation - Implement STAC Item and Collection export/import functionality - Add spatial metadata validation and bbox extraction with coordinate fallback - Add temporal extent inference from time coordinates - Implement multi-asset STAC collection creation - Add comprehensive test suite (27 STAC-specific tests, 242 total tests passing) - Add complete documentation: STAC catalogs, spatial metadata, geospatial workflows - Add STAC examples to examples.md - Update mkdocs.yml and index.md with STAC documentation links - Fix mfdataset.md anchor link for API documentation - Update pixi.toml and pyproject.toml with STAC dependencies and configuration cleanup - Achieve 89% test coverage for STAC module, 82% overall coverage
- Add STAC Catalogs user guide with complete API reference and examples - Add Spatial Metadata guide covering extent, validation, and coordinate systems - Add Geospatial Workflows guide with 6 real-world workflow examples - Add comprehensive test suite with 27 STAC-specific tests (100% passing) Documentation includes: - Basic STAC Item/Collection creation and usage - Spatial metadata validation and bbox extraction - Temporal extent inference - Multi-asset collection creation - Regional datasets and custom extents - Complete roundtrip workflows - Integration examples with CF compliance and data generation - Best practices and error handling Test coverage: - 27 STAC-specific tests across 8 test classes - Tests for Items, Collections, spatial validation, temporal extent - File I/O, error handling, and integration tests - 89% coverage for STAC module
- Lock file updated after adding pystac, pyproj, shapely, and other STAC dependencies - Ensures reproducible environments across all platforms
Resolved merge conflicts: - Removed pixi.toml (moved to pyproject.toml in main) - Updated pyproject.toml with main's structure + STAC dependencies - Regenerated pixi.lock with STAC packages (pystac, pyproj, shapely, cftime) - Accepted main's configuration improvements (hatchling, pixi features)
- Sort imports in core.py, io.py, stac.py - Sort imports in test_io.py, test_stac.py - All formatting checks now pass
- Move yaml import to top of file (E402) - Add pystac.Collection to TYPE_CHECKING imports - Add noqa comments for pystac availability checks - Fix blind exception assertions in tests (use ValueError/KeyError) - Remove unused imports (auto-fixed by ruff) All ruff checks now pass.
The linting fix incorrectly changed Exception to ValueError, but the actual code raises STACError. Reverted to Exception with comment indicating STACError. All 242 tests now passing.
Import STACError from dummyxarray.stac and use it directly in error handling tests to avoid B017 linting error (blind exception assertion). All linting checks and 242 tests now passing.
Break long lines in overview sections to comply with MD013 (120 char limit): - geospatial-workflows.md: Split overview description - spatial-metadata.md: Split overview into 3 lines - stac-catalogs.md: Split STAC description All markdown linting checks now pass.
These imports were auto-removed by ruff --fix but not committed. The imports were genuinely unused in these specific test functions: - test_to_stac_item_basic - test_to_stac_collection_basic - test_stac_roundtrip - test_save_load_stac_item_roundtrip All linting checks now pass.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds complete STAC (SpatioTemporal Asset Catalog) support to dummyxarray, enabling export/import of datasets as STAC Items and Collections with full spatial and temporal metadata handling.
Features Implemented
Core STAC Functionality
Spatial Metadata
Temporal Metadata
Documentation
User Guides (3 comprehensive guides)
Examples
Testing
Test categories:
Configuration Updates
Merge Conflicts Note
These will need to be resolved during merge.
Breaking Changes
None - all new functionality is additive.
Checklist