deply 0.2.3__tar.gz → 0.2.4__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.
- {deply-0.2.3/deply.egg-info → deply-0.2.4}/PKG-INFO +1 -1
- deply-0.2.4/deply/__init__.py +1 -0
- {deply-0.2.3 → deply-0.2.4}/deply/main.py +2 -1
- {deply-0.2.3 → deply-0.2.4}/deply/reports/formats/text_report.py +7 -3
- {deply-0.2.3 → deply-0.2.4/deply.egg-info}/PKG-INFO +1 -1
- deply-0.2.3/deply/__init__.py +0 -1
- {deply-0.2.3 → deply-0.2.4}/LICENSE +0 -0
- {deply-0.2.3 → deply-0.2.4}/MANIFEST.in +0 -0
- {deply-0.2.3 → deply-0.2.4}/README.md +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/code_analyzer.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/base_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/bool_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/class_inherits_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/class_name_regex_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/collector_factory.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/decorator_usage_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/directory_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/collectors/file_regex_collector.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/config_parser.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/models/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/models/code_element.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/models/dependency.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/models/layer.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/models/violation.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/reports/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/reports/formats/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/reports/report_generator.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/rules/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/rules/base_rule.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/rules/dependency_rule.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/rules/rule_factory.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/utils/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply/utils/ast_utils.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply.egg-info/SOURCES.txt +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply.egg-info/dependency_links.txt +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply.egg-info/entry_points.txt +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply.egg-info/requires.txt +0 -0
- {deply-0.2.3 → deply-0.2.4}/deply.egg-info/top_level.txt +0 -0
- {deply-0.2.3 → deply-0.2.4}/pyproject.toml +0 -0
- {deply-0.2.3 → deply-0.2.4}/requirements.txt +0 -0
- {deply-0.2.3 → deply-0.2.4}/setup.cfg +0 -0
- {deply-0.2.3 → deply-0.2.4}/setup.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/tests/__init__.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/tests/test.py +0 -0
- {deply-0.2.3 → deply-0.2.4}/tests/test_collectors.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.2.4'
|
|
@@ -99,7 +99,6 @@ def main():
|
|
|
99
99
|
source_layer_name = code_element_to_layer.get(dependency.code_element)
|
|
100
100
|
if source_layer_name and source_layer_name in layers:
|
|
101
101
|
layers[source_layer_name].dependencies.add(dependency)
|
|
102
|
-
logging.debug(f"Assigned dependency from {dependency.code_element.name} to layer '{source_layer_name}'")
|
|
103
102
|
|
|
104
103
|
# Apply rules
|
|
105
104
|
logging.info("Applying dependency rules...")
|
|
@@ -118,10 +117,12 @@ def main():
|
|
|
118
117
|
output_path.write_text(report)
|
|
119
118
|
logging.info(f"Report written to {output_path}")
|
|
120
119
|
else:
|
|
120
|
+
print("\n")
|
|
121
121
|
print(report)
|
|
122
122
|
|
|
123
123
|
# Exit with appropriate status
|
|
124
124
|
if violations:
|
|
125
|
+
print(f"\n\nTotal violation(s): {len(violations)}")
|
|
125
126
|
exit(1)
|
|
126
127
|
else:
|
|
127
128
|
logging.info("No violations detected.")
|
|
@@ -6,9 +6,13 @@ class TextReport:
|
|
|
6
6
|
self.violations = violations
|
|
7
7
|
|
|
8
8
|
def generate(self) -> str:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
sorted_violations = sorted(
|
|
10
|
+
self.violations,
|
|
11
|
+
key=lambda v: (v.file, v.line, v.column)
|
|
12
|
+
)
|
|
13
|
+
lines = []
|
|
14
|
+
for violation in sorted_violations:
|
|
15
|
+
lines.append(
|
|
12
16
|
f"{violation.file}:{violation.line}:{violation.column} - {violation.message}"
|
|
13
17
|
# + f" ({violation.element_type} '{violation.element_name}')"
|
|
14
18
|
)
|
deply-0.2.3/deply/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.2.3'
|
|
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
|