Allow the download command to use a different server
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start at the physionet download command and trace how it calls the Python download() function, which already accepts base_url. Add a CLI --base-url option that passes the value through, then check the command help and existing download tests. Done when the CLI can use a custom PhysioNet host for API calls and file downloads; account for the note that --source auto may still use the AWS mirror.
Written by the indexing model from the issue text.
Description
physionet download always fetches from https://physionet.org (or the AWS mirror). The Python download() function already takes a base_url argument, but the command line has no way to set it.
This matters for physionet-build (MIT-LCP/physionet-build#2807), which shows a physionet download command on published project pages alongside the wget command:
- The
wgetcommand follows the server'sBULK_DOWNLOAD_HOSTNAMEsetting, so bulk downloads can be promoted under a different hostname from the one used for browsing. The package command can't follow it. - Other deployments of physionet-build can't show a working package command, because it always points at physionet.org.
Proposal
Add a --base-url option to physionet download (and possibly a PHYSIONET_BASE_URL environment variable), passed through to download().
Notes:
- The client uses the same base URL for API calls (
/api/v1/) and file downloads, so the host given must serve both. Alternatively, we could take a separate option for the file host only. - With
--source auto, open data may still come from the AWS mirror.--base-urlwould only change the PhysioNet host. - Once released, physionet-build can add
--base-urlto the displayed command only whenBULK_DOWNLOAD_HOSTNAMEis set, and note the minimum package version.
- Dominant language
- Python
- Stars
- 82
- Forks
- 22
- Avg merge
- 1h 57m
- Merged PRs (30d)
- 11
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MIT-LCP/physionet
-
Bug in epicmpOpen
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
PhysioNet ReportOpen
Difficulty 4/5 3-5 days Newbie friendliness 56/100
MIT-LCP/physionet#185 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
Maintainers usually reply within 1 day
All issues in MIT-LCP/physionet
Similar issues
-
app: scripts status: backlog type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
netbox-community/netbox-scripts#68 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
marin-community/marin#10765 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
flathub/com.unity.UnityHub#230 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 63/100
EclipseFdn/open-vsx.org#14910 ·
Maintainers usually reply within 1 day