Add a option to suppress config loading#5907
Add a option to suppress config loading#5907funbaker wants to merge 3 commits intoastropy:masterfrom funbaker:add-configload-optout
Conversation
pllim
left a comment
There was a problem hiding this comment.
More description on your PR on how this is supposed to work would be great.
When this is confirmed to be the way to go, then this also needs a change log (v2.0?) and also need to update documentation.
| @@ -0,0 +1,2 @@ | |||
| [utils.data] | |||
| dataurl = http://example.org/astropy/suppress_config/ | |||
There was a problem hiding this comment.
Is this a misuse of dataurl? It appears to be pointing to remote data server, not to config files. What if I still want to use data from that server?
There was a problem hiding this comment.
It is just a test if the feature works, it could also be any other configuration variable. This was just the first example i found in the other tests.
|
Updated comment. |
|
@funbaker Is this PR still active? |
|
@humford yep Waiting for a review from @astrofrog |
|
@funbaker - This sadly missed the 2.0 branching, so the changelog can be added to the 3.0 section |
|
Theres a workaround to archive this behavior, but this runs all the setup code too Put this lines before importing astropy |
|
Hi there @funbaker 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. I noticed the following issue with this pull request:
Would it be possible to fix this? Thanks! If there are any issues with this message, please report them here. |
|
The CircleCI check seems to be broken... |
|
@funbaker - Yes, it's indeed unrelated and has already been fixed in master. However this still needs an approval from one of the maintainers. |
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 5 months. I plan to close this in a month if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. You may also consider sending a reminder e-mail about it to the astropy-dev mailing list. If you believe I commented on this pull request incorrectly, please report this here. |
|
⏰ Time's up! ⏰ I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks! If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here. |
|
Revived in #10090 |
PR for #5899
It adds the option to prevent (or delay) the loading of anything else than the default configuration, like it does while in setup mode.
This is done by adding a check for the environment variable "ASTROPY_SUPPRESS_CONFIG" next to the check for
_ASTROPY_SETUP_in theconfigmodule.The indented usecase is for server side applications which are likely to have their own configuration system.
(which might not have been the initial scope of astropy, as a scientific library. nevertheless it has features which are useful in such an environment as well)