Name | coderadar JSON |
Version |
0.5.9
JSON |
| download |
home_page | None |
Summary | Identifying the highest threats to your code quality by analyzing code metrics of your project using pytest and pylint. |
upload_time | 2024-12-03 18:08:35 |
maintainer | None |
docs_url | None |
author | Carsten König |
requires_python | >=2.7 |
license | GNU GPLv3 License |
keywords |
metrics
code quality
ci/cd
lint
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# CodeRadar
Identifying the highest threats to your code quality by analyzing code metrics of your project using pytest and pylint.
**Status:** Beta (runs, but certainly has bugs)\
**Authors:** Carsten König
## Purpose
In order to quickly see where an existing project needs refactoring, an overview of the worst code smells is needed. This package therefore summarizes these in a very brief report, that should guide you directly to the places in your software where an improvement would have the highest impact when you want to improve code quality.
CodeRadar investigates the results from Pytest and Pylint and summarizes the most important findings in a report with actionable hints that are prioritized for the best return on investment regarding your time: fixing the locations pointed out by CodeRadar will improve your code quality the most. If you fix one after the other, you will be able to improve your code step by step, with the highest impact fixes first. In order to give you feeling of progress, changes of the code quality are also indicated in the code quality report.
When run under Python 2.7 (yes, there is still legacy code out there that needs to be ported to Python 3), CodeRadar also points out Python 2/3 compatibility issues (but here in no specific order, as all of them need to be addressed).
The code quality report is available in HTML and TXT format - the latter is printed on the console when you run CodeRadar. Here is an example of the console output for a previous version of CodeRadar:
```
Code Quality Report
coderadar
--------------------------------------------------
Pytest:
Number of tests: 31 (+24)
errors: 0 (+0)
Test coverage: 42% (+26%)
--------------------------------------------------
Pylint Score: 4.20/10 (+0.36)
Missing docstrings: 21 (+21)
Needs Refactoring:
Too complex: 0 (+0) (max cyclomatic complexity=0 (+0))
: (line )
Function too long (LoC/func): 1 (+1) (max LoC/func=60 (+60))
report.py: Report._fillTemplate (line 194)
Duplicate code: 0 block(s) (+0)
0 lines in 0 modules:
Obsolete code:
Unused imports: 0 (+0)
0 imports:
Unused variables: 0 (+0)
0 variables:
Unused arguments: 1 (+0)
report.py
1 arguments: 'Report.getReportTemplate(coverage)' (l:105)
Unreachable code: 0 (+0)
0 block(s):
--------------------------------------------------
```
And here is an image of the same code quality report in HTML format:
![CodeRadar HTML code quality report](https://gitlab.com/ck2go/coderadar/-/raw/main/docs/code_quality_report_html.png)
## Installation
```bash
pip install coderadar
```
## How to use
In order to analyze your sourcecode, go to your project root folder and run
```bash
coderadar <path-to-source>
```
This will run pytest, pylint and flake8 to get the metrics that will be analyzed.
The following artifacts will be created:
- ``coverage.xml``
- ``coverage.txt``
- ``pylint.json``
- ``pylint.txt``
- ``code_quality_report.html``
- ``code_quality_report.txt``
-
If you run `coderadar` under Python 2.7, the following artifacts will be created additionally, in order to assess Python 3 compatibility:
- ``pylint_py3.json``
- ``pylint_py3.txt``
If you place these artifacts in a folder called `last_run`, located in the directory where you run the command, the results of the last run are automatically compared to the current run.
## How to contribute
No, CodeRadar itself, although developed in a (partially) test-driven manner, and being all about code quality, is also not a perfect piece of code (ironic, isn't it?). Feel free to suggest new features, report bugs or even contribute code. I would be happy to see this project grow and improve with your help.
## License
[GNU GPLv3 License](https://choosealicense.com/licenses/gpl-3.0/)
## Author
**Carsten König**
- [GitLab](https://gitlab.com/ck2go "Carsten König")
- [GitHub](https://github.com/ck2go "Carsten König")
- [LinkedIn](https://www.linkedin.com/in/ck2go/ "Carsten König")
- [Website](https://www.carsten-koenig.de "Carsten König")
Raw data
{
"_id": null,
"home_page": null,
"name": "coderadar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": null,
"keywords": "metrics, code quality, CI/CD, lint",
"author": "Carsten K\u00f6nig",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/dd/82/7f09896ff73b387e86785990b36ce7b64bf53dafaf421996aa723de69f99/coderadar-0.5.9.tar.gz",
"platform": null,
"description": "# CodeRadar\n\nIdentifying the highest threats to your code quality by analyzing code metrics of your project using pytest and pylint.\n\n**Status:** Beta (runs, but certainly has bugs)\\\n**Authors:** Carsten K\u00f6nig\n\n## Purpose\n\nIn order to quickly see where an existing project needs refactoring, an overview of the worst code smells is needed. This package therefore summarizes these in a very brief report, that should guide you directly to the places in your software where an improvement would have the highest impact when you want to improve code quality.\n\nCodeRadar investigates the results from Pytest and Pylint and summarizes the most important findings in a report with actionable hints that are prioritized for the best return on investment regarding your time: fixing the locations pointed out by CodeRadar will improve your code quality the most. If you fix one after the other, you will be able to improve your code step by step, with the highest impact fixes first. In order to give you feeling of progress, changes of the code quality are also indicated in the code quality report.\n\nWhen run under Python 2.7 (yes, there is still legacy code out there that needs to be ported to Python 3), CodeRadar also points out Python 2/3 compatibility issues (but here in no specific order, as all of them need to be addressed). \n\nThe code quality report is available in HTML and TXT format - the latter is printed on the console when you run CodeRadar. Here is an example of the console output for a previous version of CodeRadar:\n\n```\nCode Quality Report\ncoderadar\n--------------------------------------------------\nPytest:\n Number of tests: 31 (+24)\n errors: 0 (+0)\n Test coverage: 42% (+26%)\n\n--------------------------------------------------\nPylint Score: 4.20/10 (+0.36)\n Missing docstrings: 21 (+21)\n\n Needs Refactoring:\n Too complex: 0 (+0) (max cyclomatic complexity=0 (+0))\n : (line )\n Function too long (LoC/func): 1 (+1) (max LoC/func=60 (+60))\n report.py: Report._fillTemplate (line 194)\n Duplicate code: 0 block(s) (+0)\n 0 lines in 0 modules:\n \n\n Obsolete code:\n Unused imports: 0 (+0)\n \n 0 imports: \n Unused variables: 0 (+0)\n \n 0 variables: \n Unused arguments: 1 (+0)\n report.py\n 1 arguments: 'Report.getReportTemplate(coverage)' (l:105)\n Unreachable code: 0 (+0)\n \n 0 block(s): \n\n--------------------------------------------------\n```\n\nAnd here is an image of the same code quality report in HTML format:\n![CodeRadar HTML code quality report](https://gitlab.com/ck2go/coderadar/-/raw/main/docs/code_quality_report_html.png)\n\n## Installation\n\n```bash\npip install coderadar\n```\n\n## How to use\nIn order to analyze your sourcecode, go to your project root folder and run\n\n```bash\ncoderadar <path-to-source>\n```\nThis will run pytest, pylint and flake8 to get the metrics that will be analyzed.\n\nThe following artifacts will be created:\n\n- ``coverage.xml``\n- ``coverage.txt``\n- ``pylint.json``\n- ``pylint.txt``\n- ``code_quality_report.html``\n- ``code_quality_report.txt``\n- \nIf you run `coderadar` under Python 2.7, the following artifacts will be created additionally, in order to assess Python 3 compatibility:\n- ``pylint_py3.json`` \n- ``pylint_py3.txt``\n\nIf you place these artifacts in a folder called `last_run`, located in the directory where you run the command, the results of the last run are automatically compared to the current run.\n\n## How to contribute\n\nNo, CodeRadar itself, although developed in a (partially) test-driven manner, and being all about code quality, is also not a perfect piece of code (ironic, isn't it?). Feel free to suggest new features, report bugs or even contribute code. I would be happy to see this project grow and improve with your help. \n\n## License\n[GNU GPLv3 License](https://choosealicense.com/licenses/gpl-3.0/)\n\n## Author\n**Carsten K\u00f6nig**\n\n- [GitLab](https://gitlab.com/ck2go \"Carsten K\u00f6nig\")\n- [GitHub](https://github.com/ck2go \"Carsten K\u00f6nig\")\n- [LinkedIn](https://www.linkedin.com/in/ck2go/ \"Carsten K\u00f6nig\")\n- [Website](https://www.carsten-koenig.de \"Carsten K\u00f6nig\")\n",
"bugtrack_url": null,
"license": "GNU GPLv3 License",
"summary": "Identifying the highest threats to your code quality by analyzing code metrics of your project using pytest and pylint.",
"version": "0.5.9",
"project_urls": {
"Homepage": "https://gitlab.com/ck2go/coderadar"
},
"split_keywords": [
"metrics",
" code quality",
" ci/cd",
" lint"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b21cc1c8de693b051e5bef62e5533033215a69dd3f763dd50a090ea34ea07d08",
"md5": "f4acd55422157d0ef01ecd496f766f64",
"sha256": "4c1e129726a63a4f75f3a08f19e19085cee3a649b50ca9774df6f04bda12c66e"
},
"downloads": -1,
"filename": "coderadar-0.5.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f4acd55422157d0ef01ecd496f766f64",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2.7",
"size": 34676,
"upload_time": "2024-12-03T18:08:33",
"upload_time_iso_8601": "2024-12-03T18:08:33.664533Z",
"url": "https://files.pythonhosted.org/packages/b2/1c/c1c8de693b051e5bef62e5533033215a69dd3f763dd50a090ea34ea07d08/coderadar-0.5.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dd827f09896ff73b387e86785990b36ce7b64bf53dafaf421996aa723de69f99",
"md5": "8219bf2c3d0dc3685c0071da534e035f",
"sha256": "7f934b93544764a5ca3bf015b7f9dceec13b2a6f0732f760d85e3b04619f6159"
},
"downloads": -1,
"filename": "coderadar-0.5.9.tar.gz",
"has_sig": false,
"md5_digest": "8219bf2c3d0dc3685c0071da534e035f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 128114,
"upload_time": "2024-12-03T18:08:35",
"upload_time_iso_8601": "2024-12-03T18:08:35.074248Z",
"url": "https://files.pythonhosted.org/packages/dd/82/7f09896ff73b387e86785990b36ce7b64bf53dafaf421996aa723de69f99/coderadar-0.5.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 18:08:35",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "ck2go",
"gitlab_project": "coderadar",
"lcname": "coderadar"
}