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

fix sciserver downloads in heasarc (#3182) #3183

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Conversation

zoghbi-a
Copy link
Contributor

@zoghbi-a zoghbi-a commented Jan 16, 2025

Addresses #3182

This ensures the folder is create if it does not exist. Downloading a foo/bar folder now copies the data to download_location/bar instead of download_location.

A unit test is added for cases of downloaded folders and files.

closes #3182

@pep8speaks
Copy link

pep8speaks commented Jan 16, 2025

Hello @zoghbi-a! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2025-01-23 20:17:16 UTC

@bsipocz bsipocz added this to the v0.4.9 milestone Jan 16, 2025
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

This looks good to me, one minor thing with the changelog though.

CHANGES.rst Outdated
@@ -13,6 +13,18 @@ Infrastructure, Utility and Other Changes and Additions
-------------------------------------------------------


0.4.9 (TBD)
Copy link
Member

Choose a reason for hiding this comment

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

These sections exits above

@@ -692,16 +692,17 @@ def _copy_sciserver(self, links, location='.'):
Users should be using `~self.download_data` instead

"""
if not (os.path.exists('/FTP/') and os.environ['HOME'].split('/')[-1] == 'idies'):
if not os.path.exists('/FTP/'):
Copy link
Member

Choose a reason for hiding this comment

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

Not relevant to this PR, but slowly we should move along to use pathlib

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.62%. Comparing base (0bed33f) to head (ffb26f6).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3183      +/-   ##
==========================================
+ Coverage   67.57%   67.62%   +0.04%     
==========================================
  Files         229      229              
  Lines       18593    18594       +1     
==========================================
+ Hits        12565    12574       +9     
+ Misses       6028     6020       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bsipocz
Copy link
Member

bsipocz commented Jan 23, 2025

I've rebased this to get rid of the conflict and now will merge once CI is all green. Thanks @zoghbi-a!

@bsipocz bsipocz merged commit 020702b into astropy:main Jan 23, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heasarc.download_data failure for sciserver
3 participants