orionis 0.642.0__py3-none-any.whl → 0.643.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,3 +1,5 @@
1
+ from typing import List
2
+ from orionis.console.args.argument import CLIArgument
1
3
  from orionis.console.base.command import BaseCommand
2
4
  from orionis.console.exceptions import CLIOrionisRuntimeError
3
5
  from rich.console import Console
@@ -30,6 +32,29 @@ class VersionCommand(BaseCommand):
30
32
  # Command description
31
33
  description: str = "Displays the current Orionis framework version and metadata, including author, Python requirements, documentation, and repository links."
32
34
 
35
+ async def options(self) -> List[CLIArgument]:
36
+ """
37
+ Defines the command-line options available for the `make:command` command.
38
+
39
+ This method specifies the arguments that can be passed to the command when it is invoked
40
+ from the CLI. It includes both required and optional arguments, each represented as a
41
+ `CLIArgument` instance.
42
+
43
+ Returns
44
+ -------
45
+ List[CLIArgument]
46
+ A list of `CLIArgument` objects representing the available command-line options.
47
+ """
48
+
49
+ return [
50
+ CLIArgument(
51
+ flags=["--without-console"],
52
+ type=bool,
53
+ help="Return only the version string, without console output.",
54
+ required=False
55
+ )
56
+ ]
57
+
33
58
  def handle(self, console: Console) -> str:
34
59
  """
35
60
  Executes the version command to display the current Orionis framework version and metadata.
@@ -55,6 +80,10 @@ class VersionCommand(BaseCommand):
55
80
  """
56
81
  try:
57
82
 
83
+ # If the --without-console flag is set, return just the version string
84
+ if self.argument("without_console", False):
85
+ return framework.VERSION
86
+
58
87
  # Compose the main information strings using framework metadata
59
88
  title = f"[bold yellow]{framework.NAME.capitalize()} Framework[/bold yellow] [white]v{framework.VERSION}[/white]"
60
89
  author = f"[bold]Author:[/bold] {framework.AUTHOR} | [bold]Email:[/bold] {framework.AUTHOR_EMAIL}"
@@ -970,7 +970,8 @@ class Reactor(IReactor):
970
970
  output = await self.__app.callAsync(command_instance, 'handle')
971
971
 
972
972
  # Calculate elapsed time and log completion with DONE state if command.timestamps are enabled
973
- elapsed_time = round(self.__performance_counter.stop(), 2)
973
+ self.__performance_counter.stop()
974
+ elapsed_time = round(self.__performance_counter.getSeconds(), 2)
974
975
  if command.timestamps:
975
976
  self.__executer.done(program=signature, time=f"{elapsed_time}s")
976
977
 
@@ -986,7 +987,8 @@ class Reactor(IReactor):
986
987
  self.__logger.error(f"Command '{signature}' execution failed: {e}")
987
988
 
988
989
  # Calculate elapsed time and log failure with ERROR state if command.timestamps are enabled
989
- elapsed_time = round(self.__performance_counter.stop(), 2)
990
+ self.__performance_counter.stop()
991
+ elapsed_time = round(self.__performance_counter.getSeconds(), 2)
990
992
  if command.timestamps:
991
993
  self.__executer.fail(program=signature, time=f"{elapsed_time}s")
992
994
 
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.642.0"
8
+ VERSION = "0.643.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.642.0
3
+ Version: 0.643.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
@@ -17,7 +17,7 @@ orionis/console/commands/make_command.py,sha256=EbTicRHGf7uZ78MSDwZpQMDTB0MvwATc
17
17
  orionis/console/commands/scheduler_list.py,sha256=Wtjy73fpcjI6GGsJg6BHWVUXItzHbY1QLEhryXpCLcs,4770
18
18
  orionis/console/commands/scheduler_work.py,sha256=iPTgP7gOmTPr__TltYQWiqbDXbCP2njuO_2fCzwmMuc,5778
19
19
  orionis/console/commands/test.py,sha256=LXtl918TmYhg0sjBiCfbsvaXUmCLqwCXTazmy7AJhlE,2445
20
- orionis/console/commands/version.py,sha256=0EEFOzzUMzH7DOULKmkHkDLt4D8k938FIkkV3iBQ-t8,3694
20
+ orionis/console/commands/version.py,sha256=u5_8CfnEVdS3VSME8rbP6o3Z0XFZ30nSz8uHdahBAoY,4766
21
21
  orionis/console/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  orionis/console/contracts/base_command.py,sha256=UlDN41Ts0ulxM-B2kgeKNr9_gNv_0LCth_pon1os-8U,7617
23
23
  orionis/console/contracts/base_scheduler.py,sha256=RSxEW57MoMU3pXfliIrQw9WuMk95p-xHXi1yACp1qsU,7728
@@ -33,7 +33,7 @@ orionis/console/contracts/reactor.py,sha256=iT6ShoCutAWEeJzOf_PK7CGXi9TgrOD5tewH
33
33
  orionis/console/contracts/schedule.py,sha256=xtXgp4BPhvhg3YSM4mrIdbyoBdr4OJBi1gBM_kJN5UQ,13694
34
34
  orionis/console/contracts/schedule_event_listener.py,sha256=h06qsBxuEMD3KLSyu0JXdUDHlQW19BX9lA09Qrh2QXg,3818
35
35
  orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- orionis/console/core/reactor.py,sha256=1pog0n0T-CKzFZlGO_2E0cwNv1dprPVFnxsLzUZZE3c,43930
36
+ orionis/console/core/reactor.py,sha256=x_bRFLBq5MiKZdlMG1gZR1GCZgFkUDnG5l_nh2YKiR8,44044
37
37
  orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  orionis/console/dumper/debug.py,sha256=p8uflSXeDJDrVM9mZY4JMYEus73Z6TsLnQQtgP0QUak,22427
39
39
  orionis/console/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -217,7 +217,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
217
217
  orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
218
218
  orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
219
219
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
220
- orionis/metadata/framework.py,sha256=Wxnydh3O_XsgPCsG6GE0RmmDhu0e1rMn_S03-wzVe_4,4089
220
+ orionis/metadata/framework.py,sha256=eMaGl9vrCG8j8pnG9UGVptLGI-FoeB4-1fD9cCIkSis,4089
221
221
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
222
222
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
223
223
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -404,8 +404,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
404
404
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
405
405
  orionis/test/view/render.py,sha256=R55ykeRs0wDKcdTf4O1YZ8GDHTFmJ0IK6VQkbJkYUvo,5571
406
406
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
407
- orionis-0.642.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
408
- orionis-0.642.0.dist-info/METADATA,sha256=Db1eCvA-Xt3QYcIIh2-ZO2TuIauD2jjqP38QuxsMuaY,4772
409
- orionis-0.642.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
410
- orionis-0.642.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
411
- orionis-0.642.0.dist-info/RECORD,,
407
+ orionis-0.643.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
408
+ orionis-0.643.0.dist-info/METADATA,sha256=I1M9inorrXvliOKu3GxjeeGG0K8QMvrAIuDbh0_Cum0,4772
409
+ orionis-0.643.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
410
+ orionis-0.643.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
411
+ orionis-0.643.0.dist-info/RECORD,,