orionis 0.317.0__py3-none-any.whl → 0.318.0__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.
@@ -8,7 +8,6 @@ from orionis.services.introspection.callables.reflection_callable import Reflect
8
8
  from orionis.services.introspection.concretes.reflection_concrete import ReflectionConcrete
9
9
  from orionis.services.introspection.instances.reflection_instance import ReflectionInstance
10
10
  from orionis.services.introspection.reflection import Reflection
11
- import inspect
12
11
  import threading
13
12
 
14
13
  class Container:
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.317.0"
8
+ VERSION = "0.318.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,10 +1,9 @@
1
1
  import inspect
2
2
  from orionis.services.asynchrony.coroutines import Coroutine
3
- from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency as CallableDependency
3
+ from orionis.services.introspection.dependencies.entities.callable_dependencies import CallableDependency
4
4
  from orionis.services.introspection.dependencies.reflect_dependencies import ReflectDependencies
5
5
  from orionis.services.introspection.exceptions.reflection_attribute_error import ReflectionAttributeError
6
6
  from orionis.services.introspection.exceptions.reflection_type_error import ReflectionTypeError
7
- import asyncio
8
7
 
9
8
  class ReflectionCallable:
10
9
 
@@ -0,0 +1,55 @@
1
+ from dataclasses import dataclass
2
+ from typing import Any, Dict, List
3
+ from orionis.services.introspection.dependencies.entities.resolved_dependencies import ResolvedDependency
4
+ from orionis.services.introspection.exceptions.reflection_type_error import ReflectionTypeError
5
+
6
+ @dataclass(frozen=True, kw_only=True)
7
+ class CallableDependency:
8
+ """
9
+ Represents the dependencies of a callable, separating resolved and unresolved dependencies.
10
+
11
+ Parameters
12
+ ----------
13
+ resolved : Dict[ResolvedDependency, Any]
14
+ A dictionary mapping resolved dependency descriptors to their corresponding
15
+ resolved instances or values for the method. All keys must be ResolvedDependency instances.
16
+ unresolved : List[str]
17
+ A list of method parameter names or dependency identifiers that could not be resolved.
18
+ Must contain only non-empty strings.
19
+
20
+ Raises
21
+ ------
22
+ ReflectionTypeError
23
+ If types don't match the expected:
24
+ - resolved: Dict[ResolvedDependency, Any]
25
+ - unresolved: List[str]
26
+ ValueError
27
+ If resolved contains None keys or unresolved contains empty strings
28
+ """
29
+ resolved: Dict[ResolvedDependency, Any]
30
+ unresolved: List[str]
31
+
32
+ def __post_init__(self):
33
+ """
34
+ Validates types and values of attributes during initialization.
35
+
36
+ Raises
37
+ ------
38
+ ReflectionTypeError
39
+ If types don't match the expected:
40
+ - resolved: Dict[ResolvedDependency, Any]
41
+ - unresolved: List[str]
42
+ ValueError
43
+ If resolved contains None keys or unresolved contains empty strings
44
+ """
45
+ # Validate 'resolved' is a dict with proper key types
46
+ if not isinstance(self.resolved, dict):
47
+ raise ReflectionTypeError(
48
+ f"'resolved' must be a dict, got {type(self.resolved).__name__}"
49
+ )
50
+
51
+ # Validate 'unresolved' is a list of valid parameter names
52
+ if not isinstance(self.unresolved, list):
53
+ raise ReflectionTypeError(
54
+ f"'unresolved' must be a list, got {type(self.unresolved).__name__}"
55
+ )
@@ -1,6 +1,7 @@
1
1
  import inspect
2
2
  from typing import Any, Dict, List
3
3
  from orionis.services.introspection.contracts.reflect_dependencies import IReflectDependencies
4
+ from orionis.services.introspection.dependencies.entities.callable_dependencies import CallableDependency
4
5
  from orionis.services.introspection.dependencies.entities.class_dependencies import ClassDependency
5
6
  from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency
6
7
  from orionis.services.introspection.dependencies.entities.resolved_dependencies import ResolvedDependency
@@ -176,7 +177,7 @@ class ReflectDependencies(IReflectDependencies):
176
177
  unresolved=unresolved_dependencies
177
178
  )
178
179
 
179
- def getCallableDependencies(self, fn: callable) -> MethodDependency:
180
+ def getCallableDependencies(self, fn: callable) -> CallableDependency:
180
181
  """
181
182
  Get the resolved and unresolved dependencies from a callable function.
182
183
 
@@ -222,7 +223,7 @@ class ReflectDependencies(IReflectDependencies):
222
223
  full_class_path=f"{module_path}.{param.annotation.__name__}"
223
224
  )
224
225
 
225
- return MethodDependency(
226
+ return CallableDependency(
226
227
  resolved=resolved_dependencies,
227
228
  unresolved=unresolved_dependencies
228
229
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.317.0
3
+ Version: 0.318.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -135,7 +135,7 @@ orionis/console/output/console.py,sha256=TE_Hl720ADd82dbERFSWhkoQRukDQZmETSw4nkw
135
135
  orionis/console/output/executor.py,sha256=bdvkzW2-buy0BPpy2r5qUGrRFW2Ay6k-5rSeHb0gQ3o,3352
136
136
  orionis/console/output/progress_bar.py,sha256=vFy582z6VJS46LV6tuyrmr9qvdVeTEtw3hyNcEHezeg,3088
137
137
  orionis/console/output/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
138
- orionis/container/container.py,sha256=BPBO0i1EgL-9g9sgDotrInM2UiuDMT7TNDRHDdrQCZo,30121
138
+ orionis/container/container.py,sha256=TNnevmbvK2e664bl8r1HYk5CHGDsP9J9N_3ZuAHKb6c,30105
139
139
  orionis/container/entities/binding.py,sha256=Qp6Lf4XUDp2NjqXDAC2lzvhOFQWiBDKiGFcKfwb4axw,4342
140
140
  orionis/container/enums/lifetimes.py,sha256=RqQmugMIB1Ev_j_vFLcWorndm-to7xg4stQ7yKFDdDw,190
141
141
  orionis/container/exceptions/container_exception.py,sha256=goTDEwC70xTMD2qppN8KV-xyR0Nps218OD4D1LZ2-3s,470
@@ -232,7 +232,7 @@ orionis/foundation/contracts/config.py,sha256=Rpz6U6t8OXHO9JJKSTnCimytXE-tfCB-1i
232
232
  orionis/foundation/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
233
  orionis/foundation/exceptions/integrity.py,sha256=mc4pL1UMoYRHEmphnpW2oGk5URhu7DJRREyzHaV-cs8,472
234
234
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
235
- orionis/metadata/framework.py,sha256=IhaXribsZwgUQ1ZD4sXOCEanSM6ZfeiOASiDyOpzViA,4960
235
+ orionis/metadata/framework.py,sha256=W5PbEW1Zw29V6NsVuzd9ZafK7iR0638kO2Jm0wIwNGw,4960
236
236
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
237
237
  orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
238
238
  orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -259,7 +259,7 @@ orionis/services/introspection/reflection.py,sha256=6z4VkDICohMIkm9jEd7nmFABwVuU
259
259
  orionis/services/introspection/abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
260
260
  orionis/services/introspection/abstract/reflection_abstract.py,sha256=SPK2X11VvGORxxPOYloaD6hPAvky--obRU4CO1DE4zM,43865
261
261
  orionis/services/introspection/callables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
262
- orionis/services/introspection/callables/reflection_callable.py,sha256=AWTw9T9DGpCscwvrqYtYAYdTeoJqIHzdRDS29Sb5cSI,5667
262
+ orionis/services/introspection/callables/reflection_callable.py,sha256=wjztKcqXIT4J-LPXK_Iszv-VzqHoT9MLp0n-GDMtmgA,5633
263
263
  orionis/services/introspection/concretes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
264
264
  orionis/services/introspection/concretes/reflection_concrete.py,sha256=1GxD-y8LPGL6kI4Y3XbeLcFjR5Y8cOqbVEPCtPnsuYA,50982
265
265
  orionis/services/introspection/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -269,8 +269,9 @@ orionis/services/introspection/contracts/reflection_concrete.py,sha256=9ZQjJpZwv
269
269
  orionis/services/introspection/contracts/reflection_instance.py,sha256=D9sH-uOSZ_E7luAfbjI_ML6kfxuO5MtvLk6037iQJ7o,20936
270
270
  orionis/services/introspection/contracts/reflection_module.py,sha256=YLqKg5EhaddUBrytMHX1-uz9mNsRISK1iVyG_iUiVYA,9666
271
271
  orionis/services/introspection/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
272
- orionis/services/introspection/dependencies/reflect_dependencies.py,sha256=xjY9RRBbALfifoefUuHu2EU5XUNdV9zKFaJ9-x7TP2I,9303
272
+ orionis/services/introspection/dependencies/reflect_dependencies.py,sha256=OXMfWqacFM7Mo5y0zmPprP4ECHqImChDFsfzTyhqS9A,9414
273
273
  orionis/services/introspection/dependencies/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
274
+ orionis/services/introspection/dependencies/entities/callable_dependencies.py,sha256=GJPS1pO8aIhYjtYw7bEoV8WfUCn-ZPGt5mD1WvfoAxg,2198
274
275
  orionis/services/introspection/dependencies/entities/class_dependencies.py,sha256=pALvV_duAvDYmNp7PJYWkpIIQYmqWxuc_RGruEckfPA,2063
275
276
  orionis/services/introspection/dependencies/entities/method_dependencies.py,sha256=FDwroILMPhqPxaxisPVEeKeLUg57GNQ4tQfWjGMh40E,2194
276
277
  orionis/services/introspection/dependencies/entities/resolved_dependencies.py,sha256=0qnEj-3H8iclCc79AduQrqAAdAihv7k39gipo3RT2zc,2216
@@ -343,7 +344,7 @@ orionis/test/suite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
343
344
  orionis/test/suite/test_unit.py,sha256=MWgW8dRCRyT1XZ5LsbXQ7-KVPReasoXwzEEL1EWWfE4,52190
344
345
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
345
346
  orionis/test/view/render.py,sha256=jXZkbITBknbUwm_mD8bcTiwLDvsFkrO9qrf0ZgPwqxc,4903
346
- orionis-0.317.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
347
+ orionis-0.318.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
347
348
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
348
349
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
349
350
  tests/example/test_example.py,sha256=kvWgiW3ADEZf718dGsMPtDh_rmOSx1ypEInKm7_6ZPQ,601
@@ -414,14 +415,14 @@ tests/services/environment/test_services_environment.py,sha256=fdkjwbY-aDEA1FT-9
414
415
  tests/services/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
415
416
  tests/services/inspection/test_reflection.py,sha256=ZApQeaDxYLsrfGN6UqEDPbyNzocMV9CURflQ35YMfqk,13678
416
417
  tests/services/inspection/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
417
- tests/services/inspection/dependencies/test_reflect_dependencies.py,sha256=xjcbfWlCT-QuI0wDgXbbsfvWG5phvrvPcfMOwmUnpHQ,7279
418
+ tests/services/inspection/dependencies/test_reflect_dependencies.py,sha256=s_P4ST_dmjzRKmUL4bPFs-oR-Mf5PENGmYk56WiGO9g,7388
418
419
  tests/services/inspection/dependencies/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
419
420
  tests/services/inspection/dependencies/mocks/mock_user.py,sha256=RxATxe0-Vm4HfX5jKz9Tny42E2fmrdtEN6ZEntbqRL8,912
420
421
  tests/services/inspection/dependencies/mocks/mock_user_controller.py,sha256=P3sOUXVZ55auudwiNtvNCEQuTz0cgAZjvhicLZ4xaz4,1208
421
422
  tests/services/inspection/dependencies/mocks/mock_users_permissions.py,sha256=oENXbS2qmQUudYSmnhB8fgHBqXZdbplplB-Y2nbx4hw,1388
422
423
  tests/services/inspection/reflection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
423
424
  tests/services/inspection/reflection/test_reflection_abstract.py,sha256=MbGDfCDkfj8wVJcyAlwV6na98JLzbGaYa3QjXR1alL8,27395
424
- tests/services/inspection/reflection/test_reflection_callable.py,sha256=GBZL9oIwfBDfhQ3VXVrZDkdwoTkymMqLfFQSBCSs8pE,7021
425
+ tests/services/inspection/reflection/test_reflection_callable.py,sha256=ZcZ1_v4Nv22gIleflCRzE0Kfwy5Kjj8XjZ9Z1cKdXt8,6855
425
426
  tests/services/inspection/reflection/test_reflection_concrete.py,sha256=5-iQh1whfpBa47jBWwtg-MIk6ysg92my5J9JdrTBm5E,44622
426
427
  tests/services/inspection/reflection/test_reflection_instance.py,sha256=ZCFTLY_KtLAIq58PuDWak-T1c2PcCKiwTOdI9EDubww,46281
427
428
  tests/services/inspection/reflection/test_reflection_module.py,sha256=Cl-3kWoJMQ2ufOO4VP6M28Tk6kmY4OhVEoW_b0wqw7Y,19849
@@ -444,8 +445,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=yeVwl-VcwkWSQYyxZu
444
445
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
445
446
  tests/testing/test_testing_result.py,sha256=MrGK3ZimedL0b5Ydu69Dg8Iul017AzLTm7VPxpXlpfU,4315
446
447
  tests/testing/test_testing_unit.py,sha256=DjLBtvVn8B1KlVJNNkstBT8_csA1yeaMqnGrbanN_J4,7438
447
- orionis-0.317.0.dist-info/METADATA,sha256=ArEDpHbIszs0kFP63nOxlOuuEJygJsbjqGR8xCRQ9gM,4772
448
- orionis-0.317.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
449
- orionis-0.317.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
450
- orionis-0.317.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
451
- orionis-0.317.0.dist-info/RECORD,,
448
+ orionis-0.318.0.dist-info/METADATA,sha256=_bC7iHlD1eWAOWCuGO8KoLXLlrBz_2nEO7fsbBa2uvI,4772
449
+ orionis-0.318.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
450
+ orionis-0.318.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
451
+ orionis-0.318.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
452
+ orionis-0.318.0.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ from orionis.services.introspection.dependencies.entities.callable_dependencies import CallableDependency
2
3
  from orionis.services.introspection.dependencies.reflect_dependencies import (
3
4
  ReflectDependencies,
4
5
  ClassDependency,
@@ -113,7 +114,7 @@ class TestReflectDependencies(TestCase):
113
114
  callable_dependencies = depend.getCallableDependencies(fake_function)
114
115
 
115
116
  # Check Instance of MethodDependency
116
- self.assertIsInstance(callable_dependencies, MethodDependency)
117
+ self.assertIsInstance(callable_dependencies, CallableDependency)
117
118
 
118
119
  # Check unresolved dependencies
119
120
  self.assertEqual(callable_dependencies.unresolved, [])
@@ -1,9 +1,7 @@
1
1
  from orionis.services.introspection.callables.reflection_callable import ReflectionCallable
2
+ from orionis.services.introspection.dependencies.entities.callable_dependencies import CallableDependency
2
3
  from orionis.unittesting import TestCase
3
4
  from orionis.services.introspection.exceptions.reflection_type_error import ReflectionTypeError
4
- from orionis.services.introspection.exceptions.reflection_attribute_error import ReflectionAttributeError
5
- from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency as CallableDependency
6
- from orionis.services.introspection.dependencies.reflect_dependencies import ReflectDependencies
7
5
 
8
6
  class TestReflectionCallable(TestCase):
9
7
 
@@ -153,5 +151,6 @@ class TestReflectionCallable(TestCase):
153
151
  return a + b
154
152
  rc = ReflectionCallable(sample_function)
155
153
  deps = rc.getDependencies()
154
+ self.assertIsInstance(deps, CallableDependency)
156
155
  self.assertTrue(hasattr(deps, "resolved"))
157
156
  self.assertTrue(hasattr(deps, "unresolved"))