CM configurable Take 2#2979
Merged
Merged
Conversation
Member
|
What is the relationship of this to #2973 |
Member
Author
Member
|
Okay, thanks for clarifying. |
Member
Author
|
No problem, thanks for filling the gap of my (too short) memory. |
Member
|
Should we review and merge this one as is? Do you want to do the CM 3 stuff separately? |
Member
Author
Haven't had time to look at it in a while. It shoudln't conflict with CM3 though. I'ts just a question of passing config around to be able to overwrite it. So Yes, this and CM3 are different things, I just have the same concern of me not beeing availlable 17-30. |
Change the way configurability works. Config dict should be passed down to the parent class where it will be merged with the default value and propagate to this only in the base class. This allow to both alter the configuration on a per instance basis, or globaly by tempering with the class instance. This also get rid of IPython global in some cases.
Member
Author
|
rebased, cleaned updated. |
minrk
added a commit
that referenced
this pull request
Apr 24, 2013
CM configurable Take 2
Change the way configurability works.
Config dict should be passed down to the parent class where it will be
merged with the default value and propagate to this only in the base
class.
This allow to both alter the configuration on a per instance basis, or
globaly by tempering with the class instance.
This also get rid of IPython global in some cases.
--
Still not **perfect** but I think this is the limit of my js knowledge, there is a minimal amount of code of 4 line to propagate the configuration :
```
var options = {foo:bar}; // default options can be class parameter
var overwrite_options ={boo:baz}; // came from args, or not
options = this.mergeopt(CodeCell, options, overwrite options);
IPython.Cell.apply(this,[options]);
```
mattvonrocketstein
pushed a commit
to mattvonrocketstein/ipython
that referenced
this pull request
Nov 3, 2014
CM configurable Take 2
Change the way configurability works.
Config dict should be passed down to the parent class where it will be
merged with the default value and propagate to this only in the base
class.
This allow to both alter the configuration on a per instance basis, or
globaly by tempering with the class instance.
This also get rid of IPython global in some cases.
--
Still not **perfect** but I think this is the limit of my js knowledge, there is a minimal amount of code of 4 line to propagate the configuration :
```
var options = {foo:bar}; // default options can be class parameter
var overwrite_options ={boo:baz}; // came from args, or not
options = this.mergeopt(CodeCell, options, overwrite options);
IPython.Cell.apply(this,[options]);
```
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.
Pinging @fperez,
This should fix your issues with markdown cell coloration.
It is a little more complicated than I expected if we want to avoid code duplication in a few places, so I'll work on that.
Change the way configurability works.
Config dict should be passed down to the parent class where it will be
merged with the default value and propagate to this only in the base
class.
This allow to both alter the configuration on a per instance basis, or
globaly by tempering with the class instance.
This also get rid of IPython global in some cases.
Still not perfect but I think this is the limit of my js knowledge, there is a minimal amount of code of 4 line to propagate the configuration :
I'm just not found of passing
[option]instead of just options and the squash the options dict together in a 3 step way...