module automation.notebook_test_helper
#
Short summary#
module ensae_projects.automation.notebook_test_helper
Some automation helpers to test notebooks and check they are still working fine.
Functions#
function |
truncated documentation |
---|---|
Cleans cells when unittesting notebooks. |
|
Executes a list of notebooks. |
|
Returns a list of paths to add before running the notebooks, paths to pyquickhelper, pyensae. |
|
Lists the notebooks in a particular subfolder. |
Documentation#
Some automation helpers to test notebooks and check they are still working fine.
- ensae_projects.automation.notebook_test_helper.clean_function_notebook(code)#
Cleans cells when unittesting notebooks.
- Parameters:
code – cell content
- Returns:
modified code
- ensae_projects.automation.notebook_test_helper.execute_notebooks(folder, notebooks, filter, clean_function=None, fLOG=<function noLOG>, deepfLOG=<function noLOG>, valid_cell=None)#
Executes a list of notebooks.
- Parameters:
folder – folder
notebooks – list of notebooks
filter – function which validate the notebooks
clean_function – cleaning function to apply to the code before running it
fLOG – logging function
deepfLOG – logging function used to run the notebook
valid_cell – to disable the execution of a cell
- Returns:
dictionary tuple (statistics, { notebook_file: (isSuccess, outout) })
The signature of function
filter
is:def filter( i, filename) : return True or False
- ensae_projects.automation.notebook_test_helper.get_additional_paths()#
Returns a list of paths to add before running the notebooks, paths to pyquickhelper, pyensae.
- Returns:
list of paths
- ensae_projects.automation.notebook_test_helper.ls_notebooks(subfolder)#
Lists the notebooks in a particular subfolder.
- Parameters:
subfolder – subfolder (related to this module)
- Returns:
list of files