Conversation
- Add OAuth2 authentication with token refresh - Add S2 product search and download - Add caching for search results and downloads - Add robust download with retry and resume - Add input validation and utilities - Add basic S2 tests
- Use client.session.get() for connection pooling - Improves download speed (20.6 MB/s vs 6.6 MB/s) - Maintains session consistency across all requests
- Add python-dotenv>=1.0.0 for .env file loading - Add requests>=2.31.0 for HTTP requests - Fixes CI/CD build failure: ModuleNotFoundError: No module named 'dotenv'
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
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.
Summary
This PR adds the foundational Copernicus Data Space Ecosystem client for fetching Sentinel-2 satellite imagery. This is the first of 3 PRs to add complete Copernicus support to Galileo as an alternative data source to Google Earth Engine.
What's Included
Core Infrastructure
requests.Sessionfor improved performanceS2 Functionality
Supporting Files
.env.example- Template for Copernicus credentialstests/test_copernicus_s2_basic.py- 18 unit tests with mocked API callstests/manual_test_s2_download.py- Manual integration test scriptArchitecture
The client uses a modular design where:
CopernicusClienthandles authentication and coordinations2.pycontains all S2-specific logicdownload_utils.pyprovides reusable download functionalityutils.pycontains shared validation and conversion functionsUsage Example
Testing
Unit Tests (18/18 passing)
Integration Tests (Verified)
Test Coverage
Dependencies Added
python-dotenv>=1.0.0- For loading.envconfiguration filesrequests>=2.31.0- For HTTP requests (was only type stubs before)What's NOT in This PR
As specified in the PR split plan, this PR intentionally excludes:
Breaking Changes
None. This is a new feature that doesn't affect existing functionality.
Credentials Setup
Users need free Copernicus credentials:
.envfile:Next Steps
Related Issues
Part of the Copernicus Data Space Ecosystem integration to provide an alternative to Google Earth Engine for data fetching.