From 385d916e6ab00ac2c311c5dd6d3bacccd5aa4252 Mon Sep 17 00:00:00 2001 From: emrekiciman Date: Wed, 28 Sep 2022 00:38:09 -0700 Subject: [PATCH] Remove dowhy_causal_discovery_example from tests (#643) * Remove dowhy_causal_discovery_example from tests Remove dowhy_causal_discovery_example.ipynb from advanced tests that are run daily. It is failing due to a cdt install problem. Temporarily disabling since we are switching CD implementations. Signed-off-by: emrekiciman Signed-off-by: Emre Kiciman * Update test_notebooks.py removed spaces that were causing a formatting error Signed-off-by: emrekiciman Signed-off-by: Emre Kiciman * added code for ignoring specified notebook tests Signed-off-by: Emre Kiciman Signed-off-by: emrekiciman Signed-off-by: Emre Kiciman --- tests/test_notebooks.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_notebooks.py b/tests/test_notebooks.py index 813dd4666..9a39b7cf3 100644 --- a/tests/test_notebooks.py +++ b/tests/test_notebooks.py @@ -15,8 +15,6 @@ advanced_notebooks = [ "dowhy_refutation_testing.ipynb", "dowhy_lalonde_example.ipynb", "lalonde_pandas_api.ipynb", - # requires Rpy2 for causal discovery - "dowhy_causal_discovery_example.ipynb", # will be removed "dowhy_optimize_backdoor_example.ipynb", # applied notebook, not necessary to test each time @@ -35,6 +33,13 @@ advanced_notebooks = [ "gcm_401k_analysis.ipynb", ] +ignore_notebooks = [ + # requires Rpy2 for causal discovery + # daily tests of dowhy_causal_discovery_example.ipynb are failing due to cdt/rpy2 config. + # comment out, since we are switching causal discovery implementations + "dowhy_causal_discovery_example.ipynb" +] + # Adding the dowhy root folder to the python path so that jupyter notebooks # can import dowhy if "PYTHONPATH" not in os.environ: @@ -86,7 +91,9 @@ def test_confounder_notebook(): """ parameter_list = [] for nb in notebooks_list: - if nb in advanced_notebooks: + if nb in ignore_notebooks: + continue + elif nb in advanced_notebooks: param = pytest.param(nb, marks=[mark.advanced, mark.notebook], id=nb) else: param = pytest.param(nb, marks=[mark.notebook], id=nb)