feat: use new ace url#79
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ACE solar wind ingestion to pull daily source files from the new NASA/SoHO FTP URL and adjusts processing/tests to match the new filename conventions and file formats.
Changes:
- Switched ACE source URL and moved to date-stamped source filenames for MAG/SWEPAM inputs.
- Updated
download_and_processto operate on a(start_time, end_time)interval and process per-day downloads. - Refreshed ACE unit tests to mock
requests.getand validate multi-day downloads and derived fields.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| swvo/io/solar_wind/ace.py | Switches ACE source URL + introduces date-templated source filenames and interval-based downloading/processing. |
| tests/io/solar_wind/test_ace.py | Updates fixtures/mocks and assertions to match the new daily file format and download behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| LABEL = "ace" | ||
|
|
||
| def download_and_process(self, request_time: datetime) -> None: | ||
| def download_and_process(self, start_time: datetime, end_time: datetime) -> None: |
Comment on lines
+83
to
+86
| start_time = enforce_utc_timezone(start_time) | ||
| end_time = enforce_utc_timezone(end_time) | ||
|
|
||
| if current_time - request_time > timedelta(hours=2): | ||
| logger.debug("We can only download and process ACE RT data for the last two hours!") | ||
| return | ||
| assert start_time < end_time, "Start time must be before end time!" |
Comment on lines
73
to
+74
| AssertionError | ||
| If the request_time is in the future. | ||
| If the requested interval is invalid or extends into a future UTC date. |
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.
No description provided.