From 26260e0211f9e7284d62695ccfd7c35e89da4792 Mon Sep 17 00:00:00 2001 From: Lilly Date: Wed, 21 Aug 2024 08:27:56 +0200 Subject: [PATCH 1/9] Change CI to python 3.12 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87e57959..8800bb5a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,9 +24,9 @@ jobs: - os: ubuntu-latest python: "3.10" - os: ubuntu-latest - python: "3.11" + python: "3.12" - os: ubuntu-latest - python: "3.11" + python: "3.12" pip-flags: "--pre" env: From 82ec70cfe0be292a2c3ec98bbcaf20ca38e85e26 Mon Sep 17 00:00:00 2001 From: Lilly Date: Wed, 21 Aug 2024 08:29:31 +0200 Subject: [PATCH 2/9] Change notebook CI to python 3.12 --- .github/workflows/run_notebooks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_notebooks.yml b/.github/workflows/run_notebooks.yml index 7f19f070..d4390fb3 100644 --- a/.github/workflows/run_notebooks.yml +++ b/.github/workflows/run_notebooks.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install UV run: pip install uv From fe60f82a986930908d0771b7aaef81a2525a6fb4 Mon Sep 17 00:00:00 2001 From: Lilly Date: Wed, 21 Aug 2024 08:40:20 +0200 Subject: [PATCH 3/9] Updated submodule --- docs/tutorials/notebooks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/notebooks b/docs/tutorials/notebooks index 51c0c802..af299811 160000 --- a/docs/tutorials/notebooks +++ b/docs/tutorials/notebooks @@ -1 +1 @@ -Subproject commit 51c0c80212b24f6f96f6763452c6dfc85fbde99e +Subproject commit af299811f30c416905afebab7c96aac16dae0fdb From 025b17667ba581edf7a0a61f01f7bb6aac09c02c Mon Sep 17 00:00:00 2001 From: Lilly Date: Wed, 21 Aug 2024 08:54:48 +0200 Subject: [PATCH 4/9] Add graphviz dependency --- .github/workflows/run_notebooks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run_notebooks.yml b/.github/workflows/run_notebooks.yml index d4390fb3..188a3239 100644 --- a/.github/workflows/run_notebooks.yml +++ b/.github/workflows/run_notebooks.yml @@ -31,6 +31,9 @@ jobs: - name: Install UV run: pip install uv + - name: Install graphviz + run: pip install graphviz + - name: Install ehrapy and additional dependencies run: uv pip install --system . cellrank nbconvert ipykernel From de0c851aaccf0d3c6536c142078d5cbc8897d863 Mon Sep 17 00:00:00 2001 From: Lilly Date: Thu, 29 Aug 2024 14:39:49 +0200 Subject: [PATCH 5/9] Fixed estimator data retrieval --- ehrapy/plot/causal_inference/_dowhy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ehrapy/plot/causal_inference/_dowhy.py b/ehrapy/plot/causal_inference/_dowhy.py index 99fe04fb..9c7b83af 100644 --- a/ehrapy/plot/causal_inference/_dowhy.py +++ b/ehrapy/plot/causal_inference/_dowhy.py @@ -33,7 +33,7 @@ def causal_effect(estimate: dowhy.causal_estimator.CausalEstimate, precision: in treatment_name = estimate.estimator._target_estimand.treatment_variable[0] outcome_name = estimate.estimator._target_estimand.outcome_variable[0] - data = estimate._data + data = estimate.estimator._data treatment = data[treatment_name].values outcome = data[outcome_name] From 80c02ced505b3a505dc8975f9722b327bbce03a5 Mon Sep 17 00:00:00 2001 From: Lilly Date: Thu, 29 Aug 2024 15:33:35 +0200 Subject: [PATCH 6/9] Obtain data based on dowhy version --- ehrapy/plot/causal_inference/_dowhy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ehrapy/plot/causal_inference/_dowhy.py b/ehrapy/plot/causal_inference/_dowhy.py index 9c7b83af..b047e4fc 100644 --- a/ehrapy/plot/causal_inference/_dowhy.py +++ b/ehrapy/plot/causal_inference/_dowhy.py @@ -33,7 +33,12 @@ def causal_effect(estimate: dowhy.causal_estimator.CausalEstimate, precision: in treatment_name = estimate.estimator._target_estimand.treatment_variable[0] outcome_name = estimate.estimator._target_estimand.outcome_variable[0] - data = estimate.estimator._data + + if dowhy.__version__ == "0.8": # TODO: Remove this once dowhy supports Python 3.12 + data = estimate.estimator._data + else: + data = estimate._data + treatment = data[treatment_name].values outcome = data[outcome_name] From 17b0955e8a0f7a929a789a303af997d612ab46cf Mon Sep 17 00:00:00 2001 From: Lilly Date: Thu, 29 Aug 2024 16:06:14 +0200 Subject: [PATCH 7/9] Estimate data retrieval only for latest dowhy versions --- ehrapy/plot/causal_inference/_dowhy.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ehrapy/plot/causal_inference/_dowhy.py b/ehrapy/plot/causal_inference/_dowhy.py index b047e4fc..99fe04fb 100644 --- a/ehrapy/plot/causal_inference/_dowhy.py +++ b/ehrapy/plot/causal_inference/_dowhy.py @@ -33,12 +33,7 @@ def causal_effect(estimate: dowhy.causal_estimator.CausalEstimate, precision: in treatment_name = estimate.estimator._target_estimand.treatment_variable[0] outcome_name = estimate.estimator._target_estimand.outcome_variable[0] - - if dowhy.__version__ == "0.8": # TODO: Remove this once dowhy supports Python 3.12 - data = estimate.estimator._data - else: - data = estimate._data - + data = estimate._data treatment = data[treatment_name].values outcome = data[outcome_name] From 652c15f3a5c68777bdbd65aab06fb30a21cc3fcb Mon Sep 17 00:00:00 2001 From: Lilly Date: Thu, 29 Aug 2024 16:09:48 +0200 Subject: [PATCH 8/9] Move graphviz installation --- .github/workflows/run_notebooks.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/run_notebooks.yml b/.github/workflows/run_notebooks.yml index 188a3239..7e2f5f8c 100644 --- a/.github/workflows/run_notebooks.yml +++ b/.github/workflows/run_notebooks.yml @@ -31,11 +31,8 @@ jobs: - name: Install UV run: pip install uv - - name: Install graphviz - run: pip install graphviz - - name: Install ehrapy and additional dependencies - run: uv pip install --system . cellrank nbconvert ipykernel + run: uv pip install --system . cellrank nbconvert ipykernel graphviz - name: Run ${{ matrix.notebook }} Notebook run: jupyter nbconvert --to notebook --execute ${{ matrix.notebook }} From d81b2e32579aa1c57842dd8b3880bfd504dca14c Mon Sep 17 00:00:00 2001 From: zethson Date: Thu, 28 Nov 2024 21:36:05 +0100 Subject: [PATCH 9/9] More latest python 3.12 Signed-off-by: zethson --- .github/workflows/build.yml | 6 ++---- .github/workflows/release.yml | 4 ++-- .readthedocs.yml | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db548369..589dd3ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,12 +16,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.11" - cache: "pip" - cache-dependency-path: "**/pyproject.toml" + python-version: "3.12" - name: Install build dependencies run: python -m pip install --upgrade pip wheel twine build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 993f9bb9..98b082b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,10 +13,10 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Install hatch run: pip install hatch diff --git a/.readthedocs.yml b/.readthedocs.yml index bac3abbe..4dc2dd86 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,8 +1,8 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.11" + python: "3.12" commands: - asdf plugin add uv - asdf install uv latest