astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

Extend Gemini to include getting file content and logging out of GOA

Open davner opened this issue 2 years ago • 3 comments
trafficstars

This PR extends the Gemini module.

  1. get_file_content - Grabs the content of a file, does not save to disk.
  2. logout - Deletes the Gemini Observatory Archive cookie.
  3. get_file_url - helper method to get the URL for direct file download.

I have updated the documentation to include the new functions and included tests.

davner avatar Oct 17 '23 22:10 davner

Hello @davner! 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! :beers:

Comment last updated at 2023-10-17 23:01:13 UTC

pep8speaks avatar Oct 17 '23 22:10 pep8speaks

Codecov Report

Merging #2851 (ba2a654) into main (8fe1a8b) will increase coverage by 0.04%. The diff coverage is 96.00%.

@@            Coverage Diff             @@
##             main    #2851      +/-   ##
==========================================
+ Coverage   66.51%   66.55%   +0.04%     
==========================================
  Files         235      235              
  Lines       18096    18121      +25     
==========================================
+ Hits        12037    12061      +24     
- Misses       6059     6060       +1     
Files Coverage Δ
astroquery/gemini/core.py 75.00% <96.00%> (+4.56%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 17 '23 23:10 codecov[bot]

@bsipocz Thanks for the review. I am working on addressing your comments. I have comments below:

  1. I had a misunderstanding on the remote tests, as they pass with pytest astroquery/gemini/tests -m remote_data --remote-data=any however they fail with pytest -P gemini -R with repeated AttributeError: 'dict' object has no attribute 'extract_cookies'. I need to investigate this more.
  2. I agree that some code and constants are repeated throughout the gemini module. I will have this addressed in the next PR I make as it extends this module to include downloading and unpacking the Gemini Observatory Archive tar files and calibration data. This PR was more to get my feet wet with contributing to astroquery, but if you would like, I can combine PRs.

davner avatar Nov 15 '23 07:11 davner