module automation.notebook_test_helper
#
Short summary#
module actuariat_python.automation.notebook_test_helper
Some automation helpers to test notebooks and check they are still working fine.
Functions#
function |
truncated documentation |
---|---|
Default cleaning for notebooks cells when unittesting. |
|
Executes a list of notebooks. |
|
returns a list of paths to add before running the notebooks, paths to pyquickhelper, pyensae, pymmails |
|
list the notebooks in a particular subfolder |
Documentation#
Some automation helpers to test notebooks and check they are still working fine.
- actuariat_python.automation.notebook_test_helper.clean_function_notebook(code)#
Default cleaning for notebooks cells when unittesting.
- Paramètres:
code – cell content
- Renvoie:
modified code
- actuariat_python.automation.notebook_test_helper.execute_notebooks(folder, notebooks, filter, clean_function=None, fLOG=<function noLOG>, deepfLOG=<function noLOG>, detailed_log=None)#
Executes a list of notebooks.
- Paramètres:
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
detailed_log – log the output while running the notebook (when the notebook execution fails due to timeout
- Renvoie:
dictionary tuple (statistics, { notebook_file: (isSuccess, outout) })
The signature of function
filter
is:def filter(i, filename): return True or False
- actuariat_python.automation.notebook_test_helper.get_additional_paths()#
returns a list of paths to add before running the notebooks, paths to pyquickhelper, pyensae, pymmails
- Renvoie:
list of paths
- actuariat_python.automation.notebook_test_helper.ls_notebooks(subfolder)#
list the notebooks in a particular subfolder
- Paramètres:
subfolder – subfolder (related to this module)
- Renvoie:
list of files