python-checkup 0.0.1__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.
- python_checkup-0.0.1/.gitignore +227 -0
- python_checkup-0.0.1/LICENSE +21 -0
- python_checkup-0.0.1/PKG-INFO +250 -0
- python_checkup-0.0.1/README.md +193 -0
- python_checkup-0.0.1/pyproject.toml +190 -0
- python_checkup-0.0.1/python_checkup/__init__.py +9 -0
- python_checkup-0.0.1/python_checkup/__main__.py +3 -0
- python_checkup-0.0.1/python_checkup/analysis_request.py +35 -0
- python_checkup-0.0.1/python_checkup/analyzer_catalog.py +100 -0
- python_checkup-0.0.1/python_checkup/analyzers/__init__.py +54 -0
- python_checkup-0.0.1/python_checkup/analyzers/bandit.py +158 -0
- python_checkup-0.0.1/python_checkup/analyzers/basedpyright.py +103 -0
- python_checkup-0.0.1/python_checkup/analyzers/cached.py +106 -0
- python_checkup-0.0.1/python_checkup/analyzers/dependency_vulns.py +298 -0
- python_checkup-0.0.1/python_checkup/analyzers/deptry.py +142 -0
- python_checkup-0.0.1/python_checkup/analyzers/detect_secrets.py +101 -0
- python_checkup-0.0.1/python_checkup/analyzers/mypy.py +217 -0
- python_checkup-0.0.1/python_checkup/analyzers/radon.py +150 -0
- python_checkup-0.0.1/python_checkup/analyzers/registry.py +69 -0
- python_checkup-0.0.1/python_checkup/analyzers/ruff.py +256 -0
- python_checkup-0.0.1/python_checkup/analyzers/typos.py +80 -0
- python_checkup-0.0.1/python_checkup/analyzers/vulture.py +151 -0
- python_checkup-0.0.1/python_checkup/cache.py +244 -0
- python_checkup-0.0.1/python_checkup/cli.py +763 -0
- python_checkup-0.0.1/python_checkup/config.py +87 -0
- python_checkup-0.0.1/python_checkup/dedup.py +119 -0
- python_checkup-0.0.1/python_checkup/dependencies/discovery.py +192 -0
- python_checkup-0.0.1/python_checkup/detection.py +298 -0
- python_checkup-0.0.1/python_checkup/diff.py +130 -0
- python_checkup-0.0.1/python_checkup/discovery.py +180 -0
- python_checkup-0.0.1/python_checkup/formatters/__init__.py +0 -0
- python_checkup-0.0.1/python_checkup/formatters/badge.py +38 -0
- python_checkup-0.0.1/python_checkup/formatters/json_fmt.py +22 -0
- python_checkup-0.0.1/python_checkup/formatters/terminal.py +396 -0
- python_checkup-0.0.1/python_checkup/mcp/__init__.py +3 -0
- python_checkup-0.0.1/python_checkup/mcp/installer.py +119 -0
- python_checkup-0.0.1/python_checkup/mcp/server.py +411 -0
- python_checkup-0.0.1/python_checkup/models.py +114 -0
- python_checkup-0.0.1/python_checkup/plan.py +109 -0
- python_checkup-0.0.1/python_checkup/progress.py +95 -0
- python_checkup-0.0.1/python_checkup/runner.py +438 -0
- python_checkup-0.0.1/python_checkup/scoring/__init__.py +0 -0
- python_checkup-0.0.1/python_checkup/scoring/engine.py +397 -0
- python_checkup-0.0.1/python_checkup/skills/SKILL.md +416 -0
- python_checkup-0.0.1/python_checkup/skills/__init__.py +0 -0
- python_checkup-0.0.1/python_checkup/skills/agents.py +98 -0
- python_checkup-0.0.1/python_checkup/skills/installer.py +248 -0
- python_checkup-0.0.1/python_checkup/skills/rule_db.py +806 -0
- python_checkup-0.0.1/python_checkup/web/__init__.py +0 -0
- python_checkup-0.0.1/python_checkup/web/server.py +285 -0
- python_checkup-0.0.1/python_checkup/web/static/__init__.py +0 -0
- python_checkup-0.0.1/python_checkup/web/static/index.html +959 -0
- python_checkup-0.0.1/python_checkup/web/template.py +26 -0
- python_checkup-0.0.1/tests/__init__.py +0 -0
- python_checkup-0.0.1/tests/conftest.py +52 -0
- python_checkup-0.0.1/tests/fixtures/clean_project/pyproject.toml +3 -0
- python_checkup-0.0.1/tests/fixtures/clean_project/src/app.py +8 -0
- python_checkup-0.0.1/tests/fixtures/complex_project/pyproject.toml +3 -0
- python_checkup-0.0.1/tests/fixtures/complex_project/src/complex.py +44 -0
- python_checkup-0.0.1/tests/fixtures/dead_code_project/pyproject.toml +3 -0
- python_checkup-0.0.1/tests/fixtures/dead_code_project/src/dead.py +32 -0
- python_checkup-0.0.1/tests/fixtures/messy_project/pyproject.toml +3 -0
- python_checkup-0.0.1/tests/fixtures/messy_project/src/bad_code.py +9 -0
- python_checkup-0.0.1/tests/fixtures/security_issues/pyproject.toml +3 -0
- python_checkup-0.0.1/tests/fixtures/security_issues/src/insecure.py +11 -0
- python_checkup-0.0.1/tests/fixtures/type_errors/pyproject.toml +3 -0
- python_checkup-0.0.1/tests/fixtures/type_errors/src/typed.py +15 -0
- python_checkup-0.0.1/tests/test_badge.py +82 -0
- python_checkup-0.0.1/tests/test_bandit.py +159 -0
- python_checkup-0.0.1/tests/test_basedpyright.py +75 -0
- python_checkup-0.0.1/tests/test_cache.py +209 -0
- python_checkup-0.0.1/tests/test_cached.py +174 -0
- python_checkup-0.0.1/tests/test_cli.py +24 -0
- python_checkup-0.0.1/tests/test_cli_flags.py +301 -0
- python_checkup-0.0.1/tests/test_config.py +52 -0
- python_checkup-0.0.1/tests/test_dedup.py +109 -0
- python_checkup-0.0.1/tests/test_dependency_discovery.py +140 -0
- python_checkup-0.0.1/tests/test_dependency_vulns.py +354 -0
- python_checkup-0.0.1/tests/test_deptry.py +212 -0
- python_checkup-0.0.1/tests/test_detect_secrets.py +195 -0
- python_checkup-0.0.1/tests/test_detection.py +251 -0
- python_checkup-0.0.1/tests/test_diff.py +123 -0
- python_checkup-0.0.1/tests/test_discovery.py +92 -0
- python_checkup-0.0.1/tests/test_formatters.py +421 -0
- python_checkup-0.0.1/tests/test_mcp_installer.py +118 -0
- python_checkup-0.0.1/tests/test_mcp_server.py +184 -0
- python_checkup-0.0.1/tests/test_models.py +96 -0
- python_checkup-0.0.1/tests/test_mypy.py +165 -0
- python_checkup-0.0.1/tests/test_radon.py +136 -0
- python_checkup-0.0.1/tests/test_registry.py +100 -0
- python_checkup-0.0.1/tests/test_release_gates.py +499 -0
- python_checkup-0.0.1/tests/test_ruff.py +369 -0
- python_checkup-0.0.1/tests/test_rule_db.py +144 -0
- python_checkup-0.0.1/tests/test_runner_parallel.py +237 -0
- python_checkup-0.0.1/tests/test_scoring.py +531 -0
- python_checkup-0.0.1/tests/test_skill_installer.py +286 -0
- python_checkup-0.0.1/tests/test_typos.py +59 -0
- python_checkup-0.0.1/tests/test_vulture.py +103 -0
- python_checkup-0.0.1/tests/test_web_server.py +535 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
|
|
204
|
+
# python-checkup cache
|
|
205
|
+
.python-checkup-cache/
|
|
206
|
+
|
|
207
|
+
# VHS demo artifacts
|
|
208
|
+
demo.tape
|
|
209
|
+
demo.gif
|
|
210
|
+
-
|
|
211
|
+
|
|
212
|
+
# Editor / agent state
|
|
213
|
+
.opencode/
|
|
214
|
+
|
|
215
|
+
# Ruff stuff:
|
|
216
|
+
.ruff_cache/
|
|
217
|
+
|
|
218
|
+
# PyPI configuration file
|
|
219
|
+
.pypirc
|
|
220
|
+
|
|
221
|
+
# Marimo
|
|
222
|
+
marimo/_static/
|
|
223
|
+
marimo/_lsp/
|
|
224
|
+
__marimo__/
|
|
225
|
+
|
|
226
|
+
# Streamlit
|
|
227
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 @nabroleonx
|
|
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.
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-checkup
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Fast, local-first CLI that gives your Python codebase a 0-100 health score
|
|
5
|
+
Project-URL: Homepage, https://github.com/nabroleonx/python-checkup
|
|
6
|
+
Project-URL: Documentation, https://nabroleonx.github.io/python-checkup/
|
|
7
|
+
Project-URL: Repository, https://github.com/nabroleonx/python-checkup.git
|
|
8
|
+
Project-URL: Issues, https://github.com/nabroleonx/python-checkup/issues
|
|
9
|
+
Author: Abel Ayalew | @nabroleonx
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai-agent,code-quality,health-check,linting,mcp,python,static-analysis
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Classifier: Topic :: Software Development :: Testing
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: bandit>=1.8
|
|
27
|
+
Requires-Dist: click>=8.1
|
|
28
|
+
Requires-Dist: deptry>=0.14
|
|
29
|
+
Requires-Dist: mypy>=1.13
|
|
30
|
+
Requires-Dist: radon>=6.0
|
|
31
|
+
Requires-Dist: rich>=13.0
|
|
32
|
+
Requires-Dist: ruff>=0.8.0
|
|
33
|
+
Requires-Dist: vulture>=2.12
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-mock>=3.14; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
40
|
+
Provides-Extra: full
|
|
41
|
+
Requires-Dist: basedpyright>=1.38; extra == 'full'
|
|
42
|
+
Requires-Dist: detect-secrets>=1.5; extra == 'full'
|
|
43
|
+
Requires-Dist: httpx>=0.27; extra == 'full'
|
|
44
|
+
Requires-Dist: mcp>=1.0; extra == 'full'
|
|
45
|
+
Requires-Dist: typos>=1.44; extra == 'full'
|
|
46
|
+
Provides-Extra: mcp
|
|
47
|
+
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
48
|
+
Provides-Extra: pyright
|
|
49
|
+
Requires-Dist: basedpyright>=1.38; extra == 'pyright'
|
|
50
|
+
Provides-Extra: quality-extra
|
|
51
|
+
Requires-Dist: typos>=1.44; extra == 'quality-extra'
|
|
52
|
+
Provides-Extra: secrets
|
|
53
|
+
Requires-Dist: detect-secrets>=1.5; extra == 'secrets'
|
|
54
|
+
Provides-Extra: vulns
|
|
55
|
+
Requires-Dist: httpx>=0.27; extra == 'vulns'
|
|
56
|
+
Description-Content-Type: text/markdown
|
|
57
|
+
|
|
58
|
+
# python-checkup
|
|
59
|
+
|
|
60
|
+
Fast, local-first Python code health checks with a single command.
|
|
61
|
+
|
|
62
|
+
A 0-100 health score for Python codebases. Runs Ruff, mypy, Bandit, Radon,
|
|
63
|
+
Vulture, and deptry in parallel, scores six categories, and tells you what to
|
|
64
|
+
fix first.
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
## Quickstart
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
uvx python-checkup .
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
To see the full report in your browser:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uvx python-checkup . --web
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
To install persistently:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv tool install python-checkup
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Usage
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# quick scan (Ruff + deptry only, ~3s)
|
|
90
|
+
uvx python-checkup . --profile quick
|
|
91
|
+
|
|
92
|
+
# full scan with all optional analyzers
|
|
93
|
+
uvx --from 'python-checkup[full]' python-checkup .
|
|
94
|
+
|
|
95
|
+
# only changed files vs a branch
|
|
96
|
+
uvx python-checkup . --diff main
|
|
97
|
+
|
|
98
|
+
# auto-fix what Ruff can, then rescan
|
|
99
|
+
uvx python-checkup . --fix
|
|
100
|
+
|
|
101
|
+
# filter categories
|
|
102
|
+
uvx python-checkup . --only quality,security
|
|
103
|
+
uvx python-checkup . --skip dead_code
|
|
104
|
+
|
|
105
|
+
# output formats
|
|
106
|
+
uvx python-checkup . --score # just the number
|
|
107
|
+
uvx python-checkup . --json # machine-readable
|
|
108
|
+
uvx python-checkup . --badge # shields.io URL
|
|
109
|
+
|
|
110
|
+
# CI gate
|
|
111
|
+
uvx python-checkup . --fail-under 70
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## What it runs
|
|
115
|
+
|
|
116
|
+
**Default profile:**
|
|
117
|
+
|
|
118
|
+
| Category | Tools |
|
|
119
|
+
|---|---|
|
|
120
|
+
| Code Quality | Ruff |
|
|
121
|
+
| Type Safety | mypy |
|
|
122
|
+
| Security | Bandit, Ruff S-rules |
|
|
123
|
+
| Complexity | Radon, Ruff C901 |
|
|
124
|
+
| Dead Code | Vulture |
|
|
125
|
+
| Dependencies | deptry |
|
|
126
|
+
|
|
127
|
+
**Optional analyzers** (install via extras):
|
|
128
|
+
|
|
129
|
+
| Extra | Adds |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `vulns` | OSV-backed dependency vulnerability scanning |
|
|
132
|
+
| `secrets` | detect-secrets |
|
|
133
|
+
| `pyright` | basedpyright as type backend |
|
|
134
|
+
| `quality-extra` | typos for spelling checks |
|
|
135
|
+
| `mcp` | MCP server support |
|
|
136
|
+
| `full` | all of the above |
|
|
137
|
+
|
|
138
|
+
## Scoring
|
|
139
|
+
|
|
140
|
+
Each category gets a 0-100 score. The overall score is a weighted average:
|
|
141
|
+
|
|
142
|
+
| Category | Default Weight |
|
|
143
|
+
|---|---|
|
|
144
|
+
| Code Quality | 25 |
|
|
145
|
+
| Type Safety | 20 |
|
|
146
|
+
| Security | 20 |
|
|
147
|
+
| Complexity | 15 |
|
|
148
|
+
| Dead Code | 10 |
|
|
149
|
+
| Dependencies | 10 |
|
|
150
|
+
|
|
151
|
+
When a category has no available analyzer, its weight redistributes
|
|
152
|
+
proportionally to the rest.
|
|
153
|
+
|
|
154
|
+
| Score | Label |
|
|
155
|
+
|---|---|
|
|
156
|
+
| 75-100 | Healthy |
|
|
157
|
+
| 50-74 | Needs work |
|
|
158
|
+
| 0-49 | Critical |
|
|
159
|
+
|
|
160
|
+
See `docs/scoring.md` for the full methodology.
|
|
161
|
+
|
|
162
|
+
## Configuration
|
|
163
|
+
|
|
164
|
+
Works without config. To customize, add to `pyproject.toml`:
|
|
165
|
+
|
|
166
|
+
```toml
|
|
167
|
+
[tool.python-checkup]
|
|
168
|
+
timeout = 60
|
|
169
|
+
|
|
170
|
+
[tool.python-checkup.weights]
|
|
171
|
+
quality = 25
|
|
172
|
+
types = 20
|
|
173
|
+
security = 20
|
|
174
|
+
complexity = 15
|
|
175
|
+
dead_code = 10
|
|
176
|
+
dependencies = 10
|
|
177
|
+
|
|
178
|
+
[tool.python-checkup.thresholds]
|
|
179
|
+
healthy = 75
|
|
180
|
+
needs_work = 50
|
|
181
|
+
|
|
182
|
+
[tool.python-checkup.ignore]
|
|
183
|
+
rules = ["S101"]
|
|
184
|
+
files = ["tests/**", "migrations/**"]
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
See `docs/configuration.md` for the full reference.
|
|
188
|
+
|
|
189
|
+
## CI
|
|
190
|
+
|
|
191
|
+
Gate on score:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
uvx python-checkup . --fail-under 70
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
GitHub Action:
|
|
198
|
+
|
|
199
|
+
```yaml
|
|
200
|
+
- uses: nabroleonx/python-checkup@v1
|
|
201
|
+
with:
|
|
202
|
+
fail-under: 70
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Also works as a pre-commit hook. See `action.yml` and `.pre-commit-hooks.yaml`.
|
|
206
|
+
|
|
207
|
+
## MCP Server
|
|
208
|
+
|
|
209
|
+
Expose python-checkup to AI coding agents (Claude Code, Cursor, VS Code):
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
uvx --from 'python-checkup[mcp]' python-checkup mcp install --editor cursor
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Registers five tools: `python_checkup_diagnose`, `python_checkup_lint`,
|
|
216
|
+
`python_checkup_typecheck`, `python_checkup_security`, `python_checkup_explain_rule`.
|
|
217
|
+
|
|
218
|
+
See `docs/mcp-server.md` for details.
|
|
219
|
+
|
|
220
|
+
## Plugins
|
|
221
|
+
|
|
222
|
+
Add custom analyzers via entry points:
|
|
223
|
+
|
|
224
|
+
```toml
|
|
225
|
+
[project.entry-points."python-checkup.analyzers"]
|
|
226
|
+
my-analyzer = "my_package:MyAnalyzer"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
See `docs/plugins.md` for the full guide.
|
|
230
|
+
|
|
231
|
+
## Docs
|
|
232
|
+
|
|
233
|
+
- `docs/configuration.md` -- weights, thresholds, ignore rules
|
|
234
|
+
- `docs/scoring.md` -- scoring methodology
|
|
235
|
+
- `docs/mcp-server.md` -- MCP server setup
|
|
236
|
+
- `docs/plugins.md` -- custom analyzer development
|
|
237
|
+
- `docs/development.md` -- contributing
|
|
238
|
+
|
|
239
|
+
## Development
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
uv sync --all-extras
|
|
243
|
+
uv run pytest
|
|
244
|
+
uv run ruff check python_checkup tests
|
|
245
|
+
uv run mypy python_checkup
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
MIT
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# python-checkup
|
|
2
|
+
|
|
3
|
+
Fast, local-first Python code health checks with a single command.
|
|
4
|
+
|
|
5
|
+
A 0-100 health score for Python codebases. Runs Ruff, mypy, Bandit, Radon,
|
|
6
|
+
Vulture, and deptry in parallel, scores six categories, and tells you what to
|
|
7
|
+
fix first.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uvx python-checkup .
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
To see the full report in your browser:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
uvx python-checkup . --web
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
To install persistently:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uv tool install python-checkup
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# quick scan (Ruff + deptry only, ~3s)
|
|
33
|
+
uvx python-checkup . --profile quick
|
|
34
|
+
|
|
35
|
+
# full scan with all optional analyzers
|
|
36
|
+
uvx --from 'python-checkup[full]' python-checkup .
|
|
37
|
+
|
|
38
|
+
# only changed files vs a branch
|
|
39
|
+
uvx python-checkup . --diff main
|
|
40
|
+
|
|
41
|
+
# auto-fix what Ruff can, then rescan
|
|
42
|
+
uvx python-checkup . --fix
|
|
43
|
+
|
|
44
|
+
# filter categories
|
|
45
|
+
uvx python-checkup . --only quality,security
|
|
46
|
+
uvx python-checkup . --skip dead_code
|
|
47
|
+
|
|
48
|
+
# output formats
|
|
49
|
+
uvx python-checkup . --score # just the number
|
|
50
|
+
uvx python-checkup . --json # machine-readable
|
|
51
|
+
uvx python-checkup . --badge # shields.io URL
|
|
52
|
+
|
|
53
|
+
# CI gate
|
|
54
|
+
uvx python-checkup . --fail-under 70
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## What it runs
|
|
58
|
+
|
|
59
|
+
**Default profile:**
|
|
60
|
+
|
|
61
|
+
| Category | Tools |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Code Quality | Ruff |
|
|
64
|
+
| Type Safety | mypy |
|
|
65
|
+
| Security | Bandit, Ruff S-rules |
|
|
66
|
+
| Complexity | Radon, Ruff C901 |
|
|
67
|
+
| Dead Code | Vulture |
|
|
68
|
+
| Dependencies | deptry |
|
|
69
|
+
|
|
70
|
+
**Optional analyzers** (install via extras):
|
|
71
|
+
|
|
72
|
+
| Extra | Adds |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `vulns` | OSV-backed dependency vulnerability scanning |
|
|
75
|
+
| `secrets` | detect-secrets |
|
|
76
|
+
| `pyright` | basedpyright as type backend |
|
|
77
|
+
| `quality-extra` | typos for spelling checks |
|
|
78
|
+
| `mcp` | MCP server support |
|
|
79
|
+
| `full` | all of the above |
|
|
80
|
+
|
|
81
|
+
## Scoring
|
|
82
|
+
|
|
83
|
+
Each category gets a 0-100 score. The overall score is a weighted average:
|
|
84
|
+
|
|
85
|
+
| Category | Default Weight |
|
|
86
|
+
|---|---|
|
|
87
|
+
| Code Quality | 25 |
|
|
88
|
+
| Type Safety | 20 |
|
|
89
|
+
| Security | 20 |
|
|
90
|
+
| Complexity | 15 |
|
|
91
|
+
| Dead Code | 10 |
|
|
92
|
+
| Dependencies | 10 |
|
|
93
|
+
|
|
94
|
+
When a category has no available analyzer, its weight redistributes
|
|
95
|
+
proportionally to the rest.
|
|
96
|
+
|
|
97
|
+
| Score | Label |
|
|
98
|
+
|---|---|
|
|
99
|
+
| 75-100 | Healthy |
|
|
100
|
+
| 50-74 | Needs work |
|
|
101
|
+
| 0-49 | Critical |
|
|
102
|
+
|
|
103
|
+
See `docs/scoring.md` for the full methodology.
|
|
104
|
+
|
|
105
|
+
## Configuration
|
|
106
|
+
|
|
107
|
+
Works without config. To customize, add to `pyproject.toml`:
|
|
108
|
+
|
|
109
|
+
```toml
|
|
110
|
+
[tool.python-checkup]
|
|
111
|
+
timeout = 60
|
|
112
|
+
|
|
113
|
+
[tool.python-checkup.weights]
|
|
114
|
+
quality = 25
|
|
115
|
+
types = 20
|
|
116
|
+
security = 20
|
|
117
|
+
complexity = 15
|
|
118
|
+
dead_code = 10
|
|
119
|
+
dependencies = 10
|
|
120
|
+
|
|
121
|
+
[tool.python-checkup.thresholds]
|
|
122
|
+
healthy = 75
|
|
123
|
+
needs_work = 50
|
|
124
|
+
|
|
125
|
+
[tool.python-checkup.ignore]
|
|
126
|
+
rules = ["S101"]
|
|
127
|
+
files = ["tests/**", "migrations/**"]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
See `docs/configuration.md` for the full reference.
|
|
131
|
+
|
|
132
|
+
## CI
|
|
133
|
+
|
|
134
|
+
Gate on score:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
uvx python-checkup . --fail-under 70
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
GitHub Action:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
- uses: nabroleonx/python-checkup@v1
|
|
144
|
+
with:
|
|
145
|
+
fail-under: 70
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Also works as a pre-commit hook. See `action.yml` and `.pre-commit-hooks.yaml`.
|
|
149
|
+
|
|
150
|
+
## MCP Server
|
|
151
|
+
|
|
152
|
+
Expose python-checkup to AI coding agents (Claude Code, Cursor, VS Code):
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
uvx --from 'python-checkup[mcp]' python-checkup mcp install --editor cursor
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Registers five tools: `python_checkup_diagnose`, `python_checkup_lint`,
|
|
159
|
+
`python_checkup_typecheck`, `python_checkup_security`, `python_checkup_explain_rule`.
|
|
160
|
+
|
|
161
|
+
See `docs/mcp-server.md` for details.
|
|
162
|
+
|
|
163
|
+
## Plugins
|
|
164
|
+
|
|
165
|
+
Add custom analyzers via entry points:
|
|
166
|
+
|
|
167
|
+
```toml
|
|
168
|
+
[project.entry-points."python-checkup.analyzers"]
|
|
169
|
+
my-analyzer = "my_package:MyAnalyzer"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
See `docs/plugins.md` for the full guide.
|
|
173
|
+
|
|
174
|
+
## Docs
|
|
175
|
+
|
|
176
|
+
- `docs/configuration.md` -- weights, thresholds, ignore rules
|
|
177
|
+
- `docs/scoring.md` -- scoring methodology
|
|
178
|
+
- `docs/mcp-server.md` -- MCP server setup
|
|
179
|
+
- `docs/plugins.md` -- custom analyzer development
|
|
180
|
+
- `docs/development.md` -- contributing
|
|
181
|
+
|
|
182
|
+
## Development
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
uv sync --all-extras
|
|
186
|
+
uv run pytest
|
|
187
|
+
uv run ruff check python_checkup tests
|
|
188
|
+
uv run mypy python_checkup
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## License
|
|
192
|
+
|
|
193
|
+
MIT
|