Skip to content

Commit

Permalink
Update dependencies, Python 3.12 compatibility and CI workflow
Browse files Browse the repository at this point in the history
- Update python dependencies
- Add compatibility with Python 3.12
- Modify CI workflow to address doc building issues
- Change time until an issue becomes inactive

Signed-off-by: Patrick Bloebaum <[email protected]>
  • Loading branch information
bloebp committed Oct 6, 2024
1 parent 2f35b62 commit 47c2488
Show file tree
Hide file tree
Showing 10 changed files with 2,579 additions and 2,863 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/advanced-on-demand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
poetry-version: [1.5.1]
test-group: [1, 2, 3, 4]

Expand Down Expand Up @@ -54,6 +54,12 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm

- name: Install graphviz
run: |
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -36,6 +36,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm

- name: Install graphviz
run: |
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
poetry-version: [1.5.1]
test-group: [1, 2, 3, 4, 5, 6]

Expand All @@ -44,6 +44,12 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm

- name: Install graphviz
run: |
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/close-inactive-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 14
days-before-issue-close: 7
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
# in case of issue, only process issues with any of the following labels:
any-of-issue-labels: "question,help wanted,waiting for author"

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ on:

jobs:
docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: "ghcr.io/${{ github.repository_owner }}/dowhy-docs-generation:latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Python Dependencies
run: poetry install -E plotting -E pydot -E pygraphviz -E econml --with docs
Expand All @@ -27,3 +25,9 @@ jobs:

- name: Build
run: ./docs/generate_docs.sh

- name: Free up space
run: |
pip freeze | xargs pip uninstall -y
rm -rf ~/.cache/pip
df -h
10 changes: 7 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ on:

jobs:
docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: "ghcr.io/${{ github.repository_owner }}/dowhy-docs-generation:latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Python Dependencies
run: poetry install -E plotting -E pydot -E pygraphviz -E econml --with docs
Expand All @@ -32,6 +30,12 @@ jobs:
- name: Build
run: ./docs/generate_docs.sh

- name: Free up space
run: |
pip freeze | xargs pip uninstall -y
rm -rf ~/.cache/pip
df -h
- name: Commit and push to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
poetry-version: [1.5.1]

steps:
Expand All @@ -27,6 +27,12 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm

- name: Install graphviz
run: |
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
Expand Down
2 changes: 0 additions & 2 deletions dowhy/causal_estimators/econml.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import numpy as np
import pandas as pd
from numpy.distutils.misc_util import is_sequence

from dowhy.causal_estimator import CausalEstimate, CausalEstimator
from dowhy.causal_identifier import IdentifiedEstimand
Expand Down Expand Up @@ -295,7 +294,6 @@ def shap_values(self, df: pd.DataFrame, *args, **kwargs):
def apply_multitreatment(self, df: pd.DataFrame, fun: Callable, *args, **kwargs):
ests = []
assert not isinstance(self._treatment_value, str)
assert is_sequence(self._treatment_value)

if df is None:
filtered_df = None
Expand Down
Loading

0 comments on commit 47c2488

Please sign in to comment.