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.
Files changed (46) hide show
  1. {deply-0.2.3/deply.egg-info → deply-0.2.4}/PKG-INFO +1 -1
  2. deply-0.2.4/deply/__init__.py +1 -0
  3. {deply-0.2.3 → deply-0.2.4}/deply/main.py +2 -1
  4. {deply-0.2.3 → deply-0.2.4}/deply/reports/formats/text_report.py +7 -3
  5. {deply-0.2.3 → deply-0.2.4/deply.egg-info}/PKG-INFO +1 -1
  6. deply-0.2.3/deply/__init__.py +0 -1
  7. {deply-0.2.3 → deply-0.2.4}/LICENSE +0 -0
  8. {deply-0.2.3 → deply-0.2.4}/MANIFEST.in +0 -0
  9. {deply-0.2.3 → deply-0.2.4}/README.md +0 -0
  10. {deply-0.2.3 → deply-0.2.4}/deply/code_analyzer.py +0 -0
  11. {deply-0.2.3 → deply-0.2.4}/deply/collectors/__init__.py +0 -0
  12. {deply-0.2.3 → deply-0.2.4}/deply/collectors/base_collector.py +0 -0
  13. {deply-0.2.3 → deply-0.2.4}/deply/collectors/bool_collector.py +0 -0
  14. {deply-0.2.3 → deply-0.2.4}/deply/collectors/class_inherits_collector.py +0 -0
  15. {deply-0.2.3 → deply-0.2.4}/deply/collectors/class_name_regex_collector.py +0 -0
  16. {deply-0.2.3 → deply-0.2.4}/deply/collectors/collector_factory.py +0 -0
  17. {deply-0.2.3 → deply-0.2.4}/deply/collectors/decorator_usage_collector.py +0 -0
  18. {deply-0.2.3 → deply-0.2.4}/deply/collectors/directory_collector.py +0 -0
  19. {deply-0.2.3 → deply-0.2.4}/deply/collectors/file_regex_collector.py +0 -0
  20. {deply-0.2.3 → deply-0.2.4}/deply/config_parser.py +0 -0
  21. {deply-0.2.3 → deply-0.2.4}/deply/models/__init__.py +0 -0
  22. {deply-0.2.3 → deply-0.2.4}/deply/models/code_element.py +0 -0
  23. {deply-0.2.3 → deply-0.2.4}/deply/models/dependency.py +0 -0
  24. {deply-0.2.3 → deply-0.2.4}/deply/models/layer.py +0 -0
  25. {deply-0.2.3 → deply-0.2.4}/deply/models/violation.py +0 -0
  26. {deply-0.2.3 → deply-0.2.4}/deply/reports/__init__.py +0 -0
  27. {deply-0.2.3 → deply-0.2.4}/deply/reports/formats/__init__.py +0 -0
  28. {deply-0.2.3 → deply-0.2.4}/deply/reports/report_generator.py +0 -0
  29. {deply-0.2.3 → deply-0.2.4}/deply/rules/__init__.py +0 -0
  30. {deply-0.2.3 → deply-0.2.4}/deply/rules/base_rule.py +0 -0
  31. {deply-0.2.3 → deply-0.2.4}/deply/rules/dependency_rule.py +0 -0
  32. {deply-0.2.3 → deply-0.2.4}/deply/rules/rule_factory.py +0 -0
  33. {deply-0.2.3 → deply-0.2.4}/deply/utils/__init__.py +0 -0
  34. {deply-0.2.3 → deply-0.2.4}/deply/utils/ast_utils.py +0 -0
  35. {deply-0.2.3 → deply-0.2.4}/deply.egg-info/SOURCES.txt +0 -0
  36. {deply-0.2.3 → deply-0.2.4}/deply.egg-info/dependency_links.txt +0 -0
  37. {deply-0.2.3 → deply-0.2.4}/deply.egg-info/entry_points.txt +0 -0
  38. {deply-0.2.3 → deply-0.2.4}/deply.egg-info/requires.txt +0 -0
  39. {deply-0.2.3 → deply-0.2.4}/deply.egg-info/top_level.txt +0 -0
  40. {deply-0.2.3 → deply-0.2.4}/pyproject.toml +0 -0
  41. {deply-0.2.3 → deply-0.2.4}/requirements.txt +0 -0
  42. {deply-0.2.3 → deply-0.2.4}/setup.cfg +0 -0
  43. {deply-0.2.3 → deply-0.2.4}/setup.py +0 -0
  44. {deply-0.2.3 → deply-0.2.4}/tests/__init__.py +0 -0
  45. {deply-0.2.3 → deply-0.2.4}/tests/test.py +0 -0
  46. {deply-0.2.3 → deply-0.2.4}/tests/test_collectors.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deply
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A tool to enforce architectural patterns in python projects
5
5
  Home-page: https://github.com/vashkatsi/deply
6
6
  Author: Archil Abuladze
@@ -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
- lines = set()
10
- for violation in self.violations:
11
- lines.add(
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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deply
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A tool to enforce architectural patterns in python projects
5
5
  Home-page: https://github.com/vashkatsi/deply
6
6
  Author: Archil Abuladze
@@ -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