orionis 0.381.0__py3-none-any.whl → 0.382.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.
@@ -1,7 +1,8 @@
1
1
  from abc import ABC, abstractmethod
2
- from typing import Any
2
+ from typing import Any, Callable
3
3
  from orionis.container.contracts.container import IContainer
4
4
  from orionis.container.entities.binding import Binding
5
+ from orionis.services.introspection.dependencies.entities.method_dependencies import MethodDependency
5
6
 
6
7
  class IResolver(ABC):
7
8
  """
@@ -55,4 +56,60 @@ class IResolver(ABC):
55
56
  OrionisContainerException
56
57
  If the binding is not an instance of Binding or if resolution fails.
57
58
  """
59
+ pass
60
+
61
+ @abstractmethod
62
+ def resolveType(
63
+ self,
64
+ type_: Callable[..., Any],
65
+ *args,
66
+ **kwargs
67
+ ) -> Any:
68
+ """
69
+ Forces resolution of a type whether it's registered in the container or not.
70
+
71
+ Parameters
72
+ ----------
73
+ type_ : Callable[..., Any]
74
+ The type or callable to resolve.
75
+ *args : tuple
76
+ Positional arguments to pass to the constructor/callable.
77
+ **kwargs : dict
78
+ Keyword arguments to pass to the constructor/callable.
79
+
80
+ Returns
81
+ -------
82
+ Any
83
+ The resolved instance.
84
+
85
+ Raises
86
+ ------
87
+ OrionisContainerException
88
+ If the type cannot be resolved.
89
+ """
90
+ pass
91
+
92
+ @abstractmethod
93
+ def resolveSignature(
94
+ self,
95
+ signature: MethodDependency
96
+ ) -> dict:
97
+ """
98
+ Resolves dependencies defined in a method signature.
99
+
100
+ Parameters
101
+ ----------
102
+ signature : MethodDependency
103
+ The method dependency information to resolve.
104
+
105
+ Returns
106
+ -------
107
+ dict
108
+ A dictionary of resolved parameter values.
109
+
110
+ Raises
111
+ ------
112
+ OrionisContainerException
113
+ If any dependencies cannot be resolved.
114
+ """
58
115
  pass
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.381.0"
8
+ VERSION = "0.382.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -7,19 +7,7 @@ class IResolver(ABC):
7
7
  """
8
8
 
9
9
  @abstractmethod
10
- def __init__(self, root_path: Optional[str] = None):
11
- """
12
- Initializes the resolver with an optional root path.
13
-
14
- Parameters
15
- ----------
16
- root_path : str, optional
17
- The root directory to resolve relative paths from.
18
- """
19
- pass
20
-
21
- @abstractmethod
22
- def relativePath(self, relative_path: str):
10
+ def relativePath(self, relative_path: str) -> 'IResolver':
23
11
  """
24
12
  Resolves a relative path into an absolute one and validates its existence.
25
13
 
@@ -12,9 +12,7 @@ from pathlib import Path
12
12
  from typing import Any, Dict, List, Optional, Tuple
13
13
  from orionis.container.resolver.resolver import Resolver
14
14
  from orionis.foundation.contracts.application import IApplication
15
- from orionis.services.introspection.concretes.reflection import ReflectionConcrete
16
15
  from orionis.services.introspection.instances.reflection import ReflectionInstance
17
- from orionis.services.introspection.dependencies.entities.known_dependencies import KnownDependency
18
16
  from orionis.services.system.workers import Workers
19
17
  from orionis.test.entities.result import TestResult
20
18
  from orionis.test.enums import (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.381.0
3
+ Version: 0.382.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
@@ -118,7 +118,7 @@ orionis/container/context/manager.py,sha256=9yODWkHBoJ2kgJZ5ONLqcEcex50vaWuMcxsv
118
118
  orionis/container/context/scope.py,sha256=CWFiLLTAC_IdmeFKWX-jrphdxB0_TMEVBlz6lQVMPC8,937
119
119
  orionis/container/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  orionis/container/contracts/container.py,sha256=QV_seo8mKrZJG2Ytr2u0RSiRaTaSPw6zUxgJ_tq6oP4,8301
121
- orionis/container/contracts/resolver.py,sha256=mR7lztPAQDwyspoQewaTMQPxJaoOCA88euDevaZYHGo,1712
121
+ orionis/container/contracts/resolver.py,sha256=cbzzLvUuv5FD8DHnjs8VGCjDnCHXPWezRPHS_qr93xs,3193
122
122
  orionis/container/contracts/service_provider.py,sha256=hXp-l4iP7q0FhsCcQAKoYcJ_zxCzIgTdfmO4F0Bbssg,896
123
123
  orionis/container/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
124
  orionis/container/entities/binding.py,sha256=hoGTsIn8AbUdrYmyuE7bfwmFxss1zx35EPuDV1VwtKM,4321
@@ -247,7 +247,7 @@ orionis/foundation/providers/path_resolver_provider.py,sha256=rXvaVc5sSqmDgRzWJo
247
247
  orionis/foundation/providers/progress_bar_provider.py,sha256=75Jr4iEgUOUGl8Di1DioeP5_HRQlR-1lVzPmS96sWjA,737
248
248
  orionis/foundation/providers/workers_provider.py,sha256=WWlji3C69_-Y0c42aZDbR_bmcE_qZEh2SaA_cNkCivI,702
249
249
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
250
- orionis/metadata/framework.py,sha256=cGgByXu_dMZG3EWH8_xu-G5JsAAp7LgfUolLoHX4hDk,4960
250
+ orionis/metadata/framework.py,sha256=doZhWc3MLVPslLHTbj89koH1YyCgE3BAWG1oj3QdTCY,4960
251
251
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
252
252
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
253
253
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -312,7 +312,7 @@ orionis/services/log/log_service.py,sha256=jnKIeTxy4p16SfKYYLpJ1p1CqAqpF1BIp7IBS
312
312
  orionis/services/paths/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
313
313
  orionis/services/paths/resolver.py,sha256=9PXTawN3QV142Fhe7C2EqXyAlf984Hc05A_M2cqXAps,3217
314
314
  orionis/services/paths/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
315
- orionis/services/paths/contracts/resolver.py,sha256=9q68gRniffmJlwDmUGcoV3EVLQAgyHQzfcTEfqawNe8,1599
315
+ orionis/services/paths/contracts/resolver.py,sha256=DzaA0ThOJXHh0xkQigayPPAvpheknulz_xCdezfuCQA,1290
316
316
  orionis/services/paths/exceptions/__init__.py,sha256=r5b4D4XWNK07zLtqaXBk_PNYszScqbp_8kUN37cOk4E,184
317
317
  orionis/services/paths/exceptions/exception.py,sha256=cK-TbUT02X2lvbAP4yFdfHx4S45wBOcYl3_tiWd67UM,472
318
318
  orionis/services/paths/exceptions/file.py,sha256=bsK0QoXwRFyDeHvITxwmgaBuwiO2eoRUhRzNizmX1No,475
@@ -364,7 +364,7 @@ orionis/test/contracts/printer.py,sha256=FcTii6uglVIfvsgbmG0lj3hv1RGmDWuDo0eo4Z8
364
364
  orionis/test/contracts/render.py,sha256=0o6NjrKx2ewBf1JvAf8BaAtJQPb64yq1FJCeKb3iXys,967
365
365
  orionis/test/contracts/unit_test.py,sha256=pEceAVTJGb1ohEiiMD8X3YKT6xUsRECpB0ZO9K-RUWU,8383
366
366
  orionis/test/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
367
- orionis/test/core/unit_test.py,sha256=FsV1x1ooyaDFhLGglEwVsV-TzQDe9DBsIP5CKe3kNLw,58030
367
+ orionis/test/core/unit_test.py,sha256=JWnvpZ67sLTDy_x8O6p4NVLiJkRtbrWzlOq-ZOAM-FQ,57845
368
368
  orionis/test/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
369
369
  orionis/test/entities/arguments.py,sha256=V7HT-yaXzQR5m9E8AcJST2vQ4DGd7E0ks1swkRN_v6E,1394
370
370
  orionis/test/entities/result.py,sha256=8HRLg32bRLZX8NWgsGimJbSG8aX6n0VpbUEG57ClTGo,3023
@@ -385,10 +385,10 @@ orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
385
385
  orionis/test/records/logs.py,sha256=EOQcloMVdhlNl2lU9igQz8H4b-OtKtiwh2pgr_QZWOI,13186
386
386
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
387
387
  orionis/test/view/render.py,sha256=zd7xDvVfmQ2HxZamDTzL2-z2PpyL99EaolbbM7wTah4,5014
388
- orionis-0.381.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
388
+ orionis-0.382.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
389
389
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
390
390
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
391
- tests/example/test_example.py,sha256=jK_UvFhKmidN-8DcpGyCuyilFU0vHeKGuu2PJzNgWSM,700
391
+ tests/example/test_example.py,sha256=-NNP8odGdR5XrXK7w5vEvdVVGgPcoLFLJWf-ALf4GwU,1057
392
392
  tests/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
393
393
  tests/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
394
394
  tests/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -486,8 +486,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=nTNrvJkMSPx_aopEQ9
486
486
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
487
487
  tests/testing/test_testing_result.py,sha256=fnH7hjumNSErAFGITJgq2LHxSzvPF2tdtmHL9kyAv-Y,4409
488
488
  tests/testing/test_testing_unit.py,sha256=d3CRGo6608fMzYcZKIKapjx_af2aigqWiKSiuK9euIY,7600
489
- orionis-0.381.0.dist-info/METADATA,sha256=piUUrybU1alt7P3usyIxPG-wCVBi3XZiiKqInmwzdDQ,4772
490
- orionis-0.381.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
491
- orionis-0.381.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
492
- orionis-0.381.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
493
- orionis-0.381.0.dist-info/RECORD,,
489
+ orionis-0.382.0.dist-info/METADATA,sha256=nXgaOtU3FK-BF5Rw2XGjYdc4QBjgixYRjgcWQGE_nJA,4772
490
+ orionis-0.382.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
491
+ orionis-0.382.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
492
+ orionis-0.382.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
493
+ orionis-0.382.0.dist-info/RECORD,,
@@ -1,24 +1,33 @@
1
- from orionis.console.output.contracts.console import IConsole
1
+ from orionis.services.paths.contracts.resolver import IResolver
2
2
  from orionis.test.cases.synchronous import SyncTestCase
3
3
 
4
4
  class TestExample(SyncTestCase):
5
- """
6
- Unit tests for basic example functionality.
7
- """
8
5
 
9
- def testUnitExample(self, console:IConsole) -> None:
6
+ def testUnitExample(self, paths:IResolver) -> None:
10
7
  """
11
- Test that basic equality assertions work as expected.
8
+ Unit test example function.
12
9
 
13
- Asserts
10
+ This method demonstrates basic unit testing functionality using assertions.
11
+ It checks simple equality conditions and verifies path resolution through
12
+ the injected paths service.
13
+
14
+ Parameters
15
+ ----------
16
+ paths : IResolver
17
+ Service for resolving paths within the application.
18
+
19
+ Returns
14
20
  -------
15
- 1 == 1 : bool
16
- Ensures that the integer 1 is equal to itself.
17
- 2 == 2 : bool
18
- Ensures that the integer 2 is equal to itself.
21
+ None
22
+ This test method doesn't return anything.
19
23
  """
24
+
20
25
  # Check if 1 equals 1
21
26
  self.assertEqual(2, 2)
22
27
 
23
28
  # Check if 2 equals 2
24
- self.assertEqual(3, 3)
29
+ self.assertEqual(3, 3)
30
+
31
+ # Inyect the paths service to resolve a relative path
32
+ path = paths.relativePath("tests/example/test_example.py").toString()
33
+ self.assertTrue(path.endswith("test_example.py"))