-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
I've updated the JSONInit notebook to use parambokeh and added it to the user guide. I've also checked that this notebooks works as expected, accepting parameters at the commandline. |
@philippjfr @jbednar Ready to review/merge once the tests pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from failing tests and one naming comment.
parambokeh/__init__.py
Outdated
3. The JSON can be read directly from an environment variable. | ||
Here is an easy example of setting such an environment variable on | ||
the commandline: | ||
PARAMBOKEH_INIT='{"p1":5}' jupyter notebook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be PARAM_INIT, so that user code doesn't depend on whether the author chose ParamNB or ParamBokeh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Though this initializer is only supported by the widget systems (paramnnb/parambokeh). So how about PARAM_WIDGETS
or similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is currently only supported by the widget systems, but there is nothing about it that is related to widgets, so we can and should add something to Param that can consume it as well. I.e., the implementation should move to Param, and Param also needs an example of using it. But all those things are orthogonal; for now we just need a name that doesn't make any assumptions about how the declared values will be consumed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've chosen PARAM_JSON_INIT
as that is the most accurate description of what it is.
@ceball What should I use in |
Looks like the notebook has now been excluded successfully and the tests should all go green. |
Looks good, I'll merge. What's the decision on moving this to param? |
Thanks! I think the decision is to move it to param in due course: #53 |
This PR adds the JSONInit class available in paramnb to parambokeh. The was this class is used is documented in this notebook and I will now check the corresponding invocation works with parambokeh.