-
-
Notifications
You must be signed in to change notification settings - Fork 427
astroquery.mast.Observations get_cloud_uri(s) update
#2168
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
Conversation
|
I've just joined the astropy project so this should be the last time I need manual approval to run checks. |
Codecov Report
@@ Coverage Diff @@
## main #2168 +/- ##
==========================================
- Coverage 66.43% 61.80% -4.63%
==========================================
Files 418 129 -289
Lines 28032 16287 -11745
==========================================
- Hits 18622 10066 -8556
+ Misses 9410 6221 -3189
Continue to review full report at Codecov.
|
|
I see a message from Codecov saying |
|
@jaymedina - we're not strict on codecov, as in many cases it reports nonsense, we mostly use it to monitor that test coverage is not dropping, in practice maintainers check the diff and those reports and ask for more tests if something is clearly not covered in a PR. (Btw, you can also run the remote tests locally, |
|
Ahh, OK, my bad. So, if anonymous access is indeed possible and free, then I would suggest adding a test that just does that. Originally I think it was the case I listed above that we should have handled credentials somehow. The warning would not disappear from the diff page here, but nevertheless, the remote tests would cover the functionality. |
… not have it enabled before running the cloud uri methods
|
Hello @jaymedina! 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 2021-11-12 22:26:12 UTC |
|
OK thanks, and yes I can write up a test for this. I would put it in the |
no, it should be in |
|
Sounds good! |
|
I'm getting an error when running my unit test on
Do you recognize this error? @bsipocz Edit: This is my command |
|
Make sure you have all the plugins installed and up-to-date (components of pytest-astropy). Also, note the typo I made in the command above, test via pytest may not work as easily, but do use Also, I would suggest to write a test function with working syntax before committing it, as it will take a lot of iterations and longer if you develop it directly in the codebase. (E.g. you can do it in an ipython session, or something similar). |
|
Thanks, I was able to get
I've made an issue for this (#2172) and can look into fixing these after I wrap up our instance of unit tests. |
|
Let me know if there's anything else that needs updating before merge cc: @tomdonaldson |
| # get a product list | ||
| products = mast.Observations.get_product_list(test_obs_id)[24:] | ||
|
|
||
| assert len(products) > 0, f'No products found for OBSID {test_obs_id}. Unable to move forward with getting URIs from the cloud.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't necessarily write assert messages in the tests, but you're right, they likely don't hurt to have :)
|
Thanks @jaymedina! |
Updating the
get_cloud_uri/smethods to access the cloud anonymously using the inheritedenable_cloud_accessmethod fromMastQuerywithLogin.