Astrometry.net: Improvements to API key warnings/errors#2483
Merged
Conversation
… about API key before user has had chance to set it.
astrofrog
force-pushed
the
api-key-error
branch
from
August 8, 2022 09:12
e855fc8 to
1244625
Compare
Codecov Report
@@ Coverage Diff @@
## main #2483 +/- ##
==========================================
- Coverage 62.92% 62.91% -0.02%
==========================================
Files 133 133
Lines 17302 17308 +6
==========================================
+ Hits 10888 10889 +1
- Misses 6414 6419 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
astrofrog
force-pushed
the
api-key-error
branch
from
August 8, 2022 09:35
1244625 to
20e7460
Compare
mwcraig
approved these changes
Aug 8, 2022
mwcraig
left a comment
Member
There was a problem hiding this comment.
This looks fine, though I have one suggestion.
| Astrometry.net API key not set. You should either set this in the astroquery configuration file using: | ||
|
|
||
| [astrometry_net] | ||
| api_key = qwdqwjnoi12ioj |
Member
There was a problem hiding this comment.
Would it be better to use something that is obviously not a key here? I assume the value here isn't a valid key
but something like XXX or FILL_IN_YOUR_KEY might be better.
Member
Author
There was a problem hiding this comment.
Ok sounds good, I can do that
Member
|
Thanks @astrofrog! |
Member
Author
|
Thanks for wrapping this up @bsipocz! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Possible fix for #2482 - only raise an error about missing API key when it is needed, otherwise user doesn't have chance to set it before the warning is emitted.