Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 support #794

Merged
merged 12 commits into from
Nov 28, 2024
5 changes: 4 additions & 1 deletion .github/workflows/run_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ 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

- name: Install graphviz
Lilly-May marked this conversation as resolved.
Show resolved Hide resolved
run: pip install graphviz

- name: Install ehrapy and additional dependencies
run: uv pip install --system . cellrank nbconvert ipykernel

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 6 additions & 1 deletion ehrapy/plot/causal_inference/_dowhy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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._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]

Expand Down
Loading