From 33f0ff94d982789c65ff35f1580154498843cd93 Mon Sep 17 00:00:00 2001 From: Amit Sharma Date: Sun, 20 Mar 2022 19:45:15 +0530 Subject: [PATCH] Version Bump: 0.7.1 (#398) * updated test setup and added new version * removed advanced tests * updated readme --- .github/workflows/python-package.yml | 2 +- README.rst | 11 +---------- docs/source/code_repo.rst | 16 ++++++++++++++++ docs/source/conf.py | 2 +- dowhy/VERSION | 2 +- pyproject.toml | 4 ++++ setup.py | 2 +- tests/test_notebooks.py | 14 +++++++++----- 8 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 177fad588..57453cf52 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -38,7 +38,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest + pytest -v -m "not advanced" - name: Check package consistency with twine run: | python setup.py check sdist bdist_wheel diff --git a/README.rst b/README.rst index a38408cc0..51d610084 100755 --- a/README.rst +++ b/README.rst @@ -37,20 +37,11 @@ For a quick introduction to causal inference, check out `amit-sharma/causal-infe Documentation for DoWhy is available at `microsoft.github.io/dowhy `_. -.. raw:: html - -
- Table of Contents - .. i here comment toctree:: .. i here comment :maxdepth: 4 .. i here comment :caption: Contents: -.. contents:: +.. contents:: **Contents** -.. raw:: html - -
- News ----- **2022.03.13**: **Call for Content**. diff --git a/docs/source/code_repo.rst b/docs/source/code_repo.rst index 199684abf..af6cfea0a 100644 --- a/docs/source/code_repo.rst +++ b/docs/source/code_repo.rst @@ -6,6 +6,22 @@ DoWhy is hosted on GitHub. You can browse the code in a html-friendly format `here `_. +v0.7.1: Added Graph refuter. Support for dagitty graphs and external estimators +-------------------------------------------------------------------------------------- + +* Graph refuter with conditional independence tests to check whether data conforms to the assumed causal graph + +* Better docs for estimators by adding the method-specific parameters directly in its own init method + +* Support use of custom external estimators + +* Consistent structure for init_params for dowhy and econml estimators + +* Add support for Dagitty graphs + +* Bug fixes for GLM model, causal model with no confounders, and hotel case-study notebook + +Thank you @EgorKraevTransferwise, @ae-foster, @anusha0409 for your contributions! v0.7: Better Refuters for unobserved confounders and placebo treatment ---------------------------------------------------------------------- diff --git a/docs/source/conf.py b/docs/source/conf.py index 6f1c63254..e9ef890a1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,7 +24,7 @@ copyright = '2020, Microsoft' author = 'Amit Sharma, Emre Kiciman' # The short X.Y version -version = '0.7' +version = '0.7.1' # The full version, including alpha/beta/rc tags release = '' diff --git a/dowhy/VERSION b/dowhy/VERSION index eb49d7c7f..39e898a4f 100755 --- a/dowhy/VERSION +++ b/dowhy/VERSION @@ -1 +1 @@ -0.7 +0.7.1 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..2cd02b77d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[tool.pytest.ini_options] +markers = [ + "advanced: not be to run each time. only on package updates." +] diff --git a/setup.py b/setup.py index 2db85b8c8..6f4d9361b 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ setup( license='MIT', long_description=long_description, url='https://github.com/microsoft/dowhy', # Optional - download_url='https://github.com/microsoft/dowhy/archive/v0.7.tar.gz', + download_url='https://github.com/microsoft/dowhy/archive/v0.7.1.tar.gz', author='Amit Sharma, Emre Kiciman', classifiers=[ # Optional 'Development Status :: 4 - Beta', diff --git a/tests/test_notebooks.py b/tests/test_notebooks.py index 0f1e39d80..58034a6f5 100644 --- a/tests/test_notebooks.py +++ b/tests/test_notebooks.py @@ -21,7 +21,9 @@ advanced_notebooks = [ "dowhy_refuter_notebook.ipynb", "DoWhy-The Causal Story Behind Hotel Booking Cancellations.ipynb", # needs xgboost too # will be removed - "dowhy_optimize_backdoor_example.ipynb" + "dowhy_optimize_backdoor_example.ipynb", + # applied notebook, not necessary to test each time + "dowhy_ranking_methods.ipynb" ] # Adding the dowhy root folder to the python path so that jupyter notebooks @@ -62,14 +64,16 @@ def test_confounder_notebook(): nb, errors = _notebook_run(NOTEBOOKS_PATH+"dowhy_confounder_example.ipynb") assert errors = [] """ -parameter_list=[] +parameter_list = [] for nb in notebooks_list: if nb in advanced_notebooks: param = pytest.param(nb, - marks=[pytest.mark.skip, pytest.mark.advanced], - id=nb) + marks=[pytest.mark.advanced, pytest.mark.notebook], + id=nb) else: - param = pytest.param(nb, id=nb) + param = pytest.param(nb, + marks=[pytest.mark.notebook], + id=nb) parameter_list.append(param) @pytest.mark.parametrize("notebook_filename", parameter_list)