GeneralManager 0.10.4__py3-none-any.whl → 0.10.5__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.
@@ -26,12 +26,18 @@ class CalculationInterface(InterfaceBase):
26
26
 
27
27
  @classmethod
28
28
  def getAttributeTypes(cls) -> dict[str, AttributeTypedDict]:
29
+ """
30
+ Return a dictionary describing the type and metadata for each input field in the calculation interface.
31
+
32
+ Each entry includes the field's type, default value (`None`), and flags indicating that the field is not editable, is required, and is not derived.
33
+ """
29
34
  return {
30
35
  name: {
31
36
  "type": field.type,
32
37
  "default": None,
33
38
  "is_editable": False,
34
39
  "is_required": True,
40
+ "is_derived": False,
35
41
  }
36
42
  for name, field in cls.input_fields.items()
37
43
  }
@@ -61,14 +67,13 @@ class CalculationInterface(InterfaceBase):
61
67
  def _preCreate(
62
68
  name: generalManagerClassName, attrs: attributes, interface: interfaceBaseClass
63
69
  ) -> tuple[attributes, interfaceBaseClass, None]:
64
-
65
70
  """
66
- Prepares attributes and a new interface class before creating a GeneralManager class.
67
-
68
- Collects all `Input` instances from the provided interface class, sets the interface type in the attributes, dynamically creates a new interface class with these input fields, and adds it to the attributes.
69
-
71
+ Prepare and return updated attributes and a new interface class for GeneralManager creation.
72
+
73
+ Collects all `Input` instances from the provided interface class, sets the interface type in the attributes, dynamically creates a new interface class with an `input_fields` attribute, and adds this class to the attributes dictionary.
74
+
70
75
  Returns:
71
- A tuple containing the updated attributes dictionary, the new interface class, and None.
76
+ tuple: A tuple containing the updated attributes dictionary, the new interface class, and None.
72
77
  """
73
78
  input_fields: dict[str, Input[Any]] = {}
74
79
  for key, value in vars(interface).items():
@@ -109,12 +114,18 @@ class CalculationInterface(InterfaceBase):
109
114
  @classmethod
110
115
  def getFieldType(cls, field_name: str) -> type:
111
116
  """
112
- Returns the Python type of a specified input field.
113
-
117
+ Return the Python type of the specified input field.
118
+
119
+ Parameters:
120
+ field_name (str): The name of the input field.
121
+
122
+ Returns:
123
+ type: The Python type associated with the input field.
124
+
114
125
  Raises:
115
- KeyError: If the field name does not exist in input_fields.
126
+ KeyError: If the specified field name does not exist in input_fields.
116
127
  """
117
- input = cls.input_fields.get(field_name)
118
- if input is None:
128
+ field = cls.input_fields.get(field_name)
129
+ if field is None:
119
130
  raise KeyError(f"Field '{field_name}' not found in input fields.")
120
- return input.type
131
+ return field.type
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GeneralManager
3
- Version: 0.10.4
3
+ Version: 0.10.5
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
@@ -18,7 +18,7 @@ general_manager/factory/factories.py,sha256=cJEV79SRHNNqtBXgE0ix5KOxdAkmPmq_8Ylw
18
18
  general_manager/factory/factoryMethods.py,sha256=9Bag891j0XHe3dUBAFi7gUKcKeUwcBZN3cDLBobyBiI,3225
19
19
  general_manager/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  general_manager/interface/baseInterface.py,sha256=cFsDU-nhj_O6Gir3eO0ukGKNn9Pplhe6gEMccHNi4O0,8648
21
- general_manager/interface/calculationInterface.py,sha256=Kg_OqLw67tcLwdzYNLq31eKVLzkM7taw-8Mzmk0CYi0,4232
21
+ general_manager/interface/calculationInterface.py,sha256=fTD3WQpsn3ImaxGW5S-JwVJyJJPoPp2mR6lAambdB8U,4755
22
22
  general_manager/interface/databaseBasedInterface.py,sha256=_E4HoHmU8A_5_voSpeGp8AkiWbHGF3ZY1zO9phIezh8,21647
23
23
  general_manager/interface/databaseInterface.py,sha256=rhKVXhg0ztdIxKikTWtgjrkA7cwZTOYlEsRh0RWajDQ,6732
24
24
  general_manager/interface/models.py,sha256=gGYW5f1AUBpBakV3O0qsZwqMiWxZGdKRYXWaCBjt1oI,3334
@@ -49,8 +49,8 @@ general_manager/utils/makeCacheKey.py,sha256=UlFsxHXgsYy69AAelkF6GDvY4h7AImT2bBn
49
49
  general_manager/utils/noneToZero.py,sha256=KfQtMQnrT6vsYST0K7lv6pVujkDcK3XL8czHYOhgqKQ,539
50
50
  general_manager/utils/pathMapping.py,sha256=nrz5owQg2a69Yig1eCXorR9U0NSw7NmBAk5OkeoHTdA,6842
51
51
  general_manager/utils/testing.py,sha256=ElZ8p4iZHxsHjDN8Lm5TmI6527CW747ltDOmtY6gAhk,11872
52
- generalmanager-0.10.4.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
53
- generalmanager-0.10.4.dist-info/METADATA,sha256=VC1eU13WK0cNkbOCrhOb7WK78u1E6ra_Xa71NsZ0TTA,6206
54
- generalmanager-0.10.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
55
- generalmanager-0.10.4.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
56
- generalmanager-0.10.4.dist-info/RECORD,,
52
+ generalmanager-0.10.5.dist-info/licenses/LICENSE,sha256=YGFm0ieb4KpkMRRt2qnWue6uFh0cUMtobwEBkHwajhc,1450
53
+ generalmanager-0.10.5.dist-info/METADATA,sha256=J4d2QlGnTmwb45tsUO0gGrcphQRym-xeRiJh-1-KwQA,6206
54
+ generalmanager-0.10.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
55
+ generalmanager-0.10.5.dist-info/top_level.txt,sha256=sTDtExP9ga-YP3h3h42yivUY-A2Q23C2nw6LNKOho4I,16
56
+ generalmanager-0.10.5.dist-info/RECORD,,