metripy 0.3.3__tar.gz → 0.3.5__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.
Potentially problematic release.
This version of metripy might be problematic. Click here for more details.
- {metripy-0.3.3 → metripy-0.3.5}/CHANGELOG.md +8 -0
- {metripy-0.3.3/metripy.egg-info → metripy-0.3.5}/PKG-INFO +2 -2
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/File/ConfigFileReaderInterface.py +1 -1
- metripy-0.3.5/metripy/Application/Info.py +61 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/TrendsPageRenderer.py +23 -0
- {metripy-0.3.3 → metripy-0.3.5/metripy.egg-info}/PKG-INFO +2 -2
- {metripy-0.3.3 → metripy-0.3.5}/metripy.egg-info/requires.txt +1 -1
- {metripy-0.3.3 → metripy-0.3.5}/pyproject.toml +2 -2
- metripy-0.3.3/metripy/Application/Info.py +0 -36
- {metripy-0.3.3 → metripy-0.3.5}/LICENSE +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/MANIFEST.in +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/README.md +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Analyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Application.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/Config.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/File/ConfigFileReaderFactory.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/File/JsonConfigFileReader.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/File/YamlConfigFileReader.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/GitConfig.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/Parser.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/ProjectConfig.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/Config/ReportConfig.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Application/__init__.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Component/Debug/Debugger.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Component/File/Finder.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Component/Output/CliOutput.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Component/Output/ProgressBar.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Composer/Composer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Composer/Packegist.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Dependency.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Npm/Npm.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Npm/NpmOrg.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Pip/Pip.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Dependency/Pip/PyPi.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Git/GitAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Import/Json/JsonImporter.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/AbstractLangAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Generic/HalSteadAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Generic/__init__.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Php/PhpAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Php/PhpBasicAstParser.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Php/PhpBasicLocAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Php/PhpHalSteadAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Python/PythonAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Python/PythonHalSteadAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptAstParser.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptBasicComplexityAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptBasicLocAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptHalSteadAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/__init__.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Code/AggregatedMetrics.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Code/FileMetrics.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Code/ModuleMetrics.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Code/SegmentedMetrics.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Code/Segmentor.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/FileTree/FileTree.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/FileTree/FileTreeParser.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Git/GitCodeHotspot.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Git/GitContributor.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Git/GitKnowledgeSilo.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Git/GitMetrics.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/ProjectMetrics.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Trend/AggregatedTrendMetric.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Trend/ClassTrendMetric.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Trend/FileTrendMetric.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Trend/FunctionTrendMetric.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Metric/Trend/SegmentedTrendMetric.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Csv/Reporter.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/DependencyPageRenderer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/FilesPageRenderer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/GitAnalysisPageRenderer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/IndexPageRenderer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/PageRenderer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/PageRendererFactory.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/Reporter.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Html/TopOffendersPageRenderer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Json/AbstractJsonReporter.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Json/GitJsonReporter.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/Json/JsonReporter.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/ReporterFactory.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Report/ReporterInterface.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Tree/ClassNode.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Tree/FunctionNode.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Tree/ModuleNode.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/Trend/TrendAnalyzer.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/__init__.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/metripy.py +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/css/styles.css +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/dependencies.html +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/files.html +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/git_analysis.html +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/images/logo.svg +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/index.html +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/js/charts.js +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/js/dashboard.js +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/js/git_analysis.js +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/top_offenders.html +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy/templates/html_report/trends.html +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy.egg-info/SOURCES.txt +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy.egg-info/dependency_links.txt +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy.egg-info/entry_points.txt +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/metripy.egg-info/top_level.txt +0 -0
- {metripy-0.3.3 → metripy-0.3.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metripy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: A Python tool to generate multi project, multi language code metric reports
|
|
5
5
|
Author-email: Yannick Zimmermann <yannick.zimmermann@proton.me>
|
|
6
6
|
License: MIT
|
|
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: lizard==1.18.0
|
|
21
21
|
Requires-Dist: GitPython==3.1.45
|
|
22
|
-
Requires-Dist: py-template-engine>=0.
|
|
22
|
+
Requires-Dist: py-template-engine>=0.2.6
|
|
23
23
|
Requires-Dist: radon==6.0.1
|
|
24
24
|
Requires-Dist: requests==2.32.5
|
|
25
25
|
Requires-Dist: packaging==25.0
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from importlib.metadata import version, metadata
|
|
2
|
+
import toml
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Info:
|
|
6
|
+
def __init__(self):
|
|
7
|
+
self.version = self._get_version()
|
|
8
|
+
self.url = self._get_homepage_url()
|
|
9
|
+
|
|
10
|
+
def _get_pyproject_data(self) -> dict:
|
|
11
|
+
with open("pyproject.toml", "r") as file:
|
|
12
|
+
data = toml.load(file)
|
|
13
|
+
return data
|
|
14
|
+
|
|
15
|
+
def _get_version(self) -> str:
|
|
16
|
+
"""Get version from installed package metadata"""
|
|
17
|
+
try:
|
|
18
|
+
return version("metripy")
|
|
19
|
+
except Exception:
|
|
20
|
+
# Fallback for development if not installed
|
|
21
|
+
return self._get_pyproject_data()["project"]["version"]
|
|
22
|
+
|
|
23
|
+
def _get_homepage_url(self) -> str:
|
|
24
|
+
"""Get homepage URL from installed package metadata"""
|
|
25
|
+
try:
|
|
26
|
+
meta = metadata("metripy")
|
|
27
|
+
# Try to get Home-Page from metadata
|
|
28
|
+
homepage = meta.get("Home-Page")
|
|
29
|
+
if not homepage:
|
|
30
|
+
# Try Project-URL field
|
|
31
|
+
for line in meta.get_all("Project-URL") or []:
|
|
32
|
+
if line.startswith("Homepage"):
|
|
33
|
+
homepage = line.split(",", 1)[1].strip()
|
|
34
|
+
break
|
|
35
|
+
return homepage or "no homepage found"
|
|
36
|
+
except Exception:
|
|
37
|
+
# Fallback
|
|
38
|
+
return self._get_pyproject_data()["project"]["urls"]["Homepage"]
|
|
39
|
+
|
|
40
|
+
def get_version(self) -> str:
|
|
41
|
+
return self.version
|
|
42
|
+
|
|
43
|
+
def get_version_info(self) -> str:
|
|
44
|
+
return f"""
|
|
45
|
+
Metripy {self.get_version()}
|
|
46
|
+
{self.url}
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def get_help(self) -> str:
|
|
50
|
+
return (
|
|
51
|
+
self.get_version_info()
|
|
52
|
+
+ """
|
|
53
|
+
Usage: metripy [options]
|
|
54
|
+
Options:
|
|
55
|
+
--config=<file> Use a custom config file
|
|
56
|
+
--version Show the version and exit
|
|
57
|
+
--help Show this help message and exit
|
|
58
|
+
--debug Enable debug mode
|
|
59
|
+
--quiet Disable output
|
|
60
|
+
"""
|
|
61
|
+
)
|
|
@@ -22,6 +22,29 @@ class TrendsPageRenderer(PageRenderer):
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
def render(self, metrics: ProjectMetrics):
|
|
25
|
+
if metrics.total_code_metrics.trend is None:
|
|
26
|
+
self.render_template(
|
|
27
|
+
"trends.html",
|
|
28
|
+
{
|
|
29
|
+
"has_trend_data": False,
|
|
30
|
+
"trend_data": {
|
|
31
|
+
"top_improved_complexity": [],
|
|
32
|
+
"top_improved_maintainability": [],
|
|
33
|
+
"top_worsened_complexity": [],
|
|
34
|
+
"top_worsened_maintainability": [],
|
|
35
|
+
"loc_segments_current": {},
|
|
36
|
+
"loc_segments_prev": {},
|
|
37
|
+
"complexity_segments_current": {},
|
|
38
|
+
"complexity_segments_prev": {},
|
|
39
|
+
"maintainability_segments_current": {},
|
|
40
|
+
"maintainability_segments_prev": {},
|
|
41
|
+
"method_size_segments_current": {},
|
|
42
|
+
"method_size_segments_prev": {},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
)
|
|
46
|
+
return
|
|
47
|
+
|
|
25
48
|
# Top improved complexity (complexity went down - negative delta)
|
|
26
49
|
top_improved_complexity = [
|
|
27
50
|
x
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metripy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: A Python tool to generate multi project, multi language code metric reports
|
|
5
5
|
Author-email: Yannick Zimmermann <yannick.zimmermann@proton.me>
|
|
6
6
|
License: MIT
|
|
@@ -19,7 +19,7 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: lizard==1.18.0
|
|
21
21
|
Requires-Dist: GitPython==3.1.45
|
|
22
|
-
Requires-Dist: py-template-engine>=0.
|
|
22
|
+
Requires-Dist: py-template-engine>=0.2.6
|
|
23
23
|
Requires-Dist: radon==6.0.1
|
|
24
24
|
Requires-Dist: requests==2.32.5
|
|
25
25
|
Requires-Dist: packaging==25.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "metripy"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.5"
|
|
8
8
|
description = "A Python tool to generate multi project, multi language code metric reports"
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Yannick Zimmermann", email = "yannick.zimmermann@proton.me"}
|
|
@@ -37,7 +37,7 @@ classifiers = [
|
|
|
37
37
|
dependencies = [
|
|
38
38
|
"lizard==1.18.0",
|
|
39
39
|
"GitPython==3.1.45",
|
|
40
|
-
"py-template-engine>=0.
|
|
40
|
+
"py-template-engine>=0.2.6",
|
|
41
41
|
"radon==6.0.1",
|
|
42
42
|
"requests==2.32.5",
|
|
43
43
|
"packaging==25.0",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import toml
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Info:
|
|
5
|
-
def __init__(self):
|
|
6
|
-
data = self._get_data()
|
|
7
|
-
self.version = data["project"]["version"]
|
|
8
|
-
self.url = data["project"]["urls"]["Homepage"]
|
|
9
|
-
|
|
10
|
-
def _get_data(self) -> dict:
|
|
11
|
-
with open("pyproject.toml", "r") as file:
|
|
12
|
-
data = toml.load(file)
|
|
13
|
-
return data
|
|
14
|
-
|
|
15
|
-
def get_version(self) -> str:
|
|
16
|
-
return self.version
|
|
17
|
-
|
|
18
|
-
def get_version_info(self) -> str:
|
|
19
|
-
return f"""
|
|
20
|
-
Metripy {self.get_version()}
|
|
21
|
-
{self.url}
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
def get_help(self) -> str:
|
|
25
|
-
return (
|
|
26
|
-
self.get_version_info()
|
|
27
|
-
+ """
|
|
28
|
-
Usage: metripy [options]
|
|
29
|
-
Options:
|
|
30
|
-
--config=<file> Use a custom config file
|
|
31
|
-
--version Show the version and exit
|
|
32
|
-
--help Show this help message and exit
|
|
33
|
-
--debug Enable debug mode
|
|
34
|
-
--quiet Disable output
|
|
35
|
-
"""
|
|
36
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptBasicComplexityAnalyzer.py
RENAMED
|
File without changes
|
{metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptBasicLocAnalyzer.py
RENAMED
|
File without changes
|
{metripy-0.3.3 → metripy-0.3.5}/metripy/LangAnalyzer/Typescript/TypescriptHalSteadAnalyzer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|