Fix a few issues with generate_config#10893
Conversation
When using it with astroquery, this fixes 2 issues: - Astropy modules where imported and then added to the config file. - One module (`astroquery.mpc`) was added 3 times because it is imported in other modules.
what do you mean exactly? It's imported into the pseudo module
if there are obsessive logging/warnings, we can certainly look into that and do a cull. Could you provide examples? |
Yes, it happens when importing
Sure, this is only when filtering only deprecation warnings: https://gist.github.com/saimn/a18203a6ca86e6c573af0b53fb9b0d37 |
|
Glad to hear that master is being fixed, I recall a few back and forth of how to deal with those erfa things.
Ahh, thanks. We should raise errors for deprecations, so if any of those are around that's a real issue (with the exception of deprecations coming from pyregion or html5lib). Could you report them back in an astroquery issue? Most of those are legit warnings, and the rest is already on the radar to be cleaned up. |
embray
left a comment
There was a problem hiding this comment.
While making changes in this function anyways, how does my idea in this comment sound #10877 (comment) ?
|
|
||
| from astropy.extern.configobj import configobj, validate | ||
| from astropy.utils import find_current_module | ||
| from astropy.utils import find_current_module, silence |
There was a problem hiding this comment.
All these years, I didn't know this existed. 😱
Lines 62 to 64 in 079fcb7
|
@saimn , perhaps you should answer @embray 's question about #10877 (comment) before merge? |
|
Okay then, let's continue discussion on the other issue. Thanks, everyone! |
When using it with other packages (tried this with astroquery), this fixes several issues:
astroquery.mpc) was added 3 times because it is imported in other modules.