Skip to content

Commit f4ca088

Browse files
committed
Merge branch 'main' into iv_weak_instruments
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
2 parents bff8260 + 23cbfd1 commit f4ca088

File tree

11 files changed

+561
-564
lines changed

11 files changed

+561
-564
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Update pip and setuptools
2323
run: pip install --upgrade pip setuptools
24+
- name: Setup environment
25+
run: pip install -e .[test]
2426
- name: Run doctests
25-
run: |
26-
pip install -e .[test]
27-
pytest --doctest-modules --ignore=causalpy/tests/ causalpy/
27+
run: pytest --doctest-modules --ignore=causalpy/tests/ causalpy/
2828
- name: Run tests
29-
run: |
30-
pip install -e .[test]
31-
pytest --cov-report=xml --no-cov-on-fail
29+
run: pytest --cov-report=xml --no-cov-on-fail
3230
- name: Upload coverage to Codecov
3331
uses: codecov/codecov-action@v4
3432
with:

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ repos:
2525
exclude: &exclude_pattern 'iv_weak_instruments.ipynb'
2626
args: ["--maxkb=1500"]
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.4.7
28+
rev: v0.4.8
2929
hooks:
30+
# Run the linter
3031
- id: ruff
31-
args: ["--fix", "--output-format=full"]
32+
types_or: [ python, pyi, jupyter ]
33+
args: [ --fix ]
34+
# Run the formatter
3235
- id: ruff-format
33-
- repo: https://github.com/nbQA-dev/nbQA
34-
rev: 1.8.5
35-
hooks:
36-
- id: nbqa-ruff
36+
types_or: [ python, pyi, jupyter ]
3737
- repo: https://github.com/econchick/interrogate
3838
rev: 1.7.0
3939
hooks:

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ lint:
1010
check_lint:
1111
ruff check .
1212
ruff format --diff --check .
13-
nbqa black --check .
14-
nbqa ruff .
1513
interrogate .
1614

1715
doctest:

docs/source/notebooks/did_pymc_banks.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
" # rename to meaningful variables\n",
5858
" .rename(columns={\"bib6\": \"Sixth District\", \"bib8\": \"Eighth District\"})\n",
5959
" # reduce from daily resolution to examine median banks open by year\n",
60-
" .groupby(\"year\").median()\n",
60+
" .groupby(\"year\")\n",
61+
" .median()\n",
6162
")\n",
6263
"\n",
6364
"treatment_time = 1930.5\n",

docs/source/notebooks/did_skl.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262
],
6363
"source": [
64-
"fig, ax = result.plot();"
64+
"fig, ax = result.plot()"
6565
]
6666
},
6767
{

docs/source/notebooks/generate_plots.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@
491491
}
492492
],
493493
"source": [
494-
"fig, ax = result.plot();"
494+
"fig, ax = result.plot()"
495495
]
496496
},
497497
{
@@ -1000,7 +1000,7 @@
10001000
}
10011001
],
10021002
"source": [
1003-
"fig, ax = result.plot();"
1003+
"fig, ax = result.plot()"
10041004
]
10051005
},
10061006
{

docs/source/notebooks/its_skl.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
}
205205
],
206206
"source": [
207-
"fig, ax = result.plot();"
207+
"fig, ax = result.plot()"
208208
]
209209
},
210210
{

docs/source/notebooks/rd_pymc_drinking.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
}
200200
],
201201
"source": [
202-
"fig, ax = result.plot();"
202+
"fig, ax = result.plot()"
203203
]
204204
},
205205
{
@@ -413,7 +413,7 @@
413413
" treatment_threshold=21,\n",
414414
")\n",
415415
"\n",
416-
"fig, ax = result2.plot();"
416+
"fig, ax = result2.plot()"
417417
]
418418
},
419419
{

docs/source/notebooks/rd_skl.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
}
173173
],
174174
"source": [
175-
"fig, ax = result.plot();"
175+
"fig, ax = result.plot()"
176176
]
177177
},
178178
{
@@ -354,7 +354,7 @@
354354
}
355355
],
356356
"source": [
357-
"fig, ax = result.plot();"
357+
"fig, ax = result.plot()"
358358
]
359359
},
360360
{

docs/source/quasi_dags.ipynb

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

0 commit comments

Comments
 (0)