Repository navigation
[GH-2142] Fix STAC python unit tests for remote endpoint - #2143
Merged
jiayuasu merged 6 commits intoJul 23, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes flaky STAC Python unit tests by removing dependencies on external service data consistency. The changes focus on testing API functionality rather than validating specific data counts from the external Planetary Computer STAC endpoint, which can return inconsistent results.
- Replaces specific count assertions with type checks to verify API returns expected object types
- Removes data validation checks that depend on external service consistency
- Updates documentation to support additional URL schemes for better testability
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/tests/stac/test_collection_client.py | Replaces DataFrame count checks with type assertions and removes item count validations |
| python/tests/stac/test_client.py | Changes item count checks to Iterator type assertions for search results |
| python/sedona/spark/stac/collection_client.py | Updates URL handling documentation and logic to support local file paths |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into bugfix/flaky.stac.client.tests
jiayuasu
approved these changes
Jul 23, 2025
Kontinuation
pushed a commit
to Kontinuation/sedona
that referenced
this pull request
Jan 21, 2026
…e#2143) * Fix STAC python unit tests for remote endpoint * fix lint error * Update python/tests/stac/test_collection_client.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update python/tests/stac/test_client.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * revert collection_client change --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-XXX] my subject. Closes #<issue_number>What changes were proposed in this PR?
The current stac reader python API depends on the following external stac service endpoint:
https://planetarycomputer.microsoft.com/api/stac/v1
While the endpoint is generally reliable, sometimes it will return incorrect / inconsistent data that failed the test when count the items returned. In order to make the tests more reliable, we'd only test the api itself, but not check the data correctness returned from the external services.
How was this patch tested?
stac python tests
Did this PR include necessary documentation updates?