Skip to content

refactor: use API to fetch Hp index#52

Merged
sahiljhawar merged 2 commits intoGFZ:mainfrom
sahiljhawar:hp-ftp
Feb 13, 2026
Merged

refactor: use API to fetch Hp index#52
sahiljhawar merged 2 commits intoGFZ:mainfrom
sahiljhawar:hp-ftp

Conversation

@sahiljhawar
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 13, 2026 09:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Hp GFZ data source to fetch Hp index data from the GFZ JSON API instead of downloading text files via FTP.

Changes:

  • Replace FTP-based downloads with requests.get() calls to the GFZ JSON API and persist responses as temporary JSON.
  • Update _process_single_file to parse the JSON response into a pandas DataFrame.
  • Adjust and extend tests to reflect the new download and processing flow, including URL construction expectations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
swvo/io/hp/gfz.py Switches Hp downloads from FTP to GFZ JSON API and updates parsing accordingly.
tests/io/hp/test_hp.py Updates unit tests for the new JSON/API-based implementation and adds URL-construction coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sahiljhawar sahiljhawar merged commit df2896f into GFZ:main Feb 13, 2026
6 of 7 checks passed
@sahiljhawar sahiljhawar deleted the hp-ftp branch February 13, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant