-
Notifications
You must be signed in to change notification settings - Fork 41
Assembly object
You need to modify a couple different lines to properly add a parameter to an assembly object.
-
The ''paramsdict'' is an OrderedDict that is declared and initialized in the Assembly class constructor at the top of the assembly.py file. Since this is an OrderedDict you may only add parameters to the end of this list, else other stuff will get all screwed up. In order to add a parameter you have to define a name and a sensible default in this format: ("name_of_param", "default_val")
-
Next you need to add docs for your new parameter to paramsinfo.py, again paramsinfo is an ordered dict so only add to the end. There's a nice template for adding new docs so stick to this for consistency:
("13", """ (13) prefix_outname -------------------------------------------------- ---------------------------------------------------------------------- data.setparams(13) = test ## set a name data.setparams(13) = c85d4m8p4 ## set a name of parameters values data.setparams("prefix_outname") = c85d4m8p4 ## verbose ---------------------------------------------------------------------- """),
-
Finally you need to add a new elif to the set_params() function to actually pull in your new parameters.
-
NB: If you build and install a new version you need to completely cycle your notebook to get it to read the new library.