GeneralManager 0.13.0__py3-none-any.whl → 0.13.1__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.
@@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, cast, get_args
3
3
  from general_manager.manager.meta import GeneralManagerMeta
4
4
  from general_manager.api.property import GraphQLProperty
5
5
 
6
- from general_manager.interface.baseInterface import Bucket
6
+ from general_manager.bucket.baseBucket import Bucket
7
7
  from general_manager.manager.generalManager import GeneralManager
8
8
 
9
9
 
@@ -26,7 +26,7 @@ class PathMap:
26
26
  def createPathMapping(cls):
27
27
  """
28
28
  Builds the mapping of paths between all pairs of distinct managed classes.
29
-
29
+
30
30
  Iterates over all registered managed classes and creates a PathTracer for each unique start and destination class pair, storing them in the mapping dictionary.
31
31
  """
32
32
  all_managed_classes = GeneralManagerMeta.all_classes
@@ -38,10 +38,9 @@ class PathMap:
38
38
  ] = PathTracer(start_class, destination_class)
39
39
 
40
40
  def __init__(self, path_start: PathStart | GeneralManager | type[GeneralManager]):
41
-
42
41
  """
43
42
  Initializes a PathMap with a specified starting point.
44
-
43
+
45
44
  The starting point can be a class name (string), a GeneralManager instance, or a GeneralManager subclass. Sets internal attributes for the start instance, class, and class name based on the input.
46
45
  """
47
46
  if isinstance(path_start, GeneralManager):
@@ -86,9 +85,11 @@ class PathMap:
86
85
  Returns a list of all classes that are connected to the start class.
87
86
  """
88
87
  connected_classes: set[str] = set()
89
- for path_tuple in self.mapping.keys():
88
+ for path_tuple, path_obj in self.mapping.items():
90
89
  if path_tuple[0] == self.start_class_name:
91
90
  destination_class_name = path_tuple[1]
91
+ if path_obj.path is None:
92
+ continue
92
93
  connected_classes.add(destination_class_name)
93
94
  return connected_classes
94
95
 
@@ -107,14 +108,13 @@ class PathTracer:
107
108
  def createPath(
108
109
  self, current_manager: type[GeneralManager], path: list[str]
109
110
  ) -> list[str] | None:
110
-
111
111
  """
112
112
  Recursively constructs a path of attribute names from the current manager class to the destination class.
113
-
113
+
114
114
  Args:
115
115
  current_manager: The current GeneralManager subclass being inspected.
116
116
  path: The list of attribute names traversed so far.
117
-
117
+
118
118
  Returns:
119
119
  A list of attribute names representing the path to the destination class, or None if no path exists.
120
120
  """
@@ -135,6 +135,8 @@ class PathTracer:
135
135
  for attr, attr_type in current_connections.items():
136
136
  if attr in path or attr_type == self.start_class:
137
137
  continue
138
+ if attr_type is None:
139
+ continue
138
140
  if not issubclass(attr_type, GeneralManager):
139
141
  continue
140
142
  if attr_type == self.destination_class:
@@ -148,13 +150,12 @@ class PathTracer:
148
150
  def traversePath(
149
151
  self, start_instance: GeneralManager | Bucket
150
152
  ) -> GeneralManager | Bucket | None:
151
-
152
153
  """
153
154
  Traverses the stored path from a starting instance to reach the destination instance or bucket.
154
-
155
+
155
156
  Args:
156
157
  start_instance: The initial GeneralManager or Bucket instance from which to begin traversal.
157
-
158
+
158
159
  Returns:
159
160
  The resulting GeneralManager or Bucket instance at the end of the path, or None if the path is empty.
160
161
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GeneralManager
3
- Version: 0.13.0
3
+ Version: 0.13.1
4
4
  Summary: Modular Django-based data management framework with ORM, GraphQL, fine-grained permissions, rule validation, calculations and caching.
5
5
  Author-email: Tim Kleindick <tkleindick@yahoo.de>
6
6
  License-Expression: MIT
@@ -49,10 +49,10 @@ general_manager/utils/formatString.py,sha256=gZSbsKvpywBmf5bIx6YW43LmNJcqsCP7Zfr
49
49
  general_manager/utils/jsonEncoder.py,sha256=TDsgFQvheITHZgdmn-m8tk1_QCzpT0XwEHo7bY3Qe-M,638
50
50
  general_manager/utils/makeCacheKey.py,sha256=UlFsxHXgsYy69AAelkF6GDvY4h7AImT2bBn6iD6dvi4,1110
51
51
  general_manager/utils/noneToZero.py,sha256=KfQtMQnrT6vsYST0K7lv6pVujkDcK3XL8czHYOhgqKQ,539
52
- general_manager/utils/pathMapping.py,sha256=nrz5owQg2a69Yig1eCXorR9U0NSw7NmBAk5OkeoHTdA,6842
52
+ general_manager/utils/pathMapping.py,sha256=pswtxZbvj4MdDN6o-y1qTjl6XFHvjDTe-H3NZyFTrPQ,6926
53
53
  general_manager/utils/testing.py,sha256=ElZ8p4iZHxsHjDN8Lm5TmI6527CW747ltDOmtY6gAhk,11872
54
- generalmanager-0.13.0.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
55
- generalmanager-0.13.0.dist-info/METADATA,sha256=_0sQJIW1Rz4ZjoxXUgfKDHSDEqkiUszY5YIVR3cnO3c,6206
56
- generalmanager-0.13.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
- generalmanager-0.13.0.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
58
- generalmanager-0.13.0.dist-info/RECORD,,
54
+ generalmanager-0.13.1.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
55
+ generalmanager-0.13.1.dist-info/METADATA,sha256=7rjGL5VGqFeJm-aM61LOfM8vGzZBYrmqDHK91iqE20I,6206
56
+ generalmanager-0.13.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ generalmanager-0.13.1.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
58
+ generalmanager-0.13.1.dist-info/RECORD,,