docvet 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docvet-1.0.0/LICENSE +21 -0
- docvet-1.0.0/PKG-INFO +196 -0
- docvet-1.0.0/README.md +151 -0
- docvet-1.0.0/pyproject.toml +137 -0
- docvet-1.0.0/src/docvet/__init__.py +28 -0
- docvet-1.0.0/src/docvet/ast_utils.py +333 -0
- docvet-1.0.0/src/docvet/checks/__init__.py +45 -0
- docvet-1.0.0/src/docvet/checks/_finding.py +80 -0
- docvet-1.0.0/src/docvet/checks/coverage.py +78 -0
- docvet-1.0.0/src/docvet/checks/enrichment.py +1245 -0
- docvet-1.0.0/src/docvet/checks/freshness.py +414 -0
- docvet-1.0.0/src/docvet/checks/griffe_compat.py +207 -0
- docvet-1.0.0/src/docvet/cli.py +651 -0
- docvet-1.0.0/src/docvet/config.py +535 -0
- docvet-1.0.0/src/docvet/discovery.py +240 -0
- docvet-1.0.0/src/docvet/py.typed +0 -0
- docvet-1.0.0/src/docvet/reporting.py +163 -0
docvet-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alberto-Codes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
docvet-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: docvet
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Comprehensive docstring quality vetting for Python projects
|
|
5
|
+
Keywords: docstring,linter,mkdocs,interrogate,pydocstyle,darglint,documentation,quality
|
|
6
|
+
Author: Alberto-Codes
|
|
7
|
+
Author-email: Alberto-Codes <alberto.codes.dev@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Alberto-Codes
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
30
|
+
Classifier: Environment :: Console
|
|
31
|
+
Classifier: Intended Audience :: Developers
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
35
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
36
|
+
Classifier: Typing :: Typed
|
|
37
|
+
Requires-Dist: typer>=0.9
|
|
38
|
+
Requires-Dist: griffe>=1.0 ; extra == 'griffe'
|
|
39
|
+
Requires-Python: >=3.12
|
|
40
|
+
Project-URL: Homepage, https://github.com/Alberto-Codes/docvet
|
|
41
|
+
Project-URL: Source, https://github.com/Alberto-Codes/docvet
|
|
42
|
+
Project-URL: Issues, https://github.com/Alberto-Codes/docvet/issues
|
|
43
|
+
Provides-Extra: griffe
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
|
|
46
|
+
[](https://pypi.org/project/docvet/)
|
|
47
|
+
[](https://github.com/Alberto-Codes/docvet/actions)
|
|
48
|
+
[](https://github.com/Alberto-Codes/docvet/blob/develop/LICENSE)
|
|
49
|
+
[](https://pypi.org/project/docvet/)
|
|
50
|
+
[](https://github.com/Alberto-Codes/docvet)
|
|
51
|
+
|
|
52
|
+
# docvet
|
|
53
|
+
|
|
54
|
+
**ruff checks how your docstrings look. interrogate checks if they exist. docvet checks if they're right.**
|
|
55
|
+
|
|
56
|
+
Existing tools cover presence and style. docvet delivers the layers they miss:
|
|
57
|
+
|
|
58
|
+
| Layer | Check | ruff | interrogate | pydoclint | **docvet** |
|
|
59
|
+
|-------|-------|------|-------------|-----------|------------|
|
|
60
|
+
| 1. Presence | "Does a docstring exist?" | -- | Yes | -- | -- |
|
|
61
|
+
| 2. Style | "Is it formatted correctly?" | Yes | -- | -- | -- |
|
|
62
|
+
| 3. Completeness | "Does it have all required sections?" | -- | -- | Partial | **Yes** |
|
|
63
|
+
| 4. Accuracy | "Does it match the current code?" | -- | -- | -- | **Yes** |
|
|
64
|
+
| 5. Rendering | "Will mkdocs render it correctly?" | -- | -- | -- | **Yes** |
|
|
65
|
+
| 6. Visibility | "Will mkdocs even see the file?" | -- | -- | -- | **Yes** |
|
|
66
|
+
|
|
67
|
+
**pydoclint** checks Args/Returns/Raises alignment with function signatures (structural completeness). docvet's enrichment covers that plus Yields, Receives, Warns, Attributes, Examples, typed attributes, and cross-references -- 19 rules across 4 checks. docvet also covers freshness (git diff/blame), griffe rendering compatibility, and mkdocs coverage -- territory no other tool touches.
|
|
68
|
+
|
|
69
|
+
## What It Checks
|
|
70
|
+
|
|
71
|
+
**Enrichment** (completeness) -- 10 rules:
|
|
72
|
+
`missing-raises` `missing-yields` `missing-receives` `missing-warns` `missing-other-parameters` `missing-attributes` `missing-typed-attributes` `missing-examples` `missing-cross-references` `prefer-fenced-code-blocks`
|
|
73
|
+
|
|
74
|
+
**Freshness** (accuracy) -- 5 rules:
|
|
75
|
+
`stale-signature` `stale-body` `stale-import` `stale-drift` `stale-age`
|
|
76
|
+
|
|
77
|
+
**Griffe** (rendering) -- 3 rules:
|
|
78
|
+
`griffe-unknown-param` `griffe-missing-type` `griffe-format-warning`
|
|
79
|
+
|
|
80
|
+
**Coverage** (visibility) -- 1 rule:
|
|
81
|
+
`missing-init`
|
|
82
|
+
|
|
83
|
+
## Quickstart
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install docvet && docvet check --all
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For optional griffe rendering checks:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install docvet[griffe]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Example output:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
src/mypackage/utils.py:42: missing-raises Function 'parse_config' raises ValueError but has no Raises section
|
|
99
|
+
src/mypackage/models.py:15: stale-signature Function 'process' signature changed but docstring not updated
|
|
100
|
+
src/mypackage/api.py:1: missing-init Package directory missing __init__.py (invisible to mkdocs)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Configuration
|
|
104
|
+
|
|
105
|
+
Configure via `[tool.docvet]` in your `pyproject.toml`. All checks run and print findings. Checks listed in `fail-on` cause a non-zero exit code; unlisted checks are treated as warnings.
|
|
106
|
+
|
|
107
|
+
```toml
|
|
108
|
+
[tool.docvet]
|
|
109
|
+
exclude = ["tests", "scripts"]
|
|
110
|
+
fail-on = ["griffe", "coverage"]
|
|
111
|
+
|
|
112
|
+
[tool.docvet.freshness]
|
|
113
|
+
drift-threshold = 30
|
|
114
|
+
age-threshold = 90
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Pre-commit
|
|
118
|
+
|
|
119
|
+
Add to your `.pre-commit-config.yaml`:
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
repos:
|
|
123
|
+
- repo: https://github.com/Alberto-Codes/docvet
|
|
124
|
+
rev: v1.0.0
|
|
125
|
+
hooks:
|
|
126
|
+
- id: docvet
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
For griffe rendering checks, add the optional dependency:
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
repos:
|
|
133
|
+
- repo: https://github.com/Alberto-Codes/docvet
|
|
134
|
+
rev: v1.0.0
|
|
135
|
+
hooks:
|
|
136
|
+
- id: docvet
|
|
137
|
+
additional_dependencies: [griffe]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## GitHub Action
|
|
141
|
+
|
|
142
|
+
Add docvet to your GitHub Actions workflow:
|
|
143
|
+
|
|
144
|
+
```yaml
|
|
145
|
+
- uses: Alberto-Codes/docvet@v1
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
With version pinning and custom arguments:
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
- uses: Alberto-Codes/docvet@v1
|
|
152
|
+
with:
|
|
153
|
+
version: '1.0.0'
|
|
154
|
+
args: 'check --all'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
For griffe rendering checks, install griffe before running docvet:
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
- uses: actions/setup-python@v5
|
|
161
|
+
with:
|
|
162
|
+
python-version: '3.12'
|
|
163
|
+
- run: pip install griffe
|
|
164
|
+
- uses: Alberto-Codes/docvet@v1
|
|
165
|
+
with:
|
|
166
|
+
args: 'check --all'
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Better Docstrings, Better AI
|
|
170
|
+
|
|
171
|
+
AI coding agents rely on docstrings as context when generating and modifying code. Research shows stale or incorrect documentation is actively harmful -- worse than no docs at all:
|
|
172
|
+
|
|
173
|
+
- Incorrect docs [degrade LLM task success by 22.6 percentage points](https://arxiv.org/abs/2404.03114)
|
|
174
|
+
- Comment density [improves code generation by 40-54%](https://arxiv.org/abs/2402.13013)
|
|
175
|
+
- Misleading comments [reduce LLM fault localization accuracy to 24.55%](https://arxiv.org/abs/2504.04372)
|
|
176
|
+
- Performance [drops substantially without docstrings](https://arxiv.org/abs/2508.09537)
|
|
177
|
+
|
|
178
|
+
As the [2025 DORA report](https://cloud.google.com/resources/content/2025-dora-ai-assisted-software-development-report) puts it: "AI doesn't fix a team; it amplifies what's already there." The [only signal correlating with AI productivity is code quality](https://stackoverflow.blog/2026/02/04/code-smells-for-ai-agents-q-and-a-with-eno-reyes-of-factory).
|
|
179
|
+
|
|
180
|
+
docvet's freshness checking catches the accuracy gap that stale docs create, and its enrichment rules ensure the docstring sections that agents use as context are complete. Run `docvet check` in your CI, pre-commit hooks, or agent toolchain.
|
|
181
|
+
|
|
182
|
+
## Badge
|
|
183
|
+
|
|
184
|
+
Add a badge to your project to show your docs are vetted:
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
[](https://github.com/Alberto-Codes/docvet)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Used By
|
|
191
|
+
|
|
192
|
+
Are you using docvet? Open a pull request to add your project here.
|
|
193
|
+
|
|
194
|
+
## License
|
|
195
|
+
|
|
196
|
+
MIT -- see [LICENSE](https://github.com/Alberto-Codes/docvet/blob/develop/LICENSE) for details.
|
docvet-1.0.0/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
[](https://pypi.org/project/docvet/)
|
|
2
|
+
[](https://github.com/Alberto-Codes/docvet/actions)
|
|
3
|
+
[](https://github.com/Alberto-Codes/docvet/blob/develop/LICENSE)
|
|
4
|
+
[](https://pypi.org/project/docvet/)
|
|
5
|
+
[](https://github.com/Alberto-Codes/docvet)
|
|
6
|
+
|
|
7
|
+
# docvet
|
|
8
|
+
|
|
9
|
+
**ruff checks how your docstrings look. interrogate checks if they exist. docvet checks if they're right.**
|
|
10
|
+
|
|
11
|
+
Existing tools cover presence and style. docvet delivers the layers they miss:
|
|
12
|
+
|
|
13
|
+
| Layer | Check | ruff | interrogate | pydoclint | **docvet** |
|
|
14
|
+
|-------|-------|------|-------------|-----------|------------|
|
|
15
|
+
| 1. Presence | "Does a docstring exist?" | -- | Yes | -- | -- |
|
|
16
|
+
| 2. Style | "Is it formatted correctly?" | Yes | -- | -- | -- |
|
|
17
|
+
| 3. Completeness | "Does it have all required sections?" | -- | -- | Partial | **Yes** |
|
|
18
|
+
| 4. Accuracy | "Does it match the current code?" | -- | -- | -- | **Yes** |
|
|
19
|
+
| 5. Rendering | "Will mkdocs render it correctly?" | -- | -- | -- | **Yes** |
|
|
20
|
+
| 6. Visibility | "Will mkdocs even see the file?" | -- | -- | -- | **Yes** |
|
|
21
|
+
|
|
22
|
+
**pydoclint** checks Args/Returns/Raises alignment with function signatures (structural completeness). docvet's enrichment covers that plus Yields, Receives, Warns, Attributes, Examples, typed attributes, and cross-references -- 19 rules across 4 checks. docvet also covers freshness (git diff/blame), griffe rendering compatibility, and mkdocs coverage -- territory no other tool touches.
|
|
23
|
+
|
|
24
|
+
## What It Checks
|
|
25
|
+
|
|
26
|
+
**Enrichment** (completeness) -- 10 rules:
|
|
27
|
+
`missing-raises` `missing-yields` `missing-receives` `missing-warns` `missing-other-parameters` `missing-attributes` `missing-typed-attributes` `missing-examples` `missing-cross-references` `prefer-fenced-code-blocks`
|
|
28
|
+
|
|
29
|
+
**Freshness** (accuracy) -- 5 rules:
|
|
30
|
+
`stale-signature` `stale-body` `stale-import` `stale-drift` `stale-age`
|
|
31
|
+
|
|
32
|
+
**Griffe** (rendering) -- 3 rules:
|
|
33
|
+
`griffe-unknown-param` `griffe-missing-type` `griffe-format-warning`
|
|
34
|
+
|
|
35
|
+
**Coverage** (visibility) -- 1 rule:
|
|
36
|
+
`missing-init`
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install docvet && docvet check --all
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For optional griffe rendering checks:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install docvet[griffe]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Example output:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
src/mypackage/utils.py:42: missing-raises Function 'parse_config' raises ValueError but has no Raises section
|
|
54
|
+
src/mypackage/models.py:15: stale-signature Function 'process' signature changed but docstring not updated
|
|
55
|
+
src/mypackage/api.py:1: missing-init Package directory missing __init__.py (invisible to mkdocs)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
Configure via `[tool.docvet]` in your `pyproject.toml`. All checks run and print findings. Checks listed in `fail-on` cause a non-zero exit code; unlisted checks are treated as warnings.
|
|
61
|
+
|
|
62
|
+
```toml
|
|
63
|
+
[tool.docvet]
|
|
64
|
+
exclude = ["tests", "scripts"]
|
|
65
|
+
fail-on = ["griffe", "coverage"]
|
|
66
|
+
|
|
67
|
+
[tool.docvet.freshness]
|
|
68
|
+
drift-threshold = 30
|
|
69
|
+
age-threshold = 90
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Pre-commit
|
|
73
|
+
|
|
74
|
+
Add to your `.pre-commit-config.yaml`:
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
repos:
|
|
78
|
+
- repo: https://github.com/Alberto-Codes/docvet
|
|
79
|
+
rev: v1.0.0
|
|
80
|
+
hooks:
|
|
81
|
+
- id: docvet
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For griffe rendering checks, add the optional dependency:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
repos:
|
|
88
|
+
- repo: https://github.com/Alberto-Codes/docvet
|
|
89
|
+
rev: v1.0.0
|
|
90
|
+
hooks:
|
|
91
|
+
- id: docvet
|
|
92
|
+
additional_dependencies: [griffe]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## GitHub Action
|
|
96
|
+
|
|
97
|
+
Add docvet to your GitHub Actions workflow:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
- uses: Alberto-Codes/docvet@v1
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
With version pinning and custom arguments:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
- uses: Alberto-Codes/docvet@v1
|
|
107
|
+
with:
|
|
108
|
+
version: '1.0.0'
|
|
109
|
+
args: 'check --all'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For griffe rendering checks, install griffe before running docvet:
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
- uses: actions/setup-python@v5
|
|
116
|
+
with:
|
|
117
|
+
python-version: '3.12'
|
|
118
|
+
- run: pip install griffe
|
|
119
|
+
- uses: Alberto-Codes/docvet@v1
|
|
120
|
+
with:
|
|
121
|
+
args: 'check --all'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Better Docstrings, Better AI
|
|
125
|
+
|
|
126
|
+
AI coding agents rely on docstrings as context when generating and modifying code. Research shows stale or incorrect documentation is actively harmful -- worse than no docs at all:
|
|
127
|
+
|
|
128
|
+
- Incorrect docs [degrade LLM task success by 22.6 percentage points](https://arxiv.org/abs/2404.03114)
|
|
129
|
+
- Comment density [improves code generation by 40-54%](https://arxiv.org/abs/2402.13013)
|
|
130
|
+
- Misleading comments [reduce LLM fault localization accuracy to 24.55%](https://arxiv.org/abs/2504.04372)
|
|
131
|
+
- Performance [drops substantially without docstrings](https://arxiv.org/abs/2508.09537)
|
|
132
|
+
|
|
133
|
+
As the [2025 DORA report](https://cloud.google.com/resources/content/2025-dora-ai-assisted-software-development-report) puts it: "AI doesn't fix a team; it amplifies what's already there." The [only signal correlating with AI productivity is code quality](https://stackoverflow.blog/2026/02/04/code-smells-for-ai-agents-q-and-a-with-eno-reyes-of-factory).
|
|
134
|
+
|
|
135
|
+
docvet's freshness checking catches the accuracy gap that stale docs create, and its enrichment rules ensure the docstring sections that agents use as context are complete. Run `docvet check` in your CI, pre-commit hooks, or agent toolchain.
|
|
136
|
+
|
|
137
|
+
## Badge
|
|
138
|
+
|
|
139
|
+
Add a badge to your project to show your docs are vetted:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
[](https://github.com/Alberto-Codes/docvet)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Used By
|
|
146
|
+
|
|
147
|
+
Are you using docvet? Open a pull request to add your project here.
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT -- see [LICENSE](https://github.com/Alberto-Codes/docvet/blob/develop/LICENSE) for details.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "docvet"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Comprehensive docstring quality vetting for Python projects"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = {file = "LICENSE"}
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Alberto-Codes", email = "alberto.codes.dev@gmail.com" }
|
|
9
|
+
]
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 5 - Production/Stable",
|
|
13
|
+
"Environment :: Console",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3.12",
|
|
17
|
+
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
19
|
+
"Typing :: Typed",
|
|
20
|
+
]
|
|
21
|
+
keywords = [
|
|
22
|
+
"docstring",
|
|
23
|
+
"linter",
|
|
24
|
+
"mkdocs",
|
|
25
|
+
"interrogate",
|
|
26
|
+
"pydocstyle",
|
|
27
|
+
"darglint",
|
|
28
|
+
"documentation",
|
|
29
|
+
"quality",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"typer>=0.9",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
griffe = [
|
|
37
|
+
"griffe>=1.0",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
docvet = "docvet.cli:app"
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://github.com/Alberto-Codes/docvet"
|
|
45
|
+
Source = "https://github.com/Alberto-Codes/docvet"
|
|
46
|
+
Issues = "https://github.com/Alberto-Codes/docvet/issues"
|
|
47
|
+
|
|
48
|
+
[build-system]
|
|
49
|
+
requires = ["uv_build>=0.7,<1"]
|
|
50
|
+
build-backend = "uv_build"
|
|
51
|
+
|
|
52
|
+
# --------------------------------------------------------------------------- #
|
|
53
|
+
# uv — TestPyPI publishing index
|
|
54
|
+
# --------------------------------------------------------------------------- #
|
|
55
|
+
[[tool.uv.index]]
|
|
56
|
+
name = "testpypi"
|
|
57
|
+
url = "https://test.pypi.org/simple/"
|
|
58
|
+
publish-url = "https://test.pypi.org/legacy/"
|
|
59
|
+
explicit = true
|
|
60
|
+
|
|
61
|
+
# --------------------------------------------------------------------------- #
|
|
62
|
+
# Ruff
|
|
63
|
+
# --------------------------------------------------------------------------- #
|
|
64
|
+
[tool.ruff]
|
|
65
|
+
line-length = 88
|
|
66
|
+
target-version = "py312"
|
|
67
|
+
exclude = [".venv", "__pycache__", "*.egg-info"]
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
extend-select = ["E501", "I", "D"]
|
|
71
|
+
|
|
72
|
+
[tool.ruff.lint.pycodestyle]
|
|
73
|
+
max-line-length = 100
|
|
74
|
+
|
|
75
|
+
[tool.ruff.lint.pydocstyle]
|
|
76
|
+
convention = "google"
|
|
77
|
+
|
|
78
|
+
[tool.ruff.lint.per-file-ignores]
|
|
79
|
+
"tests/**/*.py" = ["S101", "D100", "D101", "D102", "D103", "D104"]
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint.isort]
|
|
82
|
+
known-first-party = ["docvet"]
|
|
83
|
+
|
|
84
|
+
[tool.ruff.format]
|
|
85
|
+
quote-style = "double"
|
|
86
|
+
docstring-code-format = true
|
|
87
|
+
docstring-code-line-length = "dynamic"
|
|
88
|
+
|
|
89
|
+
# --------------------------------------------------------------------------- #
|
|
90
|
+
# Interrogate
|
|
91
|
+
# --------------------------------------------------------------------------- #
|
|
92
|
+
[tool.interrogate]
|
|
93
|
+
verbose = 1
|
|
94
|
+
fail-under = 95
|
|
95
|
+
ignore-init-method = true
|
|
96
|
+
ignore-init-module = false
|
|
97
|
+
ignore-magic = true
|
|
98
|
+
ignore-private = true
|
|
99
|
+
exclude = ["tests", "scripts"]
|
|
100
|
+
|
|
101
|
+
# --------------------------------------------------------------------------- #
|
|
102
|
+
# Ty (type checker)
|
|
103
|
+
# --------------------------------------------------------------------------- #
|
|
104
|
+
[tool.ty.src]
|
|
105
|
+
include = ["src", "tests"]
|
|
106
|
+
|
|
107
|
+
# --------------------------------------------------------------------------- #
|
|
108
|
+
# Pytest
|
|
109
|
+
# --------------------------------------------------------------------------- #
|
|
110
|
+
[tool.pytest.ini_options]
|
|
111
|
+
testpaths = ["tests"]
|
|
112
|
+
markers = [
|
|
113
|
+
"unit: Unit tests (fast, isolated)",
|
|
114
|
+
"integration: Integration tests (temp git repos, slower)",
|
|
115
|
+
"slow: Slow-running tests",
|
|
116
|
+
]
|
|
117
|
+
addopts = [
|
|
118
|
+
"-ra",
|
|
119
|
+
"--strict-markers",
|
|
120
|
+
"--strict-config",
|
|
121
|
+
"--showlocals",
|
|
122
|
+
]
|
|
123
|
+
|
|
124
|
+
# --------------------------------------------------------------------------- #
|
|
125
|
+
# Dev dependencies
|
|
126
|
+
# --------------------------------------------------------------------------- #
|
|
127
|
+
[dependency-groups]
|
|
128
|
+
dev = [
|
|
129
|
+
"interrogate>=1.5",
|
|
130
|
+
"pytest>=9.0",
|
|
131
|
+
"pytest-cov>=7.0",
|
|
132
|
+
"pytest-mock>=3.15",
|
|
133
|
+
"pytest-randomly>=4.0",
|
|
134
|
+
"readme-renderer[md]>=44.0",
|
|
135
|
+
"ruff>=0.11",
|
|
136
|
+
"ty>=0.0.1a33",
|
|
137
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Docstring quality vetting for Python projects.
|
|
2
|
+
|
|
3
|
+
Provides a six-layer docstring quality model, implementing layers 3-6
|
|
4
|
+
(completeness, accuracy, rendering, and visibility). Use the ``docvet``
|
|
5
|
+
CLI command or import check functions programmatically.
|
|
6
|
+
|
|
7
|
+
Attributes:
|
|
8
|
+
Finding: Re-exported from ``docvet.checks`` for convenience.
|
|
9
|
+
|
|
10
|
+
Examples:
|
|
11
|
+
Run all checks on changed files::
|
|
12
|
+
|
|
13
|
+
$ docvet check
|
|
14
|
+
|
|
15
|
+
Run all checks on the entire codebase::
|
|
16
|
+
|
|
17
|
+
$ docvet check --all
|
|
18
|
+
|
|
19
|
+
See Also:
|
|
20
|
+
`docvet.checks`: Check modules and the Finding dataclass.
|
|
21
|
+
`docvet.cli`: CLI entry point and subcommands.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
from __future__ import annotations
|
|
25
|
+
|
|
26
|
+
from docvet.checks import Finding
|
|
27
|
+
|
|
28
|
+
__all__ = ["Finding"]
|