Tech-debt
A simple tool to quantify your technical debt
Installation
requirements : python 3
pip install techdebt
Usage
- Adding debpt annotation
add debt annotations in your project files to mark technical debt:
- @debt()
- @debt("debt_type") or
- @debt("debt_type":"comment")
Let's say you have a python file with some debt :
#@debt("implementation")
def poor_function():
#@debt("implementation": "variable naming")
bla = 2
return bla
- Project configuration
Adapt the following configuration file and put it in your project folder (cf config_example.yml)
folder:
included:
- test_project/subA
- test_project/subB
excluded:
- vendor
- node_modules
- var
- web
- nbproject
- public
- .git
- __pycache__
extensions:
- .py
- .js
- .md
- .php
scores:
api: 5
implementation: 3
- Run
techdebt --conf="path/to/config_file.yml" #default is "techdebt.yml"
Plugins
You may want to have automatic code checkers do some analysis and being included in the final debt score
For now phpstan is the sole plugin available
edit configuration with the following:
plugin:
phpstan:
function_to_call: ""
folders:
- folder_to_analyse
scores:
-
adding plugin
you need to code a file plugin with a method which returns scores and then add it to the yarml file
Roadmap
- adding line file of annotation
- better reporting
- tracking debt over time
- adding estimation range
Testing
pytest -s src/lib.py
Metadata
Release files for techdebt 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| techdebt-0.1.2.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| techdebt-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / techdebt-0.1.2.tar.gz
| Download URL | techdebt-0.1.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bae75608de20133023bee945d1ff4df8447ce9241466cf7160b1fa1f8062ae7
|
|
BLAKE2b-256 checksum How to use checksums |
4fb1c96aabd44bd408aec0b2c4e365f733a2d87b59307110ee8ce8b434b64627
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10
|
Release files / techdebt-0.1.2-py3-none-any.whl
| Download URL | techdebt-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
126ecc3ba47e30f4abf5d0cdfd8198ee128731202d041f6f4122cab5380366fd
|
|
BLAKE2b-256 checksum How to use checksums |
1b1226fdb43fc92a45fe70f5f3e2b5e4e096cf5f86f7c24a46b92abd73d341ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10
|