Skip to content

Commit d98952c

Browse files
authored
Merge pull request #124 from pymc-labs/interrogate
use interrogate to assess docstring coverage
2 parents fc0f7a8 + e20755e commit d98952c

File tree

8 files changed

+93
-0
lines changed

8 files changed

+93
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
run: |
2020
make init
2121
make check_lint
22+
2223
test:
2324
runs-on: ubuntu-latest
2425
strategy:

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ repos:
3333
args: ["--py37-plus"]
3434
- id: nbqa-isort
3535
args: ["--float-to-top"]
36+
- repo: https://github.com/econchick/interrogate
37+
rev: 1.5.0
38+
hooks:
39+
- id: interrogate
40+
# needed to make excludes in pyproject.toml work
41+
# see here https://github.com/econchick/interrogate/issues/60#issuecomment-735436566
42+
pass_filenames: false

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ check_lint:
1515
black --diff --check --fast .
1616
nbqa black --check .
1717
nbqa isort --check-only .
18+
interrogate .
1819

1920
test:
2021
pip install -r requirements-test.txt

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
![GitHub Repo stars](https://img.shields.io/github/stars/pymc-labs/causalpy?style=social)
77
![Read the Docs](https://img.shields.io/readthedocs/causalpy)
88
![PyPI - Downloads](https://img.shields.io/pypi/dm/causalpy)
9+
![Interrogate](img/interrogate_badge.svg)
910

1011
A Python package focussing on causal inference in quasi-experimental settings. The package allows for sophisticated Bayesian model fitting methods to be used in addition to traditional OLS.
1112

img/interrogate_badge.svg

Lines changed: 58 additions & 0 deletions
Loading

pyproject.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,26 @@ markers = [
1414
"integration: mark as an integration test.",
1515
"slow: mark test as slow.",
1616
]
17+
18+
[tool.interrogate]
19+
ignore-init-method = true
20+
ignore-init-module = true
21+
ignore-magic = false
22+
ignore-semiprivate = false
23+
ignore-private = false
24+
ignore-property-decorators = false
25+
ignore-module = false
26+
ignore-nested-functions = false
27+
ignore-nested-classes = true
28+
ignore-setters = false
29+
fail-under = 40
30+
exclude = ["setup.py", "docs", "build"]
31+
ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
32+
# possible values: 0 (minimal output), 1 (-v), 2 (-vv)
33+
verbose = 1
34+
quiet = false
35+
whitelist-regex = []
36+
color = true
37+
omit-covered-files = false
38+
generate-badge = "img"
39+
badge-format = "svg"

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pathlib
22
pre-commit
33
twine
4+
interrogate

requirements-lint.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
black>=22.3.0
22
flake8>=4.0.1
3+
interrogate>=1.5.0
34
isort>=5.10.1
45
nbqa>=1.5.3
56
pre-commit>=2.19.0

0 commit comments

Comments
 (0)