Skip to content
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

ENH: unzip support for download #209

Merged
merged 12 commits into from
Oct 31, 2023
Merged

ENH: unzip support for download #209

merged 12 commits into from
Oct 31, 2023

Conversation

jklenzing
Copy link
Member

@jklenzing jklenzing commented Oct 4, 2023

Description

Addresses #103

Adds support to unzip files after download for zip files. Users can now specify a 'zip_method' as part of the download tags, which will send the zipped file to a temporary directory and extract it to the archival location.

Current version supports 'zip' only, but could be expanded for other file types later.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested with pysatModels at pysat/pysatModels#132

Test Configuration:

  • Operating system: Monterrey
  • Version number: Python 3.10.9
  • Any details about your local setup that are relevant

Checklist:

  • Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes
  • Update zenodo.json file for new code contributors

If this is a release PR, replace the first item of the above checklist with the release
checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release

@jklenzing jklenzing added this to the 0.1.0 Release milestone Oct 4, 2023
@jklenzing jklenzing linked an issue Oct 4, 2023 that may be closed by this pull request
@jklenzing
Copy link
Member Author

Needs a test for the new bits of code. The only routine that uses this is in pysatModels. Potentially we can create a test object with a few zipped files hosted here.

@jklenzing
Copy link
Member Author

jklenzing commented Oct 30, 2023

Removed the gz support for now since the TIMED datasets have other problems. Can be expanded in the future.

Moving forward without tests for the time being to support pysatModels.

@jklenzing jklenzing marked this pull request as ready for review October 31, 2023 14:04
@jklenzing
Copy link
Member Author

Documented need for tests and possible solutions as #213.

@jklenzing
Copy link
Member Author

Coverage change consistent with new lines of code.

@jklenzing jklenzing merged commit 939d26d into develop Oct 31, 2023
19 of 21 checks passed
@jklenzing jklenzing deleted the enh/103_104_zip branch October 31, 2023 19:45
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.

ENH: unzip support in download
2 participants