-
Notifications
You must be signed in to change notification settings - Fork 440
implement recursive search for GOES products across hour boundaries #3862
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
Open
migratesky
wants to merge
7
commits into
Unidata:main
Choose a base branch
from
migratesky:Make-remote-clients-more-robust-#3842
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5618dcf
implement recursive search for GOES products across hour boundaries
1bb7acc
Fix lint errors
fdfbad4
Fix Lint Errors
864ae02
Move the test file to the appropriate location.
de41f71
update AWS S3 endpoint URLs and authentication headers for remote…
37298fb
Merge remote-tracking branch 'upstream/main' into Make-remote-clients…
9ff2229
FIx lint errors
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/usr/bin/env python | ||
| # Copyright (c) 2015-2025 MetPy Developers. | ||
| """Test script to verify the robustness of the GOES client at hour boundaries. | ||
|
|
||
| This script tests the recursive search implementation for finding products | ||
| across hour boundaries. | ||
| """ | ||
| import logging | ||
| from datetime import datetime, timezone | ||
|
|
||
| from metpy.remote import GOESArchive | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| def test_goes_hour_boundary(): | ||
| """Test the GOES client's ability to find products across hour boundaries.""" | ||
| # Create a GOES client | ||
| goes = GOESArchive(16) | ||
| # Test case 1: Exact hour boundary | ||
| try: | ||
| dt = datetime(2025, 1, 1, 0, 0, 0, tzinfo=timezone.utc) | ||
| goes.get_product('ABI-L1b-RadC', dt, band=1) | ||
| except Exception: | ||
| logger.exception('Failed to get product at exact hour boundary') | ||
| # Test case 2: Just after hour boundary | ||
| try: | ||
| dt = datetime(2025, 1, 1, 0, 0, 30, tzinfo=timezone.utc) | ||
| goes.get_product('ABI-L1b-RadC', dt, band=1) | ||
| except Exception: | ||
| logger.exception('Failed to get product just after hour boundary') | ||
| # Test case 3: Just before hour boundary | ||
| try: | ||
| dt = datetime(2025, 1, 1, 0, 59, 30, tzinfo=timezone.utc) | ||
| goes.get_product('ABI-L1b-RadC', dt, band=1) | ||
| except Exception: | ||
| logger.exception('Failed to get product just before hour boundary') | ||
| # Test case 4: Day boundary | ||
| try: | ||
| dt = datetime(2025, 1, 1, 0, 0, 0, tzinfo=timezone.utc) | ||
| goes.get_product('ABI-L1b-RadC', dt, band=1) | ||
| except Exception: | ||
| logger.exception('Failed to get product at day boundary') | ||
|
|
||
| if __name__ == '__main__': | ||
|
Check failure on line 44 in test_goes_client.py
|
||
| test_goes_hour_boundary() | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Check notice
Code scanning / CodeQL
Empty except Note