Map could read remote file from result of Fido.search(), without downloading file explicitly

Open
#6,408 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, data

Research direction

Start by tracing the object returned by Fido.search() and how Fido.fetch() passes its URL to parfive.Downloader.download(), then compare that with Map()'s existing URL handling. Done means Map() accepts a Fido.search() result, obtains its remote file URL, and behaves as it does for a directly supplied URL.

Written by the indexing model from the issue text.

Description

Discussion Feature Request net
Describe the feature

The Map() constructor can read a local file, e.g. after download by Fido.search(). It can also read a remote file, specified by its URL.

The idea would be to allow reading a remote file specified as an item of the result from Fido.search().

Rationale:

  • one step less for simple, quick tasks
  • no need for the code to manage file names
  • no need to store files used only once
    • (maybe there is still caching?)
Proposed solution

The URL of the file must be somewhere in the Fido.search() result (although I couldn't find it), as it is used by parfive.Downloader.download() called by Fido.fetch().

When Map() is called with a Fido.search() result, the proposed solution is to take this URL, then behave exactly how Map() behaves when called with an URL.

Dominant language
Python
Stars
1k
Forks
682
Avg merge
1d 17h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunpy/sunpy

All issues in sunpy/sunpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.