metripy 0.2.7__py3-none-any.whl

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.

Potentially problematic release.


This version of metripy might be problematic. Click here for more details.

Files changed (66) hide show
  1. metripy/Application/Analyzer.py +106 -0
  2. metripy/Application/Application.py +54 -0
  3. metripy/Application/Config/Config.py +13 -0
  4. metripy/Application/Config/File/ConfigFileReaderFactory.py +24 -0
  5. metripy/Application/Config/File/ConfigFileReaderInterface.py +14 -0
  6. metripy/Application/Config/File/JsonConfigFileReader.py +82 -0
  7. metripy/Application/Config/GitConfig.py +10 -0
  8. metripy/Application/Config/Parser.py +31 -0
  9. metripy/Application/Config/ProjectConfig.py +27 -0
  10. metripy/Application/Config/ReportConfig.py +10 -0
  11. metripy/Application/__init__.py +0 -0
  12. metripy/Component/Debug/Debugger.py +20 -0
  13. metripy/Component/File/Finder.py +37 -0
  14. metripy/Component/Output/CliOutput.py +49 -0
  15. metripy/Component/Output/ProgressBar.py +27 -0
  16. metripy/Dependency/Composer/Composer.py +30 -0
  17. metripy/Dependency/Composer/Packegist.py +55 -0
  18. metripy/Dependency/Dependency.py +30 -0
  19. metripy/Dependency/Npm/Npm.py +30 -0
  20. metripy/Dependency/Npm/NpmOrg.py +47 -0
  21. metripy/Dependency/Pip/Pip.py +69 -0
  22. metripy/Dependency/Pip/PyPi.py +49 -0
  23. metripy/Git/GitAnalyzer.py +86 -0
  24. metripy/LangAnalyzer/AbstractLangAnalyzer.py +65 -0
  25. metripy/LangAnalyzer/Generic/HalSteadAnalyzer.py +58 -0
  26. metripy/LangAnalyzer/Generic/__init__.py +0 -0
  27. metripy/LangAnalyzer/Php/PhpAnalyzer.py +193 -0
  28. metripy/LangAnalyzer/Php/PhpBasicAstParser.py +56 -0
  29. metripy/LangAnalyzer/Php/PhpBasicLocAnalyzer.py +174 -0
  30. metripy/LangAnalyzer/Php/PhpHalSteadAnalyzer.py +44 -0
  31. metripy/LangAnalyzer/Python/PythonAnalyzer.py +129 -0
  32. metripy/LangAnalyzer/Typescript/TypescriptAnalyzer.py +208 -0
  33. metripy/LangAnalyzer/Typescript/TypescriptAstParser.py +68 -0
  34. metripy/LangAnalyzer/Typescript/TypescriptBasicComplexityAnalyzer.py +114 -0
  35. metripy/LangAnalyzer/Typescript/TypescriptBasicLocAnalyzer.py +69 -0
  36. metripy/LangAnalyzer/Typescript/TypescriptHalSteadAnalyzer.py +55 -0
  37. metripy/LangAnalyzer/__init__.py +0 -0
  38. metripy/Metric/Code/AggregatedMetrics.py +42 -0
  39. metripy/Metric/Code/FileMetrics.py +33 -0
  40. metripy/Metric/Code/ModuleMetrics.py +32 -0
  41. metripy/Metric/Code/SegmentedMetrics.py +65 -0
  42. metripy/Metric/FileTree/FileTree.py +15 -0
  43. metripy/Metric/FileTree/FileTreeParser.py +42 -0
  44. metripy/Metric/Git/GitCodeHotspot.py +37 -0
  45. metripy/Metric/Git/GitContributor.py +37 -0
  46. metripy/Metric/Git/GitKnowledgeSilo.py +27 -0
  47. metripy/Metric/Git/GitMetrics.py +148 -0
  48. metripy/Metric/ProjectMetrics.py +55 -0
  49. metripy/Report/Csv/Reporter.py +12 -0
  50. metripy/Report/Html/Reporter.py +210 -0
  51. metripy/Report/Json/AbstractJsonReporter.py +11 -0
  52. metripy/Report/Json/GitJsonReporter.py +21 -0
  53. metripy/Report/Json/JsonReporter.py +12 -0
  54. metripy/Report/ReporterFactory.py +22 -0
  55. metripy/Report/ReporterInterface.py +17 -0
  56. metripy/Tree/ClassNode.py +32 -0
  57. metripy/Tree/FunctionNode.py +49 -0
  58. metripy/Tree/ModuleNode.py +42 -0
  59. metripy/__init__.py +0 -0
  60. metripy/metripy.py +15 -0
  61. metripy-0.2.7.dist-info/METADATA +113 -0
  62. metripy-0.2.7.dist-info/RECORD +66 -0
  63. metripy-0.2.7.dist-info/WHEEL +5 -0
  64. metripy-0.2.7.dist-info/entry_points.txt +2 -0
  65. metripy-0.2.7.dist-info/licenses/LICENSE +21 -0
  66. metripy-0.2.7.dist-info/top_level.txt +1 -0
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: metripy
3
+ Version: 0.2.7
4
+ Summary: A Python tool to generate multi project, multi language code metric reports
5
+ Author-email: Yannick Zimmermann <yannick.zimmermann@proton.me>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/zimmer-yan/codemetrics
8
+ Project-URL: Repository, https://github.com/zimmer-yan/codemetrics
9
+ Project-URL: Documentation, https://github.com/zimmer-yan/codemetrics#readme
10
+ Project-URL: Bug Tracker, https://github.com/zimmer-yan/codemetrics/issues
11
+ Keywords: code metrics,multi-language,code analysis,git metrics,code visualization,software quality,static analysis,repository insights,developer productivity,codebase health,technical debt,language-agnostic
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: lizard==1.18.0
21
+ Requires-Dist: GitPython==3.1.45
22
+ Requires-Dist: py-template-engine>=0.1.0
23
+ Requires-Dist: radon==6.0.1
24
+ Requires-Dist: requests==2.32.5
25
+ Requires-Dist: packaging==25.0
26
+ Requires-Dist: toml==0.10.2
27
+ Requires-Dist: tree-sitter==0.21.3
28
+ Requires-Dist: tree-sitter-languages==1.10.2
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
31
+ Requires-Dist: pytest-cov==7.0.0; extra == "dev"
32
+ Requires-Dist: pytest-mock==3.15.1; extra == "dev"
33
+ Requires-Dist: black>=22.0.0; extra == "dev"
34
+ Requires-Dist: flake8>=5.0.0; extra == "dev"
35
+ Requires-Dist: mypy>=0.991; extra == "dev"
36
+ Requires-Dist: poethepoet==0.37.0; extra == "dev"
37
+ Requires-Dist: isort==7.0.0; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # Codemetrics
41
+ A multilanguage, multi project code metrics analysis tool.
42
+
43
+ # Languages
44
+ Supported languages
45
+ - Python (with radon)
46
+ - Php (experimental)
47
+ - Typescript (experimental)
48
+ - TBD
49
+
50
+ # Analysis types
51
+
52
+ ## Code analysis
53
+ Analyses code with cyclomatic complexity, maintainability index, halstead metrics.
54
+
55
+ ## Git analysis
56
+ Analyses git stats of the past months
57
+
58
+ ## Dependeny analysis
59
+ Analyzses composer, npm or pip dependencies
60
+
61
+ More dependencies TBD
62
+
63
+ # Report formats
64
+
65
+ ## Html
66
+ Generates an easy to read dashboard
67
+
68
+ TODO: as this application generates multi project reports, add central dashboard to have project specific insights at first glance
69
+
70
+ ## Csv
71
+ Coming soon...
72
+
73
+ ## Json
74
+ Coming soon...
75
+
76
+ ## Cli
77
+ Coming soon...
78
+
79
+ # Configuration
80
+ Configuration is for the moment only possible with the `--config=<file>.json` option. More TBD
81
+
82
+ Sample configuraiton:
83
+ ```json
84
+ {
85
+ "configs": {
86
+ "metripy": {
87
+ "base_path": "./", // base path to look at
88
+ "includes": [
89
+ "metripy/" // paths to include from the base path on
90
+ ],
91
+ "excludes": [
92
+ "__pycache__" // exclude patterns of paths / files
93
+ ],
94
+ "extensions": [
95
+ "py" // file extensions to look at
96
+ ],
97
+ "git": { // if git is set, analyzes git history
98
+ "branch": "main" // git branch to look at
99
+ },
100
+ "composer": true, // looks for base_path/composer.json and analyzes dependencies - for php projects
101
+ "npm": true, // looks for base_path/package.json and analyzes dependencies - for ts/js projects
102
+ "pip": true,
103
+ // looks for base_path/requirements.txt or base_path/pyproject.toml and analyzes dependencies - for python projects
104
+ "reports": {
105
+ "html": "./build/report/codemetrics", // report should be put into this directory
106
+ "json-git": "./build/json-report/codemetrics-git.json" // file where to put git json report
107
+ // more types of reports TBA
108
+ }
109
+ },
110
+ // next project name: { next config... }
111
+ }
112
+ }
113
+ ```
@@ -0,0 +1,66 @@
1
+ metripy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ metripy/metripy.py,sha256=Iiggyf5cMv3xoJyyec6MpqPLb0afYnPyOYY26oiq6ro,266
3
+ metripy/Application/Analyzer.py,sha256=QoKk7iKvgYp5AwvXnsrEwAxAqWFXNhdn9HHJDkzvj20,4043
4
+ metripy/Application/Application.py,sha256=mmvb2Af3AsfcDVwhf5LB5xVWxE5XmKSSaW_IY7ur2Qw,1971
5
+ metripy/Application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ metripy/Application/Config/Config.py,sha256=VyBBYtbVNkrdevxkIGlASSCgK7pmq2WLW6DVKUMb6B4,353
7
+ metripy/Application/Config/GitConfig.py,sha256=4y676GYv-FH6QyLxh6IQn64gUG9xOQciMgkXH9pJtb4,220
8
+ metripy/Application/Config/Parser.py,sha256=T5o17gYpIE1Njiik1vaITCcDgq9szTU6GcQcPl_ufUg,904
9
+ metripy/Application/Config/ProjectConfig.py,sha256=N2xPkc10NF3mHywR36vpxsrcdJyw-VTFzbwQpLq5uHw,932
10
+ metripy/Application/Config/ReportConfig.py,sha256=Vh3S1n2nyH5YNmt8JrfGRTcmYZuqLMxyFnFF5mmxu_4,259
11
+ metripy/Application/Config/File/ConfigFileReaderFactory.py,sha256=K6p5x5TgF6I0acfq3dnU_wKWRWMD-e1EEa0_nrf7t8g,925
12
+ metripy/Application/Config/File/ConfigFileReaderInterface.py,sha256=atBdkvofs4HNI53ja_Knpi99N1H2NVKg16ohYFlH2bw,281
13
+ metripy/Application/Config/File/JsonConfigFileReader.py,sha256=yUlrbqPU802z8Lbo6oGD1Q_bDT1s_4ODRShrneTavAg,2808
14
+ metripy/Component/Debug/Debugger.py,sha256=LhkHzUGNSEPvIvcjZJJob5Fjg5NQhk7Rs43y1Bkc7hw,423
15
+ metripy/Component/File/Finder.py,sha256=1vP3KD98zxBuIShNlfCOVVLbjOQPLJnrIsUvLzxnVnM,1399
16
+ metripy/Component/Output/CliOutput.py,sha256=XJ5vJa7jxoukk4fRuj1UVV7GNkkZx-4Jb_Pl7ZYOSFk,1197
17
+ metripy/Component/Output/ProgressBar.py,sha256=PmYQYwINXn9sYO0FKqT8tF-FaFLrPko-lJfi6jxbNsA,725
18
+ metripy/Dependency/Dependency.py,sha256=6YSuNPEAbJY5MZ_8ZwMyppnWA_j84dwKx_hzm0eYmYc,1002
19
+ metripy/Dependency/Composer/Composer.py,sha256=tOVo8-NJfn0bRK-K4-hhq394tfigOtE6-5ZXOPTb_jw,1033
20
+ metripy/Dependency/Composer/Packegist.py,sha256=ioeIwNg6Yhz0bk13UpB7saq4eqB0-3Zy9PdfcE3CIbA,1980
21
+ metripy/Dependency/Npm/Npm.py,sha256=OB05MZJ312dRw909Pj4Np4bqHQ5oVOylqnzdfXdRvhM,975
22
+ metripy/Dependency/Npm/NpmOrg.py,sha256=9igY0dZRP2L36jcCsn8I8WgfxjWhJ2FShcIV9ph-Zfs,1551
23
+ metripy/Dependency/Pip/Pip.py,sha256=4OydPjP-EK5PRWJfjL9vjFacyTRML1fYs_J9MuC_hrI,2318
24
+ metripy/Dependency/Pip/PyPi.py,sha256=Hqpk5rUw-sN23tgWVUaYMuLN43BR8LdbmNJzkKq9gEo,1612
25
+ metripy/Git/GitAnalyzer.py,sha256=k1396AKkZHlCHZZTtlBHMNO73Cnhcte2ageXJo4ObVY,3071
26
+ metripy/LangAnalyzer/AbstractLangAnalyzer.py,sha256=Wa7ucL7Wy6J8f13GyCOjRKYFgPuJPuZjE8t24fDUf2U,1896
27
+ metripy/LangAnalyzer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ metripy/LangAnalyzer/Generic/HalSteadAnalyzer.py,sha256=z8h3V7mud5NnzQ67I9G3YhTFKHjO6Z-e_ida2d32YZ4,1845
29
+ metripy/LangAnalyzer/Generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ metripy/LangAnalyzer/Php/PhpAnalyzer.py,sha256=g4Kj3IjL0BgBUY-Ons1MitdandglK-26R324b9AFBJs,7449
31
+ metripy/LangAnalyzer/Php/PhpBasicAstParser.py,sha256=T717e7hM67HBOZ7mvl7Jr4RkCF-Hq-sUMzk__UTheeU,1874
32
+ metripy/LangAnalyzer/Php/PhpBasicLocAnalyzer.py,sha256=2Vt3pbU0BEy2p8em3ZW_qOe9eGigtpZzVoEhe11S2O8,6229
33
+ metripy/LangAnalyzer/Php/PhpHalSteadAnalyzer.py,sha256=XgEo1dXSpIYWBWt9wEQxigpNdLWs-BteX2U2lVLVpl8,1037
34
+ metripy/LangAnalyzer/Python/PythonAnalyzer.py,sha256=sUNLtFge_1zXqBa5qlaaghxPunaSHQAHPOoS1U3XtQc,5043
35
+ metripy/LangAnalyzer/Typescript/TypescriptAnalyzer.py,sha256=eURSa3EYWP8DBJugcM81ctw3H-wFPzp8U7Gup35AhJM,8106
36
+ metripy/LangAnalyzer/Typescript/TypescriptAstParser.py,sha256=6kEw3tm9_eIOXkBY_V5YCFXHdb_PI-1TDEELrInPSKE,2917
37
+ metripy/LangAnalyzer/Typescript/TypescriptBasicComplexityAnalyzer.py,sha256=abQXNPywSoplozwwV1qm8tRKyPkCAhxBF8gHigECeZ0,3797
38
+ metripy/LangAnalyzer/Typescript/TypescriptBasicLocAnalyzer.py,sha256=hxNqVGDUBb0Dy4cvQFTqfz5cCJTQ8B4uWu9hBnzSO2Y,2336
39
+ metripy/LangAnalyzer/Typescript/TypescriptHalSteadAnalyzer.py,sha256=yOW_55R4PcTNA2BffCiugqkBH1ONuYkZCFo2No4hz0w,1278
40
+ metripy/Metric/ProjectMetrics.py,sha256=dYAlObYrdIGV6qvcP0_amdRIL66vvVipDeuq2gMax0Y,2094
41
+ metripy/Metric/Code/AggregatedMetrics.py,sha256=fLAuvM6f_ToFICQMsxZ8azNv2OTBQvbzETCJ8vA9SQY,1559
42
+ metripy/Metric/Code/FileMetrics.py,sha256=BnAhjHeJawBV8X4EOLtJ4-aL-VmfKj4AGXmEoRV-gQE,1150
43
+ metripy/Metric/Code/ModuleMetrics.py,sha256=J0eKYFm_m3lIJUjU0YkoADPs6HvNxHkJXHr69QTKXl8,1185
44
+ metripy/Metric/Code/SegmentedMetrics.py,sha256=DqXZsagrz5yicAECXGO8e6xvhY9SivkhJvQKH9TKtaw,1730
45
+ metripy/Metric/FileTree/FileTree.py,sha256=X5KeQ26lCEcUcYoa8q6ITO0kpgqphLmXWlG-NGeXpX0,467
46
+ metripy/Metric/FileTree/FileTreeParser.py,sha256=GUnSX1RZ--nB6srYSy-NZm1VZh34Bgnq2yuAvfpmlUM,1291
47
+ metripy/Metric/Git/GitCodeHotspot.py,sha256=zdqmXZu9cELpJ7-KGTW3tbmD2so2R6c0w1gYg2OU1jc,1291
48
+ metripy/Metric/Git/GitContributor.py,sha256=Sn3Rmds7tr1H6CsR8bJ2cfuwG7tRj0vVadD28dKa6OE,1172
49
+ metripy/Metric/Git/GitKnowledgeSilo.py,sha256=arla_KR2zyfw9O5QPDhxBrkc-bfQ-pvQuA6GUgv2c44,946
50
+ metripy/Metric/Git/GitMetrics.py,sha256=k-MOdHaT6nOgHjQlRjjhrjIk9UjKiPMNKfjNP2WcWjM,5769
51
+ metripy/Report/ReporterFactory.py,sha256=JKjQVGShC0PPUT5HiIuJ2lgzloQ5lHNeA5SSK8AciWU,897
52
+ metripy/Report/ReporterInterface.py,sha256=OZEE3SXpTKNOKQBzPytqxqViUFzPhlBUjkBTMlib0qE,543
53
+ metripy/Report/Csv/Reporter.py,sha256=rC52vfJYavB_9yZ3-QA7aRF0Ez34lkiBOpw2mWll2m8,431
54
+ metripy/Report/Html/Reporter.py,sha256=rHl8IYVJqy_GItGBPAdkEoLntIGB-pieIXMMdNnMv50,8638
55
+ metripy/Report/Json/AbstractJsonReporter.py,sha256=yqpBOO6MAN2HdhwoWOZ7Ler38WbV8DcG5g2oASXe-i8,343
56
+ metripy/Report/Json/GitJsonReporter.py,sha256=4mOmoBSuCDzMSnQRAoWRckI6MPGig_25IDVwklBfuvk,850
57
+ metripy/Report/Json/JsonReporter.py,sha256=6r1dIoVyGVr-Jds34SGmdGa8SJihy9_qYpkxZZ4ECQ0,390
58
+ metripy/Tree/ClassNode.py,sha256=uh2JJ3s9H6sCcj_ppElODUvvA525oHVnuhrW-ktzMj8,916
59
+ metripy/Tree/FunctionNode.py,sha256=c2T78uGVkNRF_c2jCVmtfAwNFeY3MgASbUApROAsl3c,1520
60
+ metripy/Tree/ModuleNode.py,sha256=YHlkAJKWWjy1oAhg7IdrvYnTOxpBYnq_VJS_ykey5_Y,1238
61
+ metripy-0.2.7.dist-info/licenses/LICENSE,sha256=RQUMdlYUkqBhJgf7iIlzqrlaYz8VGr6KAn60wkv3FzE,1067
62
+ metripy-0.2.7.dist-info/METADATA,sha256=dzY1Cec6ZAMyfLNZRcY2yKkACKkQwekQU9A7u7zNT38,3879
63
+ metripy-0.2.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
64
+ metripy-0.2.7.dist-info/entry_points.txt,sha256=vZI1vreNyXX9XGDUQlOnE2cSBRWNyXOlXXFnEBsVNIA,49
65
+ metripy-0.2.7.dist-info/top_level.txt,sha256=Z-tn-27QGcxzNrsRq7BNPQv2BlXJnMCp8bp2sPdde1Y,8
66
+ metripy-0.2.7.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ metripy = metripy.metripy:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 CodeMetrics
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 @@
1
+ metripy