Skip to content
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

[doc] Missing documentation on how to use the configuration system for plugin authors #4206

Closed
olethanh opened this issue Sep 14, 2013 · 4 comments
Milestone

Comments

@olethanh
Copy link

Hi.

I could not find any doc on how to implement the configuration system in a plugin particularly for a %magic function and on how to have your parameters be inspectable by %config

@minrk
Copy link
Member

minrk commented Sep 14, 2013

here is an illustration of a configurable magic that shows up in %config, etc.

@takluyver
Copy link
Member

storemagic (in IPython/extensions) is also now configurable.

On 14 September 2013 09:24, Olivier Le Thanh Duong <notifications@github.com

wrote:

Hi.

I could not find any doc on how to implement the configuration system in a
plugin particularly for a %magic function and on how to have your
parameters be inspectable by %config


Reply to this email directly or view it on GitHubhttps://github.com//issues/4206
.

@olethanh
Copy link
Author

Thanks to both of you, I had found a way to make it working but it was a bit more complex. I will adopt this solution as it is more elegant.

Juste a note @minrk you have Configurable.init(self, parent=shell) in your example, but I had to use config=shell.config as did @takluyver otherwise it wouldn't use the configuration parameters set in the profile (on 0.13.2 at least).

@minrk
Copy link
Member

minrk commented Sep 15, 2013

yes, that's a change that requires current IPython (≥ 1.0). (config=shell.config still works, but parent=shell implies also config=parent.config).

olethanh added a commit to olethanh/ipython-sql that referenced this issue Feb 12, 2014
As documented on ipython/ipython#4206
Had to rename SQLMagics to SqlMagic to keep compability with current config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants