orionis 0.199.0__py3-none-any.whl → 0.200.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.
Files changed (27) hide show
  1. orionis/framework.py +1 -1
  2. orionis/luminate/console/base/command.py +88 -80
  3. orionis/luminate/console/command_filter.py +0 -1
  4. orionis/luminate/console/commands/cache_clear.py +19 -11
  5. orionis/luminate/console/commands/help.py +19 -10
  6. orionis/luminate/console/commands/schedule_work.py +1 -4
  7. orionis/luminate/console/commands/version.py +1 -3
  8. orionis/luminate/console/exceptions/cli-orionis-value-error.py +41 -0
  9. orionis/luminate/console/exceptions/cli_exception.py +1 -127
  10. orionis/luminate/console/exceptions/cli_runtime_error.py +41 -0
  11. orionis/luminate/console/exceptions/cli_schedule_exception.py +41 -0
  12. orionis/luminate/console/output/console.py +160 -68
  13. orionis/luminate/console/output/executor.py +1 -1
  14. orionis/luminate/console/output/styles.py +12 -4
  15. orionis/luminate/console/parser.py +1 -1
  16. orionis/luminate/contracts/console/base/command.py +65 -75
  17. orionis/luminate/contracts/console/output/console.py +160 -60
  18. orionis/luminate/contracts/support/{exception_to_dict.py → exception_parse.py} +2 -2
  19. orionis/luminate/services/commands/scheduler_service.py +1 -1
  20. orionis/luminate/support/{exception_to_dict.py → exception_parse.py} +11 -16
  21. {orionis-0.199.0.dist-info → orionis-0.200.0.dist-info}/METADATA +1 -1
  22. {orionis-0.199.0.dist-info → orionis-0.200.0.dist-info}/RECORD +26 -24
  23. orionis/luminate/console/commands/tests.py +0 -34
  24. {orionis-0.199.0.dist-info → orionis-0.200.0.dist-info}/LICENCE +0 -0
  25. {orionis-0.199.0.dist-info → orionis-0.200.0.dist-info}/WHEEL +0 -0
  26. {orionis-0.199.0.dist-info → orionis-0.200.0.dist-info}/entry_points.txt +0 -0
  27. {orionis-0.199.0.dist-info → orionis-0.200.0.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  from abc import ABC, abstractmethod
2
2
 
3
- class IExceptionsToDict(ABC):
3
+ class IExceptionParse(ABC):
4
4
 
5
5
  @abstractmethod
6
- def parse(exception):
6
+ def toDict(exception):
7
7
  """
8
8
  Parse the provided exception and serialize it into a dictionary format.
9
9
 
@@ -7,7 +7,7 @@ from typing import Any
7
7
  from apscheduler.schedulers.background import BackgroundScheduler
8
8
  from apscheduler.triggers.cron import CronTrigger
9
9
  from apscheduler.triggers.interval import IntervalTrigger
10
- from orionis.luminate.console.exceptions.cli_exception import CLIOrionisScheduleException
10
+ from orionis.luminate.console.exceptions.cli_schedule_exception import CLIOrionisScheduleException
11
11
  from orionis.luminate.facades.commands.commands_facade import Command
12
12
 
13
13
  class ScheduleService:
@@ -1,19 +1,13 @@
1
1
  import traceback
2
- from orionis.luminate.contracts.support.exception_to_dict import IExceptionsToDict
2
+ from orionis.luminate.contracts.support.exception_parse import IExceptionParse
3
3
 
4
- class ExceptionsToDict(IExceptionsToDict):
4
+ class ExceptionParse(IExceptionParse):
5
5
  """
6
6
  A utility class to parse an exception and convert it into a structured dictionary.
7
-
8
- Methods
9
- -------
10
- parse(exception: Exception) -> dict
11
- Converts an exception into a dictionary containing the error type, message,
12
- and stack trace information.
13
7
  """
14
8
 
15
9
  @staticmethod
16
- def parse(exception):
10
+ def toDict(exception):
17
11
  """
18
12
  Parse the provided exception and serialize it into a dictionary format.
19
13
 
@@ -38,15 +32,16 @@ class ExceptionsToDict(IExceptionsToDict):
38
32
 
39
33
  # Construct and return the dictionary containing all necessary exception details
40
34
  return {
41
- "error_type": tb.exc_type_str, # Using `exc_type_str` to avoid deprecation warnings
42
- "error_message": str(tb), # A string representation of the entire traceback message
35
+ "error_type": tb.exc_type_str,
36
+ "error_message": str(tb).strip(),
37
+ "error_code": getattr(exception, "code", None),
43
38
  "stack_trace": [
44
39
  {
45
- "filename": frame.filename, # The source file of the frame
46
- "lineno": frame.lineno, # The line number where the exception occurred
47
- "name": frame.name, # The function name
48
- "line": frame.line # The line of code in the frame
40
+ "filename": frame.filename,
41
+ "lineno": frame.lineno,
42
+ "name": frame.name,
43
+ "line": frame.line
49
44
  }
50
- for frame in tb.stack # Iterating over each frame in the traceback stack
45
+ for frame in tb.stack
51
46
  ]
52
47
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.199.0
3
+ Version: 0.200.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/console.py,sha256=4gYWxf0fWYgJ4RKwARvnTPh06FL3GJ6SAZ7R2NzOICw,1342
3
- orionis/framework.py,sha256=BAnlpo7g1gISfmflc0pRttKYURNxvSlkqTsfX4Ph7jg,1469
3
+ orionis/framework.py,sha256=ukJ6tp7s8GNGQ1nIgOUTu9IIbTPgBVsujwBidfNeaUw,1469
4
4
  orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/installer/manager.py,sha256=Li4TVziRXWfum02xNG4JHwbnLk-u8xzHjdqKz-D894k,2755
6
6
  orionis/installer/output.py,sha256=7O9qa2xtXMB_4ZvVi-Klneom9YazwygAd_4uYAoxhbU,8548
@@ -23,24 +23,26 @@ orionis/luminate/config/mail.py,sha256=i7von352c0hujaIATEvlNBHlpWRZYNAeT3lbwA59d
23
23
  orionis/luminate/config/queue.py,sha256=4ww3OA4V0nCO93llKW3J3aeV29JSsWoi5lqA_sFLUUY,1653
24
24
  orionis/luminate/config/session.py,sha256=xppot_rPAajfGR9o-wfMDwRyWMDSnI2Q7PDyutyEVcI,1809
25
25
  orionis/luminate/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- orionis/luminate/console/command_filter.py,sha256=fmqjQZFwhsEMKWuTtt4dIQF-souVSJk1ksO3UqV7sis,1274
26
+ orionis/luminate/console/command_filter.py,sha256=y13ZMEvUqSXOUtT6jXvKlzfMXZt3_UJOwLrAFhxz3yM,1219
27
27
  orionis/luminate/console/kernel.py,sha256=knzOpbsHJJpAbCSrnFXgRHK9Uk4OisEW_jiylaR-PLA,891
28
- orionis/luminate/console/parser.py,sha256=jQPDYHvGt-h2qnmDUObaxF9CmuX9YK_8XTYnQwKCSXE,5586
28
+ orionis/luminate/console/parser.py,sha256=kcPyYRkJzBCLibahfl0RtO4pOhrvCffkGB_mCbj7cHQ,5586
29
29
  orionis/luminate/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- orionis/luminate/console/base/command.py,sha256=Z5Pk2VhZEv7_0dP4f9Ay4DLX6DV4N78nraX4ty0pQ5g,12579
30
+ orionis/luminate/console/base/command.py,sha256=1LGpgwjo0hdyTXs1mRZ-7L4jnuBvzbogw3Q1eyKzasE,12344
31
31
  orionis/luminate/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- orionis/luminate/console/commands/cache_clear.py,sha256=UV2VFFK-LsUNDrqKb_Q8HWnwlwvIuTWTsbQ5x5rWHGk,2859
33
- orionis/luminate/console/commands/help.py,sha256=ifo_5KfwI5mokWIvIAqjys2zSGSbudVACITlsSdbOVU,2281
34
- orionis/luminate/console/commands/schedule_work.py,sha256=eYF94qgNjjAGLoN4JWA0e0zeNWc3fptj2NY2O7KGGGU,2174
35
- orionis/luminate/console/commands/tests.py,sha256=Z7e6aM5Vu8C7R8iC8sJgUYVN9aJgtVMkqjUEFxPq91o,1281
36
- orionis/luminate/console/commands/version.py,sha256=llVPK6ELtf8dIdPvLbybrtipWwZkzV0EXc9ShL-C-GY,1140
32
+ orionis/luminate/console/commands/cache_clear.py,sha256=rHQugB7dmBgaLTW3r3XzPysnijb2MmA3_9pWUOj6VDk,2908
33
+ orionis/luminate/console/commands/help.py,sha256=uzWK20xzheWPDFp4Ct040RXl6GbXoB2PuvYEnv1314U,2562
34
+ orionis/luminate/console/commands/schedule_work.py,sha256=cVhZDswp73bZLgOi49HLaTe_AknSeaxcl3bB-QqHZwk,2074
35
+ orionis/luminate/console/commands/version.py,sha256=W1DikoBXSZmU-SxvL1LDZbj3GnkmlptlJRyu1lJV3to,1058
37
36
  orionis/luminate/console/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- orionis/luminate/console/exceptions/cli_exception.py,sha256=T5rFjBEXWQf3RbpMb7KDoYayylm5DLPUPLC5OzkZ2-I,4623
37
+ orionis/luminate/console/exceptions/cli-orionis-value-error.py,sha256=RQP0HRwxDG8hxFOT1kUoZ1Ab1CZ1KLoSIl5yqlmgG4M,1147
38
+ orionis/luminate/console/exceptions/cli_exception.py,sha256=HsZ_vSeNiJWQ0gznVFNcIdhM0Bj_vkSRVBJs0wMjEKY,1141
39
+ orionis/luminate/console/exceptions/cli_runtime_error.py,sha256=DaCDGu6mXBk1LIzc7cwRROw1mePAigPNASjNZHhUSBE,1154
40
+ orionis/luminate/console/exceptions/cli_schedule_exception.py,sha256=IBbXb_5zi02pyo1laHdjGn6FYZK7WWRp4j2fkZOCT6I,1161
39
41
  orionis/luminate/console/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
- orionis/luminate/console/output/console.py,sha256=U4Hh1yf6ss9i1uzmMZ3kbOwxyBn4uBr9aem7bnpmB0E,16355
41
- orionis/luminate/console/output/executor.py,sha256=91722rNiAsKpuq5QYiI7Aqw_7ccmn0DS9KYQrZt0TOs,3369
42
+ orionis/luminate/console/output/console.py,sha256=Qcv54W6YOLXP81C4YzatA2casmSQ1BQhUFHsbxJUjjs,18196
43
+ orionis/luminate/console/output/executor.py,sha256=-efhCbWOS4ZqmRsO0s3j5NEbw4I9hVROF8Q3Atx77zs,3369
42
44
  orionis/luminate/console/output/progress_bar.py,sha256=ZiPGcUaN3EINeLRKgLGtS1GAb1XWlCDx7wFQ7Ff0hqY,3096
43
- orionis/luminate/console/output/styles.py,sha256=2e1_FJdNpKaVqmdlCx-udzTleH_6uEFE9_TjH7T1ZUk,3696
45
+ orionis/luminate/console/output/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
44
46
  orionis/luminate/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
47
  orionis/luminate/container/container.py,sha256=9xdODX1h4YK6V-THrfgm5XN95imobExzrb4bllizrWQ,18321
46
48
  orionis/luminate/container/container_integrity.py,sha256=lFQ41IN_3Z0SbtJzZ_9jewoaUI4xlsBEFXPfn-p82uI,7976
@@ -57,9 +59,9 @@ orionis/luminate/contracts/console/kernel.py,sha256=GtiGlWe7EQ9aeChHpQ-GlIJlJ5tE
57
59
  orionis/luminate/contracts/console/parser.py,sha256=2iu8mHscZmb2BcX6-6Fy_NVvqN5Zj1YEk2fWOf30XT8,2080
58
60
  orionis/luminate/contracts/console/task_manager.py,sha256=SfSEAebGZIt7ajBU-jdWklvYHjUffA5pertVVLw-E4E,1207
59
61
  orionis/luminate/contracts/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
- orionis/luminate/contracts/console/base/command.py,sha256=godE5t2r5Vrc5jYu_bsJnlSj8DjFWqtZYe14S7sKxwE,12239
62
+ orionis/luminate/contracts/console/base/command.py,sha256=5EktdRI7EkU2gkBxpK5s-c65jOQ83KXV5OUT2RcK4_I,10860
61
63
  orionis/luminate/contracts/console/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- orionis/luminate/contracts/console/output/console.py,sha256=bkYTT5oIK3NP-p7XONgi1z_SO50ZvJu31Nv7cjs4t7s,8902
64
+ orionis/luminate/contracts/console/output/console.py,sha256=jISa955ZVOUuJUdm7UCo_r_Ft1j9vG7Tg5j5aDw3Bvc,10552
63
65
  orionis/luminate/contracts/console/output/executor.py,sha256=MGMTTPSwF8dgCjHD3A4CKtYDaCcD-KU28dorC61Q04k,1411
64
66
  orionis/luminate/contracts/console/output/progress_bar.py,sha256=sOkQzQsliFemqZHMyzs4fWhNJfXDTk5KH3aExReetSE,1760
65
67
  orionis/luminate/contracts/container/container.py,sha256=rLOS1eYir1e1e06OVNTGESbR24rFOIU1CVni_8AbHgs,8802
@@ -103,7 +105,7 @@ orionis/luminate/contracts/services/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-
103
105
  orionis/luminate/contracts/services/files/path_resolver_service.py,sha256=B53Qzei4o_jzehIF0zJVHXzI4S-h0XeQ5vMslxT8okM,837
104
106
  orionis/luminate/contracts/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
107
  orionis/luminate/contracts/services/log/log_service.py,sha256=1RD3u-a5ZDMbg7AYE8y2SW8QNRybAU3De0mEA0dAeNo,2167
106
- orionis/luminate/contracts/support/exception_to_dict.py,sha256=LZpbCNDYQJs3j2mIM-NRFl0IfA8I0GFHExgRSO6K2FQ,780
108
+ orionis/luminate/contracts/support/exception_parse.py,sha256=P7yh5Q3KIcRPAZeg6190XbOSvu5XBK-VVt6zHxaiexw,779
107
109
  orionis/luminate/contracts/support/reflection.py,sha256=Ht5_FsFbCb-APRXX3HdsfKl3cDZU8DyXGXPWKTn05uQ,8429
108
110
  orionis/luminate/contracts/support/std.py,sha256=IihREHnJ_D2LqsrwtnGsIRYr0UsJsQezYPSPO6UaBQ4,992
109
111
  orionis/luminate/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -151,7 +153,7 @@ orionis/luminate/providers/log/log_service_provider.py,sha256=c4pTAbeBtLll6LzPPp
151
153
  orionis/luminate/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
152
154
  orionis/luminate/services/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
153
155
  orionis/luminate/services/commands/reactor_commands_service.py,sha256=oca_xPEQ_dyJKsYfUgsNK3WpMR-f0JabNE8C5pD8hoc,6250
154
- orionis/luminate/services/commands/scheduler_service.py,sha256=bOovnY83aZPfDz7XhGv4mQXVV116l_9UeaCstA89i_8,22474
156
+ orionis/luminate/services/commands/scheduler_service.py,sha256=mKy5I293GtpH98U4rOGXvcpqYwPVvp1cfceXdk53dsQ,22483
155
157
  orionis/luminate/services/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
158
  orionis/luminate/services/config/config_service.py,sha256=RKZ194_0RAEkRFSm3OPoDDdme0_wyBZNLaEQhIVdbYk,2114
157
159
  orionis/luminate/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -162,7 +164,7 @@ orionis/luminate/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
162
164
  orionis/luminate/services/log/log_service.py,sha256=jrCrKz7Uj6n_ri-v5A4YOILQGUQ9MAmrlSizbbOvKhI,8303
163
165
  orionis/luminate/support/asyn_run.py,sha256=MTwVGNEnKRqD582oZRpUDQ141-hXoO5wc4NSdC7ct0E,1114
164
166
  orionis/luminate/support/dot_dict.py,sha256=FVHfBuAGTTVMjNG01Fix645fRNKKUMmNx61pYkxPL5c,1253
165
- orionis/luminate/support/exception_to_dict.py,sha256=OV3vWZ6Dlh3EnFurR_7zhR3mfXDZg-UFbMsfs4tNnLA,2105
167
+ orionis/luminate/support/exception_parse.py,sha256=S4KU0s-MCEbulPrf0N9tLZZIN3Sjn-tOKYtQCP0Xe0k,1655
166
168
  orionis/luminate/support/reflection.py,sha256=TbWZ_cer0PXrPlwCYFbUJRymlzYxXT0E4C5XCsSc3mw,11951
167
169
  orionis/luminate/support/std.py,sha256=TqrgMxF_i5ubYGT5LOvHCH7HOHNmI8CE1kG9pNoSniY,1390
168
170
  orionis/luminate/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -181,9 +183,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
183
  tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
182
184
  tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
183
185
  tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
184
- orionis-0.199.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
185
- orionis-0.199.0.dist-info/METADATA,sha256=cht6x2f35drPQK6eR9h798rnVN0v9KULguOi8jHL3jg,3003
186
- orionis-0.199.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
187
- orionis-0.199.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
188
- orionis-0.199.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
189
- orionis-0.199.0.dist-info/RECORD,,
186
+ orionis-0.200.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
187
+ orionis-0.200.0.dist-info/METADATA,sha256=i_qQVL-L_p2MpEodOI4lXSM_Lumn2b9wEnc7RuoUYRw,3003
188
+ orionis-0.200.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
189
+ orionis-0.200.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
190
+ orionis-0.200.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
191
+ orionis-0.200.0.dist-info/RECORD,,
@@ -1,34 +0,0 @@
1
- from orionis.luminate.console.exceptions.cli_exception import CLIOrionisRuntimeError
2
- from orionis.luminate.console.base.command import BaseCommand
3
- from orionis.luminate.facades.tests.tests_facade import UnitTests
4
-
5
- class TestsCommand(BaseCommand):
6
- """
7
- Command class to display the list of available commands in the Orionis application.
8
-
9
- This command fetches all registered commands from the cache and presents them in a table format.
10
- """
11
-
12
- # Command signature used for execution.
13
- signature = "tests:run"
14
-
15
- # Brief description of the command.
16
- description = "Prints the list of available commands along with their descriptions."
17
-
18
- def handle(self) -> None:
19
- """
20
- Execute the help command.
21
-
22
- This method retrieves all available commands from the cache, sorts them alphabetically,
23
- and displays them in a structured table format.
24
-
25
- Raises
26
- ------
27
- ValueError
28
- If an unexpected error occurs during execution, a ValueError is raised
29
- with the original exception message.
30
- """
31
- try:
32
- return UnitTests.execute()
33
- except Exception as e:
34
- raise CLIOrionisRuntimeError(f"An unexpected error occurred: {e}") from e