Skip to content

Add a option to suppress config loading#5907

Closed
funbaker wants to merge 3 commits intoastropy:masterfrom
funbaker:add-configload-optout
Closed

Add a option to suppress config loading#5907
funbaker wants to merge 3 commits intoastropy:masterfrom
funbaker:add-configload-optout

Conversation

@funbaker
Copy link
Contributor

@funbaker funbaker commented Mar 24, 2017

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 the config module.

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)

@pllim pllim added the config label Mar 24, 2017
Copy link
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pllim pllim requested a review from astrofrog March 24, 2017 14:17
@funbaker
Copy link
Contributor Author

Updated comment.

@humford
Copy link

humford commented Jun 29, 2017

@funbaker Is this PR still active?

@funbaker
Copy link
Contributor Author

funbaker commented Jul 3, 2017

@humford yep

Waiting for a review from @astrofrog
After confirmation i will add documentation and changelog.

@bsipocz bsipocz added this to the v3.0.0 milestone Jul 3, 2017
@bsipocz
Copy link
Member

bsipocz commented Jul 3, 2017

@funbaker - This sadly missed the 2.0 branching, so the changelog can be added to the 3.0 section

@funbaker
Copy link
Contributor Author

funbaker commented Jul 3, 2017

Theres a workaround to archive this behavior, but this runs all the setup code too

Put this lines before importing astropy

import __builtin__
__builtin__._ASTROPY_SETUP_ = True

@astropy-bot
Copy link

astropy-bot bot commented Jul 6, 2017

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:

  • Changelog entry section (v3.0) inconsistent with milestone (v3.1)

Would it be possible to fix this? Thanks!

If there are any issues with this message, please report them here.

@funbaker
Copy link
Contributor Author

The CircleCI check seems to be broken...

@bsipocz
Copy link
Member

bsipocz commented Nov 15, 2017

@funbaker - Yes, it's indeed unrelated and has already been fixed in master. However this still needs an approval from one of the maintainers.

@pllim pllim requested a review from eteq December 8, 2017 15:15
@bsipocz bsipocz modified the milestones: v3.0.0, v3.1 Jan 15, 2018
@astropy-bot
Copy link

astropy-bot bot commented Apr 19, 2018

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 keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

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.

@astropy-bot
Copy link

astropy-bot bot commented Jul 18, 2018

⏰ 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.

@astropy-bot astropy-bot bot closed this Jul 18, 2018
@pllim pllim added the closed-by-bot Closed by stale bot label Jul 19, 2018
@eteq
Copy link
Member

eteq commented Aug 1, 2018

Sorry for not getting any comments in about this @funbaker - I'm going to leave some more thoughts in #5899 but depending on the result of that we can always resurrect this and give it a proper review!

@pllim
Copy link
Member

pllim commented Mar 30, 2020

Revived in #10090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed-by-bot Closed by stale bot config

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants