Allow passing of Python objects in the parameters dict - #41
Conversation
We build an appctx manager under the hood to coordinate things.
JHopeCollins
left a comment
There was a problem hiding this comment.
This is much more ergonomic. Is there a benefit to still allowing passing an AppContextManager? Could we just make this an internal detail and have One True Way of passing python types?
You make a good point. I was torn as to whether we still want the class around. It is a nice abstraction but I think I agree that we should make it purely internal. Will do. |
607d872 to
e7aee2b
Compare
|
@JHopeCollins I think I'm now happy with this. |
|
Really really nice. Big fan. Will go through in more detail, but at a first pass one thing that jumps out is that we should override petsctools.Options["key"] = python_objectThe easy thing is just to disallow it because there's no way to associate an |
I think inserting it into the global appctx dictionary would be the right thing to do |
| """Prefix used for all appctx entries in the options database.""" | ||
|
|
||
|
|
||
| class AppContextKey(str): |
There was a problem hiding this comment.
put by the manager
We build an appctx manager under the hood to coordinate things.