Skip to content

Commit ad76c04

Browse files
committed
Merge branch 'main' into some-devops
2 parents 16fc8e4 + 00dc744 commit ad76c04

File tree

9 files changed

+371
-108
lines changed

9 files changed

+371
-108
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
python-version: ["3.8", "3.9", "3.10"]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Set up Python
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Run lint
@@ -29,9 +29,9 @@ jobs:
2929
python-version: ["3.8", "3.9", "3.10"]
3030

3131
steps:
32-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3333
- name: Set up Python
34-
uses: actions/setup-python@v3
34+
uses: actions/setup-python@v5
3535
with:
3636
python-version: ${{ matrix.python-version }}
3737
- name: Run doctests

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
name: Build source distribution
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18-
- uses: actions/setup-python@v4
18+
- uses: actions/setup-python@v5
1919
with:
2020
python-version: 3.8
2121
- name: Build the sdist and the wheel
@@ -40,7 +40,7 @@ jobs:
4040
echo "Checking import and version number (on release)"
4141
venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
4242
cd ..
43-
- uses: actions/upload-artifact@v3
43+
- uses: actions/upload-artifact@v4
4444
with:
4545
name: artifact
4646
path: dist/*
@@ -60,7 +60,7 @@ jobs:
6060
user: __token__
6161
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
6262
repository_url: https://test.pypi.org/legacy/
63-
- uses: actions/setup-python@v4
63+
- uses: actions/setup-python@v5
6464
with:
6565
python-version: 3.8
6666
- name: Test pip install from test.pypi

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,17 @@ For more instructions see the [Pull request checklist](#pull-request-checklist)
6262
Install the package (in editable mode) and its development dependencies. The `--no-deps` flag is used to avoid installing the dependencies of `CausalPy` as they are already installed when installing the development dependencies. This can end up interfering with the conda-only install of pymc.
6363
6464
```bash
65-
pip install -e . --no-deps
65+
pip install --no-deps -e .
6666
```
6767
6868
Install development dependencies
6969
70-
```
70+
```bash
7171
pip install 'causalpy[dev]'
7272
pip install 'causalpy[docs]'
7373
pip install 'causalpy[test]'
7474
pip install 'causalpy[lint]'
75+
pip install 'pylint'
7576
```
7677
7778
It may also be necessary to [install](https://pandoc.org/installing.html) `pandoc`. On a mac, run `brew install pandoc`.

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ test:
2121
pytest
2222

2323
uml:
24-
pip install pylint
2524
pyreverse -o png causalpy --output-directory docs/source/_static --ignore tests

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Interrupted time series analysis is appropriate when you have a time series of o
178178

179179
| Frequentist | Bayesian |
180180
|--|--|
181-
| coming soon | ![](https://raw.githubusercontent.com/pymc-labs/CausalPy/main/docs/source/_static/interrupted_time_series_pymc.svg) |
181+
| ![](https://raw.githubusercontent.com/pymc-labs/CausalPy/main/docs/source/_static/interrupted_time_series_skl.svg) | ![](https://raw.githubusercontent.com/pymc-labs/CausalPy/main/docs/source/_static/interrupted_time_series_pymc.svg) |
182182

183183
> The data, pre-treatment model fit, and counterfactual are plotted (top). The causal impact is shown as a blue shaded region. The Bayesian analysis shows shaded Bayesian credible regions of the model fit and counterfactual. Also shown is the causal impact (middle) and cumulative causal impact (bottom).
184184

causalpy/skl_experiments.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@ def plot(self, round_to=None):
475475
)
476476
ax.annotate(
477477
"causal\nimpact",
478-
xy=(1.05, np.mean([self.y_pred_counterfactual, self.y_pred_treatment[1]])),
478+
xy=(
479+
1.05,
480+
np.mean([self.y_pred_counterfactual[0], self.y_pred_treatment[1]]),
481+
),
479482
xycoords="data",
480483
xytext=(5, 0),
481484
textcoords="offset points",
Lines changed: 32 additions & 0 deletions
Loading

docs/source/notebooks/did_skl.ipynb

Lines changed: 4 additions & 31 deletions
Large diffs are not rendered by default.

docs/source/notebooks/generate_plots.ipynb

Lines changed: 319 additions & 64 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)