Skip to content

Add support for downloading from URL #160

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miketheman
Copy link
Contributor

@miketheman miketheman commented Apr 1, 2025

Fixes #159

Add support for downloading and expanding a file directly from a URL using the --url flag.

  • README.md

    • Add usage instructions for the --url flag.
  • src/safepull/safepull.py

    • Add argument parsing for the --url flag in the run function.
    • Add a new function download_from_url to handle downloading and unpacking from a URL.
    • Update the run function to call download_from_url if the --url flag is provided.
  • tests/test_safepull.py

    • Add a test case for the --url flag in the run function.

For more details, open the Copilot Workspace session.

Fixes import-pandas-as-numpy#159

Add support for downloading and expanding a file directly from a URL using the `--url` flag.

* **README.md**
  - Add usage instructions for the `--url` flag.

* **src/safepull/safepull.py**
  - Add argument parsing for the `--url` flag in the `run` function.
  - Add a new function `download_from_url` to handle downloading and unpacking from a URL.
  - Update the `run` function to call `download_from_url` if the `--url` flag is provided.

* **tests/test_safepull.py**
  - Add a test case for the `--url` flag in the `run` function.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/import-pandas-as-numpy/safepull/issues/159?shareId=XXXX-XXXX-XXXX-XXXX).
@miketheman
Copy link
Contributor Author

No idea if this works, but this is what Copilot came up with in a few minutes. I'll try to take some time later this week to test it out.

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.

Feature Request: Accept a full URL for download
1 participant