Currently parameters are passed into notebooks by marking cells with skip_cell metadata. This in combination with injection of values into the module scope provides a cludgy way for the notebook to be parameterized externally.
There are some problems with this approach:
all parameters must be supplied by the caller and default values cannot be provided within the notebook
skipping cells makes it too easy for notebook and NotebookScripter execution behaviors to diverge.
A better version of this api would allow merging values from caller provided dictionary into module scope at a time chosen by the notebook author and would always run every cell in the notebook.
New api:
Author marks cell with metadata
“NotebookScripter.HookPoint”: “hookName”
run_notebook() is changed to take **hookArgs — where each hook value must be something that could be passed to dict.update() method. Provided mappings will be merged into the notebook’s module scope after the corresponding cell runs
Currently parameters are passed into notebooks by marking cells with skip_cell metadata. This in combination with injection of values into the module scope provides a cludgy way for the notebook to be parameterized externally.
There are some problems with this approach:
A better version of this api would allow merging values from caller provided dictionary into module scope at a time chosen by the notebook author and would always run every cell in the notebook.
New api: