orionis 0.93.0__py3-none-any.whl → 0.95.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,5 +1,5 @@
1
1
  from abc import ABC, abstractmethod
2
- from orionis.luminate.console.tasks.scheduler import Schedule
2
+ from orionis.luminate.facades.commands.scheduler_facade import Schedule
3
3
 
4
4
  class ITaskManager(ABC):
5
5
  """
@@ -0,0 +1,28 @@
1
+ from abc import ABC, abstractmethod
2
+ from typing import Any
3
+ from orionis.luminate.services.commands.scheduler_service import ScheduleService
4
+
5
+ class ISchedule(ABC):
6
+
7
+ @abstractmethod
8
+ def command(signature: str, vars: dict[str, Any] = {}, *args: Any, **kwargs: Any) -> 'ScheduleService':
9
+ """
10
+ Defines a Orionis command to be executed.
11
+
12
+ Parameters
13
+ ----------
14
+ signature : str
15
+ The signature of the command to execute.
16
+ vars : dict, optional
17
+ A dictionary of variables to pass to the command, by default an empty dictionary.
18
+ *args : Any
19
+ Additional positional arguments to pass to the command.
20
+ **kwargs : Any
21
+ Additional keyword arguments to pass to the command.
22
+
23
+ Returns
24
+ -------
25
+ Schedule
26
+ Returns the Schedule instance itself, allowing method chaining.
27
+ """
28
+ pass
orionis/framework.py CHANGED
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.93.0"
8
+ VERSION = "0.95.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -2,7 +2,8 @@ import importlib
2
2
  from orionis.luminate.console.base.command import BaseCommand
3
3
  from orionis.luminate.console.exceptions.cli_exception import CLIOrionisRuntimeError
4
4
  from orionis.contracts.console.i_task_manager import ITaskManager
5
- from orionis.luminate.services.commands.scheduler_service import ScheduleService
5
+ from orionis.luminate.facades.commands.scheduler_facade import Schedule
6
+
6
7
 
7
8
  class ScheduleWorkCommand(BaseCommand):
8
9
  """
@@ -18,14 +19,14 @@ class ScheduleWorkCommand(BaseCommand):
18
19
  # A brief description of the command.
19
20
  description = "Starts the scheduled tasks."
20
21
 
21
- def __init__(self, schedule:ScheduleService) -> None:
22
+ def __init__(self, schedule:Schedule) -> None:
22
23
  """
23
24
  Initialize a new instance of the ScheduleWorkCommand class.
24
25
 
25
26
  Args:
26
27
  schedule (ScheduleService): The schedule instance to use for scheduling tasks.
27
28
  """
28
- self.schedule = schedule
29
+ self.schedule : Schedule = schedule
29
30
 
30
31
  def handle(self) -> None:
31
32
  """
@@ -373,6 +373,10 @@ class Container(IContainer):
373
373
  if param_name == 'self':
374
374
  continue
375
375
 
376
+ # Handle parameters that are VAR_POSITIONAL or VAR_KEYWORD
377
+ if param.kind in (param.VAR_POSITIONAL, param.VAR_KEYWORD):
378
+ continue
379
+
376
380
  # If parameter has no annotation and no default value, it's unresolved
377
381
  if param.annotation is param.empty and param.default is param.empty:
378
382
  unresolved_dependencies.append(param_name)
@@ -0,0 +1,38 @@
1
+ from typing import Any
2
+ from orionis.contracts.facades.commands.i_scheduler_facade import ISchedule
3
+ from orionis.luminate.facades.app import app
4
+ from orionis.luminate.services.commands.scheduler_service import ScheduleService
5
+
6
+ class Schedule(ISchedule):
7
+
8
+ @staticmethod
9
+ def command(signature: str, vars: dict[str, Any] = {}, *args: Any, **kwargs: Any) -> 'ScheduleService':
10
+ """
11
+ Defines a Orionis command to be executed.
12
+
13
+ Parameters
14
+ ----------
15
+ signature : str
16
+ The signature of the command to execute.
17
+ vars : dict, optional
18
+ A dictionary of variables to pass to the command, by default an empty dictionary.
19
+ *args : Any
20
+ Additional positional arguments to pass to the command.
21
+ **kwargs : Any
22
+ Additional keyword arguments to pass to the command.
23
+
24
+ Returns
25
+ -------
26
+ Schedule
27
+ Returns the Schedule instance itself, allowing method chaining.
28
+ """
29
+ _scheduler_provider : ScheduleService = app(ScheduleService)
30
+ return _scheduler_provider.command(signature, vars, *args, **kwargs)
31
+
32
+ @staticmethod
33
+ def start():
34
+ """
35
+ Starts the scheduler and stops automatically when there are no more jobs.
36
+ """
37
+ _scheduler_provider : ScheduleService = app(ScheduleService)
38
+ return _scheduler_provider.start()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.93.0
3
+ Version: 0.95.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
@@ -1,6 +1,6 @@
1
1
  orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  orionis/cli_manager.py,sha256=0bM-hABXJSoPGuvEgnqeaj9qcLP8VjTQ3z9Mb0TSEUI,1381
3
- orionis/framework.py,sha256=ppUTRFsIyFkP2mrVuX7phLxBXcMFTn6G_vOs6uwD-Ho,1386
3
+ orionis/framework.py,sha256=Tp3JJLMN60PyChHVKmHIiQH5YZskLtDqHBJaD0zNwvY,1386
4
4
  orionis/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/contracts/bootstrap/i_command_bootstrapper.py,sha256=cfpYWSlNhOY1q_C9o0H7F381OoM0Oh0qaeqP-c85nzk,2457
6
6
  orionis/contracts/bootstrap/i_config_bootstrapper.py,sha256=d2TXT74H2fCBbzWgrt9-ZG11S_H_YPQOEcJoIOrsgb0,4462
@@ -11,7 +11,7 @@ orionis/contracts/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
11
11
  orionis/contracts/console/i_command_filter.py,sha256=g66AlKNjTyQfdarO23r27nFqwiCnrP6kjaZ7tUGql-c,937
12
12
  orionis/contracts/console/i_kernel.py,sha256=GtiGlWe7EQ9aeChHpQ-GlIJlJ5tEqpZYYkjNcrwXI94,945
13
13
  orionis/contracts/console/i_parser.py,sha256=vMmTK0wMfTjt7H-tRf-WRLI8R-ghUzJauctwtgj0jFU,2082
14
- orionis/contracts/console/i_task_manager.py,sha256=sOmeifoncpWCG2WYh4q3QZ7M7w7P9Onb3Jxw9X2lpXE,1197
14
+ orionis/contracts/console/i_task_manager.py,sha256=SfSEAebGZIt7ajBU-jdWklvYHjUffA5pertVVLw-E4E,1207
15
15
  orionis/contracts/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  orionis/contracts/console/base/i_command.py,sha256=godE5t2r5Vrc5jYu_bsJnlSj8DjFWqtZYe14S7sKxwE,12239
17
17
  orionis/contracts/console/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -23,6 +23,7 @@ orionis/contracts/container/i_types.py,sha256=GCH7x3PjpXKPET3l84GcXbcM8cpne8AGrm
23
23
  orionis/contracts/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  orionis/contracts/facades/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  orionis/contracts/facades/commands/i_commands_facade.py,sha256=LpSfZb3lTmhgMx0H42NmFbKLvcOqSDIbpQrkQpF9RPY,1274
26
+ orionis/contracts/facades/commands/i_scheduler_facade.py,sha256=CR2E7WbYGt8ZMpekUzWBHCor3FEnBmYMDwPfKSYPq84,947
26
27
  orionis/contracts/facades/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
28
  orionis/contracts/facades/config/i_config_facade.py,sha256=Yzc0mB4W9XF8cZTdTO78AKUiyGaiShl1k8nJiecvKTc,970
28
29
  orionis/contracts/facades/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -87,7 +88,7 @@ orionis/luminate/console/base/command.py,sha256=YGHd5xVYILcNhQumi74IRnzvagvjufEO
87
88
  orionis/luminate/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
89
  orionis/luminate/console/commands/cache_clear.py,sha256=KyXVSwtLaV1O1cTEkNzX9czCwEoeQlAjiT0jUFMO8iE,2684
89
90
  orionis/luminate/console/commands/help.py,sha256=8_LOTuiZvA8HToKP5qBoN7rWlEo3T0Qik7-f3fyrTgo,2288
90
- orionis/luminate/console/commands/schedule_work.py,sha256=EJ9tCZVcV1dkEG0nXV5W0eqcwqGfui1A5Xk7zVGzwC0,2168
91
+ orionis/luminate/console/commands/schedule_work.py,sha256=xbutdJMYL0fIZtABiS_XalNzvRhYvR2tmu8shNiDEW4,2165
91
92
  orionis/luminate/console/commands/tests.py,sha256=Z7e6aM5Vu8C7R8iC8sJgUYVN9aJgtVMkqjUEFxPq91o,1281
92
93
  orionis/luminate/console/commands/version.py,sha256=llVPK6ELtf8dIdPvLbybrtipWwZkzV0EXc9ShL-C-GY,1140
93
94
  orionis/luminate/console/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -97,13 +98,14 @@ orionis/luminate/console/output/console.py,sha256=khlnCmhGW3Iu2YYO8GG7YLtnLeqysy
97
98
  orionis/luminate/console/output/executor.py,sha256=0_6AGM1vE5umdpVVogQUE5eW9cu5UUQwc-ZvuccTI8E,3362
98
99
  orionis/luminate/console/output/progress_bar.py,sha256=ssi8Drryr-shl7OxweTgGOhvRvAlCVxjBGm1L1qyO84,3089
99
100
  orionis/luminate/console/output/styles.py,sha256=2e1_FJdNpKaVqmdlCx-udzTleH_6uEFE9_TjH7T1ZUk,3696
100
- orionis/luminate/container/container.py,sha256=Ruyhs5OAiO6nMFhGDm7TNQD4qqFO0lh_phqUFDit_bE,16429
101
+ orionis/luminate/container/container.py,sha256=AHVf0cWDcDmDTPLxDMErq9TvExRzZB0gzPlHBmFu9Cc,16602
101
102
  orionis/luminate/container/exception.py,sha256=ap1SqYEjQEEHXJJTNmL7V1jrmRjgT5_7geZ95MYkhMA,1691
102
103
  orionis/luminate/container/types.py,sha256=BDcXN0__voRNHZ5Gr5dF0sWIYAQyNk4TxAwILBWyDAA,1735
103
104
  orionis/luminate/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
105
  orionis/luminate/facades/app.py,sha256=DHwCdhfU-Mfj0gPX5nwXR_cgnkvg6agMP2WBa-L0JE8,1294
105
106
  orionis/luminate/facades/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
107
  orionis/luminate/facades/commands/commands_facade.py,sha256=xy-5sW5_fDXhS2y0c0CCbBOfrOR0mJQLVTwBe3J8WTk,1561
108
+ orionis/luminate/facades/commands/scheduler_facade.py,sha256=X1Ox0NVOA9RyiKmw3UYgiF68jdIWU8HNyOf7uD0SZ54,1432
107
109
  orionis/luminate/facades/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
110
  orionis/luminate/facades/config/config_facade.py,sha256=xpyVdH_-CeOvtMuf-Pjl9SFZWOflXzx9lyDy_fYOmxU,1353
109
111
  orionis/luminate/facades/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -159,9 +161,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
161
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
160
162
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
161
163
  tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
162
- orionis-0.93.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
163
- orionis-0.93.0.dist-info/METADATA,sha256=6VIb3YX5XinPwoOe3i7GzZ-zLazG2QcUN3zxvWTdzBc,2978
164
- orionis-0.93.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
165
- orionis-0.93.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
166
- orionis-0.93.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
167
- orionis-0.93.0.dist-info/RECORD,,
164
+ orionis-0.95.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
165
+ orionis-0.95.0.dist-info/METADATA,sha256=AfKIq09-v4jPbLD5CEC14hqAa8tFaeL_mZjsf203DHk,2978
166
+ orionis-0.95.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
167
+ orionis-0.95.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
168
+ orionis-0.95.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
169
+ orionis-0.95.0.dist-info/RECORD,,