orionis 0.198.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.
- orionis/framework.py +1 -1
- orionis/luminate/config/app.py +0 -3
- orionis/luminate/config/auth.py +0 -2
- orionis/luminate/config/database.py +0 -2
- orionis/luminate/config/filesystems.py +0 -7
- orionis/luminate/config/logging.py +0 -9
- orionis/luminate/config/mail.py +0 -8
- orionis/luminate/config/queue.py +0 -5
- orionis/luminate/config/session.py +3 -7
- orionis/luminate/console/base/command.py +88 -80
- orionis/luminate/console/command_filter.py +0 -1
- orionis/luminate/console/commands/cache_clear.py +19 -11
- orionis/luminate/console/commands/help.py +19 -10
- orionis/luminate/console/commands/schedule_work.py +1 -4
- orionis/luminate/console/commands/version.py +1 -3
- orionis/luminate/console/exceptions/cli-orionis-value-error.py +41 -0
- orionis/luminate/console/exceptions/cli_exception.py +1 -127
- orionis/luminate/console/exceptions/cli_runtime_error.py +41 -0
- orionis/luminate/console/exceptions/cli_schedule_exception.py +41 -0
- orionis/luminate/console/output/console.py +160 -68
- orionis/luminate/console/output/executor.py +1 -1
- orionis/luminate/console/output/styles.py +12 -4
- orionis/luminate/console/parser.py +1 -1
- orionis/luminate/contracts/console/base/command.py +65 -75
- orionis/luminate/contracts/console/output/console.py +160 -60
- orionis/luminate/contracts/support/{exception_to_dict.py → exception_parse.py} +2 -2
- orionis/luminate/services/commands/scheduler_service.py +1 -1
- orionis/luminate/support/{exception_to_dict.py → exception_parse.py} +11 -16
- {orionis-0.198.0.dist-info → orionis-0.200.0.dist-info}/METADATA +1 -1
- {orionis-0.198.0.dist-info → orionis-0.200.0.dist-info}/RECORD +34 -32
- orionis/luminate/console/commands/tests.py +0 -34
- {orionis-0.198.0.dist-info → orionis-0.200.0.dist-info}/LICENCE +0 -0
- {orionis-0.198.0.dist-info → orionis-0.200.0.dist-info}/WHEEL +0 -0
- {orionis-0.198.0.dist-info → orionis-0.200.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.198.0.dist-info → orionis-0.200.0.dist-info}/top_level.txt +0 -0
@@ -1,24 +1,29 @@
|
|
1
|
+
from orionis.framework import NAME
|
1
2
|
from orionis.luminate.console.base.command import BaseCommand
|
2
|
-
from orionis.luminate.console.exceptions.
|
3
|
+
from orionis.luminate.console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
|
3
4
|
from orionis.luminate.contracts.application import IApplication
|
4
|
-
from orionis.framework import NAME
|
5
5
|
|
6
6
|
class HelpCommand(BaseCommand):
|
7
7
|
"""
|
8
8
|
Command class to display the list of available commands in the Orionis application.
|
9
|
-
|
10
9
|
This command fetches all registered commands from the cache and presents them in a table format.
|
11
10
|
"""
|
12
|
-
def __init__(self, app : IApplication):
|
13
|
-
# Get the list of commands from the container
|
14
|
-
self._commands : dict = app._commands if hasattr(app, '_commands') else {}
|
15
11
|
|
16
|
-
# Command signature used for execution.
|
17
12
|
signature = "help"
|
18
13
|
|
19
|
-
# Brief description of the command.
|
20
14
|
description = "Prints the list of available commands along with their descriptions."
|
21
15
|
|
16
|
+
def __init__(self, app : IApplication):
|
17
|
+
"""
|
18
|
+
Initialize the HelpCommand class.
|
19
|
+
|
20
|
+
Parameters
|
21
|
+
----------
|
22
|
+
app : IApplication
|
23
|
+
The application instance that is passed to the command class.
|
24
|
+
"""
|
25
|
+
self._commands : dict = app._commands if hasattr(app, '_commands') else {}
|
26
|
+
|
22
27
|
def handle(self) -> None:
|
23
28
|
"""
|
24
29
|
Execute the help command.
|
@@ -41,14 +46,18 @@ class HelpCommand(BaseCommand):
|
|
41
46
|
# Initialize an empty list to store the rows.
|
42
47
|
rows = []
|
43
48
|
for signature, command_data in self._commands.items():
|
44
|
-
rows.append([
|
49
|
+
rows.append([
|
50
|
+
signature,
|
51
|
+
command_data['description'],
|
52
|
+
'Core Command' if 'orionis.luminate.console.commands' in command_data['concrete'].__module__ else 'User Command'
|
53
|
+
])
|
45
54
|
|
46
55
|
# Sort commands alphabetically
|
47
56
|
rows_sorted = sorted(rows, key=lambda x: x[0])
|
48
57
|
|
49
58
|
# Display the commands in a table format
|
50
59
|
self.table(
|
51
|
-
["Signature", "Description"],
|
60
|
+
["Signature", "Description", "Type"],
|
52
61
|
rows_sorted
|
53
62
|
)
|
54
63
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import importlib
|
2
2
|
from orionis.luminate.console.base.command import BaseCommand
|
3
|
-
from orionis.luminate.console.exceptions.
|
3
|
+
from orionis.luminate.console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
|
4
4
|
from orionis.luminate.contracts.console.task_manager import ITaskManager
|
5
5
|
from orionis.luminate.facades.commands.scheduler_facade import Schedule
|
6
6
|
|
7
|
-
|
8
7
|
class ScheduleWorkCommand(BaseCommand):
|
9
8
|
"""
|
10
9
|
Command class to handle scheduled tasks within the Orionis application.
|
@@ -13,10 +12,8 @@ class ScheduleWorkCommand(BaseCommand):
|
|
13
12
|
and starts the execution of scheduled tasks.
|
14
13
|
"""
|
15
14
|
|
16
|
-
# The command signature used to execute this command.
|
17
15
|
signature = "schedule:work"
|
18
16
|
|
19
|
-
# A brief description of the command.
|
20
17
|
description = "Starts the scheduled tasks."
|
21
18
|
|
22
19
|
def __init__(self, schedule : Schedule) -> None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from orionis.framework import VERSION
|
2
2
|
from orionis.luminate.console.base.command import BaseCommand
|
3
|
-
from orionis.luminate.console.exceptions.
|
3
|
+
from orionis.luminate.console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
|
4
4
|
|
5
5
|
class VersionCommand(BaseCommand):
|
6
6
|
"""
|
@@ -9,10 +9,8 @@ class VersionCommand(BaseCommand):
|
|
9
9
|
This command prints the version number of the framework in use.
|
10
10
|
"""
|
11
11
|
|
12
|
-
# Command signature used for execution.
|
13
12
|
signature = "version"
|
14
13
|
|
15
|
-
# Brief description of the command.
|
16
14
|
description = "Prints the version of the framework in use."
|
17
15
|
|
18
16
|
def handle(self) -> None:
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class CLIOrionisValueError(ValueError):
|
2
|
+
"""
|
3
|
+
Custom exception raised when there is a value error in Orionis data processing.
|
4
|
+
|
5
|
+
Parameters
|
6
|
+
----------
|
7
|
+
message : str
|
8
|
+
The response message associated with the exception.
|
9
|
+
|
10
|
+
Attributes
|
11
|
+
----------
|
12
|
+
message : str
|
13
|
+
Stores the response message passed during initialization.
|
14
|
+
|
15
|
+
Methods
|
16
|
+
-------
|
17
|
+
__str__()
|
18
|
+
Returns a string representation of the exception, including the response message.
|
19
|
+
"""
|
20
|
+
|
21
|
+
def __init__(self, message: str):
|
22
|
+
"""
|
23
|
+
Initializes the CLIOrionisValueError with the given response message.
|
24
|
+
|
25
|
+
Parameters
|
26
|
+
----------
|
27
|
+
message : str
|
28
|
+
The response message associated with the exception.
|
29
|
+
"""
|
30
|
+
super().__init__(message)
|
31
|
+
|
32
|
+
def __str__(self):
|
33
|
+
"""
|
34
|
+
Returns a string representation of the exception, including the response message.
|
35
|
+
|
36
|
+
Returns
|
37
|
+
-------
|
38
|
+
str
|
39
|
+
A string containing the exception name and the response message.
|
40
|
+
"""
|
41
|
+
return f"CLIOrionisValueError: {self.args[0]}"
|
@@ -38,130 +38,4 @@ class CLIOrionisException(Exception):
|
|
38
38
|
str
|
39
39
|
A string containing the exception name and the response message.
|
40
40
|
"""
|
41
|
-
return f"
|
42
|
-
|
43
|
-
class CLIOrionisValueError(ValueError):
|
44
|
-
"""
|
45
|
-
Custom exception raised when there is a value error in Orionis data processing.
|
46
|
-
|
47
|
-
Parameters
|
48
|
-
----------
|
49
|
-
message : str
|
50
|
-
The response message associated with the exception.
|
51
|
-
|
52
|
-
Attributes
|
53
|
-
----------
|
54
|
-
message : str
|
55
|
-
Stores the response message passed during initialization.
|
56
|
-
|
57
|
-
Methods
|
58
|
-
-------
|
59
|
-
__str__()
|
60
|
-
Returns a string representation of the exception, including the response message.
|
61
|
-
"""
|
62
|
-
|
63
|
-
def __init__(self, message: str):
|
64
|
-
"""
|
65
|
-
Initializes the CLIOrionisValueError with the given response message.
|
66
|
-
|
67
|
-
Parameters
|
68
|
-
----------
|
69
|
-
message : str
|
70
|
-
The response message associated with the exception.
|
71
|
-
"""
|
72
|
-
super().__init__(message)
|
73
|
-
|
74
|
-
def __str__(self):
|
75
|
-
"""
|
76
|
-
Returns a string representation of the exception, including the response message.
|
77
|
-
|
78
|
-
Returns
|
79
|
-
-------
|
80
|
-
str
|
81
|
-
A string containing the exception name and the response message.
|
82
|
-
"""
|
83
|
-
return f"[CLIOrionisValueError]: {self.args[0]}"
|
84
|
-
|
85
|
-
class CLIOrionisScheduleException(Exception):
|
86
|
-
"""
|
87
|
-
Custom exception raised when there is an issue with the Orionis schedule.
|
88
|
-
|
89
|
-
Parameters
|
90
|
-
----------
|
91
|
-
message : str
|
92
|
-
The response message associated with the exception.
|
93
|
-
|
94
|
-
Attributes
|
95
|
-
----------
|
96
|
-
message : str
|
97
|
-
Stores the response message passed during initialization.
|
98
|
-
|
99
|
-
Methods
|
100
|
-
-------
|
101
|
-
__str__()
|
102
|
-
Returns a string representation of the exception, including the response message.
|
103
|
-
"""
|
104
|
-
|
105
|
-
def __init__(self, message: str):
|
106
|
-
"""
|
107
|
-
Initializes the CLIOrionisScheduleException with the given response message.
|
108
|
-
|
109
|
-
Parameters
|
110
|
-
----------
|
111
|
-
message : str
|
112
|
-
The response message associated with the exception.
|
113
|
-
"""
|
114
|
-
super().__init__(message)
|
115
|
-
|
116
|
-
def __str__(self):
|
117
|
-
"""
|
118
|
-
Returns a string representation of the exception, including the response message.
|
119
|
-
|
120
|
-
Returns
|
121
|
-
-------
|
122
|
-
str
|
123
|
-
A string containing the exception name and the response message.
|
124
|
-
"""
|
125
|
-
return f"[CLIOrionisScheduleException]: {self.args[0]}"
|
126
|
-
|
127
|
-
class CLIOrionisRuntimeError(RuntimeError):
|
128
|
-
"""
|
129
|
-
Custom exception raised when there is a runtime issue with Orionis processing.
|
130
|
-
|
131
|
-
Parameters
|
132
|
-
----------
|
133
|
-
message : str
|
134
|
-
The response message associated with the exception.
|
135
|
-
|
136
|
-
Attributes
|
137
|
-
----------
|
138
|
-
message : str
|
139
|
-
Stores the response message passed during initialization.
|
140
|
-
|
141
|
-
Methods
|
142
|
-
-------
|
143
|
-
__str__()
|
144
|
-
Returns a string representation of the exception, including the response message.
|
145
|
-
"""
|
146
|
-
|
147
|
-
def __init__(self, message: str):
|
148
|
-
"""
|
149
|
-
Initializes the CLIOrionisRuntimeError with the given response message.
|
150
|
-
|
151
|
-
Parameters
|
152
|
-
----------
|
153
|
-
message : str
|
154
|
-
The response message associated with the exception.
|
155
|
-
"""
|
156
|
-
super().__init__(message)
|
157
|
-
|
158
|
-
def __str__(self):
|
159
|
-
"""
|
160
|
-
Returns a string representation of the exception, including the response message.
|
161
|
-
|
162
|
-
Returns
|
163
|
-
-------
|
164
|
-
str
|
165
|
-
A string containing the exception name and the response message.
|
166
|
-
"""
|
167
|
-
return f"[CLIOrionisRuntimeError]: {self.args[0]}"
|
41
|
+
return f"CLIOrionisException: {self.args[0]}"
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class CLIOrionisRuntimeError(RuntimeError):
|
2
|
+
"""
|
3
|
+
Custom exception raised when there is a runtime issue with Orionis processing.
|
4
|
+
|
5
|
+
Parameters
|
6
|
+
----------
|
7
|
+
message : str
|
8
|
+
The response message associated with the exception.
|
9
|
+
|
10
|
+
Attributes
|
11
|
+
----------
|
12
|
+
message : str
|
13
|
+
Stores the response message passed during initialization.
|
14
|
+
|
15
|
+
Methods
|
16
|
+
-------
|
17
|
+
__str__()
|
18
|
+
Returns a string representation of the exception, including the response message.
|
19
|
+
"""
|
20
|
+
|
21
|
+
def __init__(self, message: str):
|
22
|
+
"""
|
23
|
+
Initializes the CLIOrionisRuntimeError with the given response message.
|
24
|
+
|
25
|
+
Parameters
|
26
|
+
----------
|
27
|
+
message : str
|
28
|
+
The response message associated with the exception.
|
29
|
+
"""
|
30
|
+
super().__init__(message)
|
31
|
+
|
32
|
+
def __str__(self):
|
33
|
+
"""
|
34
|
+
Returns a string representation of the exception, including the response message.
|
35
|
+
|
36
|
+
Returns
|
37
|
+
-------
|
38
|
+
str
|
39
|
+
A string containing the exception name and the response message.
|
40
|
+
"""
|
41
|
+
return f"CLIOrionisRuntimeError: {self.args[0]}"
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class CLIOrionisScheduleException(Exception):
|
2
|
+
"""
|
3
|
+
Custom exception raised when there is an issue with the Orionis schedule.
|
4
|
+
|
5
|
+
Parameters
|
6
|
+
----------
|
7
|
+
message : str
|
8
|
+
The response message associated with the exception.
|
9
|
+
|
10
|
+
Attributes
|
11
|
+
----------
|
12
|
+
message : str
|
13
|
+
Stores the response message passed during initialization.
|
14
|
+
|
15
|
+
Methods
|
16
|
+
-------
|
17
|
+
__str__()
|
18
|
+
Returns a string representation of the exception, including the response message.
|
19
|
+
"""
|
20
|
+
|
21
|
+
def __init__(self, message: str):
|
22
|
+
"""
|
23
|
+
Initializes the CLIOrionisScheduleException with the given response message.
|
24
|
+
|
25
|
+
Parameters
|
26
|
+
----------
|
27
|
+
message : str
|
28
|
+
The response message associated with the exception.
|
29
|
+
"""
|
30
|
+
super().__init__(message)
|
31
|
+
|
32
|
+
def __str__(self):
|
33
|
+
"""
|
34
|
+
Returns a string representation of the exception, including the response message.
|
35
|
+
|
36
|
+
Returns
|
37
|
+
-------
|
38
|
+
str
|
39
|
+
A string containing the exception name and the response message.
|
40
|
+
"""
|
41
|
+
return f"CLIOrionisScheduleException: {self.args[0]}"
|