orionis 0.418.0__py3-none-any.whl → 0.420.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/metadata/framework.py +1 -1
- {orionis-0.418.0.dist-info → orionis-0.420.0.dist-info}/METADATA +1 -1
- {orionis-0.418.0.dist-info → orionis-0.420.0.dist-info}/RECORD +58 -133
- {orionis-0.418.0.dist-info → orionis-0.420.0.dist-info}/top_level.txt +0 -1
- tests/foundation/config/app/test_foundation_config_app.py +262 -0
- {foundation → tests/foundation}/config/cache/test_foundation_config_cache_file.py +8 -8
- {foundation → tests/foundation}/config/cache/test_foundation_config_cache_stores.py +11 -3
- {foundation → tests/foundation}/config/database/test_foundation_config_database_pgsql.py +5 -5
- {foundation → tests/foundation}/config/queue/test_foundation_config_queue.py +0 -20
- {foundation → tests/foundation}/config/queue/test_foundation_config_queue_brokers.py +0 -13
- tests/foundation/config/root/test_foundation_config_root_paths.py +116 -0
- tests/foundation/config/startup/test_foundation_config_startup.py +199 -0
- foundation/config/app/test_foundation_config_app.py +0 -150
- foundation/config/root/test_foundation_config_root_paths.py +0 -201
- foundation/config/startup/test_foundation_config_startup.py +0 -205
- foundation/exceptions/__init__.py +0 -0
- foundation/exceptions/test_foundation_config_exceptions.py +0 -117
- orionis/_contracts/__init__.py +0 -0
- orionis/_contracts/application.py +0 -41
- orionis/_contracts/config/__init__.py +0 -0
- orionis/_contracts/config/config.py +0 -27
- orionis/_contracts/console/__init__.py +0 -0
- orionis/_contracts/console/base/__init__.py +0 -0
- orionis/_contracts/console/base/command.py +0 -437
- orionis/_contracts/console/command_filter.py +0 -32
- orionis/_contracts/console/kernel.py +0 -32
- orionis/_contracts/console/output/__init__.py +0 -0
- orionis/_contracts/console/output/console.py +0 -421
- orionis/_contracts/console/output/executor.py +0 -51
- orionis/_contracts/console/parser.py +0 -75
- orionis/_contracts/console/task_manager.py +0 -37
- orionis/_contracts/facades/__init__.py +0 -0
- orionis/_contracts/facades/commands/__init__.py +0 -0
- orionis/_contracts/facades/commands/commands_facade.py +0 -40
- orionis/_contracts/facades/commands/scheduler_facade.py +0 -28
- orionis/_contracts/facades/config/__init__.py +0 -0
- orionis/_contracts/facades/config/config_facade.py +0 -37
- orionis/_contracts/facades/environment/__init__.py +0 -0
- orionis/_contracts/facades/environment/environment_facade.py +0 -74
- orionis/_contracts/facades/facade.py +0 -38
- orionis/_contracts/facades/files/__init__.py +0 -0
- orionis/_contracts/facades/files/path_facade.py +0 -148
- orionis/_contracts/facades/log/__init__.py +0 -0
- orionis/_contracts/facades/log/log_facade.py +0 -83
- orionis/_contracts/facades/tests/__init__.py +0 -0
- orionis/_contracts/facades/tests/tests_facade.py +0 -30
- orionis/_contracts/foundation/__init__.py +0 -0
- orionis/_contracts/foundation/bootstraper.py +0 -41
- orionis/_contracts/foundation/config/__init__.py +0 -0
- orionis/_contracts/foundation/config/config_bootstrapper.py +0 -140
- orionis/_contracts/foundation/console/__init__.py +0 -0
- orionis/_contracts/foundation/console/command_bootstrapper.py +0 -81
- orionis/_contracts/foundation/environment/__init__.py +0 -0
- orionis/_contracts/foundation/environment/environment_bootstrapper.py +0 -33
- orionis/_contracts/foundation/providers/__init__.py +0 -0
- orionis/_contracts/foundation/providers/service_providers_bootstrapper.py +0 -47
- orionis/_contracts/providers/__init__.py +0 -0
- orionis/_contracts/providers/service_provider.py +0 -14
- orionis/_contracts/services/__init__.py +0 -0
- orionis/_contracts/services/commands/__init__.py +0 -0
- orionis/_contracts/services/commands/reactor_commands_service.py +0 -23
- orionis/_contracts/services/commands/schedule_service.py +0 -317
- orionis/_contracts/services/config/__init__.py +0 -0
- orionis/_contracts/services/config/config_service.py +0 -37
- orionis/_contracts/services/environment/__init__.py +0 -0
- orionis/_contracts/services/environment/environment_service.py +0 -74
- orionis/_contracts/services/files/__init__.py +0 -0
- orionis/_contracts/services/files/path_resolver_service.py +0 -29
- orionis/_contracts/services/log/__init__.py +0 -0
- orionis/_contracts/services/log/log_service.py +0 -89
- orionis/_contracts/support/exception_parse.py +0 -26
- orionis/_contracts/support/reflection.py +0 -352
- orionis/_foundation/__init__.py +0 -0
- orionis/_foundation/console/__init__.py +0 -0
- orionis/_foundation/console/command_bootstrapper.py +0 -175
- orionis/_foundation/environment/__init__.py +0 -0
- orionis/_foundation/environment/environment_bootstrapper.py +0 -76
- orionis/_foundation/exceptions/__init__.py +0 -0
- orionis/_foundation/exceptions/exception_bootstrapper.py +0 -54
- orionis/_foundation/exceptions/exception_providers.py +0 -54
- orionis/_foundation/foundation/config/__init__.py +0 -0
- orionis/_foundation/foundation/config/config_bootstrapper.py +0 -209
- orionis/_foundation/providers/__init__.py +0 -0
- orionis/_foundation/providers/service_providers_bootstrapper.py +0 -107
- orionis/_services/__init__.py +0 -0
- orionis/_services/commands/__init__.py +0 -0
- orionis/_services/commands/reactor_commands_service.py +0 -148
- orionis/_services/commands/scheduler_service.py +0 -611
- orionis/_services/config/__init__.py +0 -0
- orionis/_services/config/config_service.py +0 -72
- {orionis-0.418.0.dist-info → orionis-0.420.0.dist-info}/WHEEL +0 -0
- {orionis-0.418.0.dist-info → orionis-0.420.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.418.0.dist-info → orionis-0.420.0.dist-info}/zip-safe +0 -0
- {foundation → tests/foundation}/__init__.py +0 -0
- {foundation → tests/foundation}/config/__init__.py +0 -0
- {foundation → tests/foundation}/config/app/__init__.py +0 -0
- {foundation → tests/foundation}/config/auth/__init__.py +0 -0
- {foundation → tests/foundation}/config/auth/test_foundation_config_auth.py +0 -0
- {foundation → tests/foundation}/config/cache/__init__.py +0 -0
- {foundation → tests/foundation}/config/cache/test_foundation_config_cache.py +0 -0
- {foundation → tests/foundation}/config/cors/__init__.py +0 -0
- {foundation → tests/foundation}/config/cors/test_foundation_config_cors.py +0 -0
- {foundation → tests/foundation}/config/database/__init__.py +0 -0
- {foundation → tests/foundation}/config/database/test_foundation_config_database.py +0 -0
- {foundation → tests/foundation}/config/database/test_foundation_config_database_connections.py +0 -0
- {foundation → tests/foundation}/config/database/test_foundation_config_database_mysql.py +0 -0
- {foundation → tests/foundation}/config/database/test_foundation_config_database_oracle.py +0 -0
- {foundation → tests/foundation}/config/database/test_foundation_config_database_sqlite.py +0 -0
- {foundation → tests/foundation}/config/filesystems/__init__.py +0 -0
- {foundation → tests/foundation}/config/filesystems/test_foundation_config_filesystems.py +0 -0
- {foundation → tests/foundation}/config/filesystems/test_foundation_config_filesystems_aws.py +0 -0
- {foundation → tests/foundation}/config/filesystems/test_foundation_config_filesystems_disks.py +0 -0
- {foundation → tests/foundation}/config/filesystems/test_foundation_config_filesystems_local.py +0 -0
- {foundation → tests/foundation}/config/filesystems/test_foundation_config_filesystems_public.py +0 -0
- {foundation → tests/foundation}/config/logging/__init__.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_channels.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_chunked.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_daily.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_hourly.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_monthly.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_stack.py +0 -0
- {foundation → tests/foundation}/config/logging/test_foundation_config_logging_weekly.py +0 -0
- {foundation → tests/foundation}/config/mail/__init__.py +0 -0
- {foundation → tests/foundation}/config/mail/test_foundation_config_mail.py +0 -0
- {foundation → tests/foundation}/config/mail/test_foundation_config_mail_file.py +0 -0
- {foundation → tests/foundation}/config/mail/test_foundation_config_mail_mailers.py +0 -0
- {foundation → tests/foundation}/config/mail/test_foundation_config_mail_smtp.py +0 -0
- {foundation → tests/foundation}/config/queue/__init__.py +0 -0
- {foundation → tests/foundation}/config/queue/test_foundation_config_queue_database.py +0 -0
- {foundation → tests/foundation}/config/root/__init__.py +0 -0
- {foundation → tests/foundation}/config/session/__init__.py +0 -0
- {foundation → tests/foundation}/config/session/test_foundation_config_session.py +0 -0
- {foundation → tests/foundation}/config/startup/__init__.py +0 -0
- {foundation → tests/foundation}/config/testing/__init__.py +0 -0
- {foundation → tests/foundation}/config/testing/test_foundation_config_testing.py +0 -0
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
from abc import ABC, abstractmethod
|
|
2
|
-
from typing import List
|
|
3
|
-
from orionis._console.output.progress_bar import ProgressBar
|
|
4
|
-
|
|
5
|
-
class IBaseCommand(ABC):
|
|
6
|
-
"""
|
|
7
|
-
Interface for a base command class.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
@abstractmethod
|
|
11
|
-
def success(self, message: str, timestamp: bool = True) -> None:
|
|
12
|
-
"""
|
|
13
|
-
Prints a success message with a green background.
|
|
14
|
-
|
|
15
|
-
Parameters
|
|
16
|
-
----------
|
|
17
|
-
message : str
|
|
18
|
-
The message to display.
|
|
19
|
-
timestamp : bool, optional
|
|
20
|
-
Whether to include a timestamp (default is True).
|
|
21
|
-
"""
|
|
22
|
-
pass
|
|
23
|
-
|
|
24
|
-
@abstractmethod
|
|
25
|
-
def textSuccess(self, message: str) -> None:
|
|
26
|
-
"""
|
|
27
|
-
Prints a success message in green.
|
|
28
|
-
|
|
29
|
-
Parameters
|
|
30
|
-
----------
|
|
31
|
-
message : str
|
|
32
|
-
The message to display.
|
|
33
|
-
"""
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
@abstractmethod
|
|
37
|
-
def textSuccessBold(self, message: str) -> None:
|
|
38
|
-
"""
|
|
39
|
-
Prints a bold success message in green.
|
|
40
|
-
|
|
41
|
-
Parameters
|
|
42
|
-
----------
|
|
43
|
-
message : str
|
|
44
|
-
The message to display.
|
|
45
|
-
"""
|
|
46
|
-
pass
|
|
47
|
-
|
|
48
|
-
@abstractmethod
|
|
49
|
-
def info(self, message: str, timestamp: bool = True) -> None:
|
|
50
|
-
"""
|
|
51
|
-
Prints an informational message with a blue background.
|
|
52
|
-
|
|
53
|
-
Parameters
|
|
54
|
-
----------
|
|
55
|
-
message : str
|
|
56
|
-
The message to display.
|
|
57
|
-
timestamp : bool, optional
|
|
58
|
-
Whether to include a timestamp (default is True).
|
|
59
|
-
"""
|
|
60
|
-
pass
|
|
61
|
-
|
|
62
|
-
@abstractmethod
|
|
63
|
-
def textInfo(self, message: str) -> None:
|
|
64
|
-
"""
|
|
65
|
-
Prints an informational message in blue.
|
|
66
|
-
|
|
67
|
-
Parameters
|
|
68
|
-
----------
|
|
69
|
-
message : str
|
|
70
|
-
The message to display.
|
|
71
|
-
"""
|
|
72
|
-
pass
|
|
73
|
-
|
|
74
|
-
@abstractmethod
|
|
75
|
-
def textInfoBold(self, message: str) -> None:
|
|
76
|
-
"""
|
|
77
|
-
Prints a bold informational message in blue.
|
|
78
|
-
|
|
79
|
-
Parameters
|
|
80
|
-
----------
|
|
81
|
-
message : str
|
|
82
|
-
The message to display.
|
|
83
|
-
"""
|
|
84
|
-
pass
|
|
85
|
-
|
|
86
|
-
@abstractmethod
|
|
87
|
-
def warning(self, message: str, timestamp: bool = True):
|
|
88
|
-
"""
|
|
89
|
-
Prints a warning message with a yellow background.
|
|
90
|
-
|
|
91
|
-
Parameters
|
|
92
|
-
----------
|
|
93
|
-
message : str
|
|
94
|
-
The message to display.
|
|
95
|
-
timestamp : bool, optional
|
|
96
|
-
Whether to include a timestamp (default is True).
|
|
97
|
-
"""
|
|
98
|
-
pass
|
|
99
|
-
|
|
100
|
-
@abstractmethod
|
|
101
|
-
def textWarning(self, message: str) -> None:
|
|
102
|
-
"""
|
|
103
|
-
Prints a warning message in yellow.
|
|
104
|
-
|
|
105
|
-
Parameters
|
|
106
|
-
----------
|
|
107
|
-
message : str
|
|
108
|
-
The message to display.
|
|
109
|
-
"""
|
|
110
|
-
pass
|
|
111
|
-
|
|
112
|
-
@abstractmethod
|
|
113
|
-
def textWarningBold(self, message: str) -> None:
|
|
114
|
-
"""
|
|
115
|
-
Prints a bold warning message in yellow.
|
|
116
|
-
|
|
117
|
-
Parameters
|
|
118
|
-
----------
|
|
119
|
-
message : str
|
|
120
|
-
The message to display.
|
|
121
|
-
"""
|
|
122
|
-
pass
|
|
123
|
-
|
|
124
|
-
@abstractmethod
|
|
125
|
-
def fail(self, message: str, timestamp: bool = True) -> None:
|
|
126
|
-
"""
|
|
127
|
-
Prints a failure message with a red background.
|
|
128
|
-
|
|
129
|
-
Parameters
|
|
130
|
-
----------
|
|
131
|
-
message : str
|
|
132
|
-
The message to display.
|
|
133
|
-
timestamp : bool, optional
|
|
134
|
-
Whether to include a timestamp (default is True).
|
|
135
|
-
"""
|
|
136
|
-
pass
|
|
137
|
-
|
|
138
|
-
@abstractmethod
|
|
139
|
-
def error(self, message: str, timestamp: bool = True) -> None:
|
|
140
|
-
"""
|
|
141
|
-
Prints an error message with a red background.
|
|
142
|
-
|
|
143
|
-
Parameters
|
|
144
|
-
----------
|
|
145
|
-
message : str
|
|
146
|
-
The message to display.
|
|
147
|
-
timestamp : bool, optional
|
|
148
|
-
Whether to include a timestamp (default is True).
|
|
149
|
-
"""
|
|
150
|
-
pass
|
|
151
|
-
|
|
152
|
-
@abstractmethod
|
|
153
|
-
def textError(self, message: str) -> None:
|
|
154
|
-
"""
|
|
155
|
-
Prints an error message in red.
|
|
156
|
-
|
|
157
|
-
Parameters
|
|
158
|
-
----------
|
|
159
|
-
message : str
|
|
160
|
-
The message to display.
|
|
161
|
-
"""
|
|
162
|
-
pass
|
|
163
|
-
|
|
164
|
-
@abstractmethod
|
|
165
|
-
def textErrorBold(self, message: str) -> None:
|
|
166
|
-
"""
|
|
167
|
-
Prints a bold error message in red.
|
|
168
|
-
|
|
169
|
-
Parameters
|
|
170
|
-
----------
|
|
171
|
-
message : str
|
|
172
|
-
The message to display.
|
|
173
|
-
"""
|
|
174
|
-
pass
|
|
175
|
-
|
|
176
|
-
@abstractmethod
|
|
177
|
-
def textMuted(self, message: str) -> None:
|
|
178
|
-
"""
|
|
179
|
-
Prints a muted (gray) message.
|
|
180
|
-
|
|
181
|
-
Parameters
|
|
182
|
-
----------
|
|
183
|
-
message : str
|
|
184
|
-
The message to display.
|
|
185
|
-
"""
|
|
186
|
-
pass
|
|
187
|
-
|
|
188
|
-
@abstractmethod
|
|
189
|
-
def textMutedBold(self, message: str) -> None:
|
|
190
|
-
"""
|
|
191
|
-
Prints a bold muted (gray) message.
|
|
192
|
-
|
|
193
|
-
Parameters
|
|
194
|
-
----------
|
|
195
|
-
message : str
|
|
196
|
-
The message to display.
|
|
197
|
-
"""
|
|
198
|
-
pass
|
|
199
|
-
|
|
200
|
-
@abstractmethod
|
|
201
|
-
def textUnderline(self, message: str) -> None:
|
|
202
|
-
"""
|
|
203
|
-
Prints an underlined message.
|
|
204
|
-
|
|
205
|
-
Parameters
|
|
206
|
-
----------
|
|
207
|
-
message : str
|
|
208
|
-
The message to display.
|
|
209
|
-
"""
|
|
210
|
-
pass
|
|
211
|
-
|
|
212
|
-
@abstractmethod
|
|
213
|
-
def clear(self) -> None:
|
|
214
|
-
"""
|
|
215
|
-
Clears the console screen.
|
|
216
|
-
"""
|
|
217
|
-
pass
|
|
218
|
-
|
|
219
|
-
@abstractmethod
|
|
220
|
-
def clearLine(self) -> None:
|
|
221
|
-
"""
|
|
222
|
-
Clears the current console line.
|
|
223
|
-
"""
|
|
224
|
-
pass
|
|
225
|
-
|
|
226
|
-
@abstractmethod
|
|
227
|
-
def line(self) -> None:
|
|
228
|
-
"""
|
|
229
|
-
Prints a line empty.
|
|
230
|
-
"""
|
|
231
|
-
pass
|
|
232
|
-
|
|
233
|
-
@abstractmethod
|
|
234
|
-
def newLine(self, count: int = 1) -> None:
|
|
235
|
-
"""
|
|
236
|
-
Prints multiple new lines.
|
|
237
|
-
|
|
238
|
-
Parameters
|
|
239
|
-
----------
|
|
240
|
-
count : int, optional
|
|
241
|
-
The number of new lines to print (default is 1).
|
|
242
|
-
"""
|
|
243
|
-
pass
|
|
244
|
-
|
|
245
|
-
@abstractmethod
|
|
246
|
-
def write(self, message: str) -> None:
|
|
247
|
-
"""
|
|
248
|
-
Prints a message without moving to the next line.
|
|
249
|
-
|
|
250
|
-
Parameters
|
|
251
|
-
----------
|
|
252
|
-
message : str, optional
|
|
253
|
-
The message to display.
|
|
254
|
-
"""
|
|
255
|
-
pass
|
|
256
|
-
|
|
257
|
-
@abstractmethod
|
|
258
|
-
def writeLine(self, message: str) -> None:
|
|
259
|
-
"""
|
|
260
|
-
Prints a message and moves to the next line.
|
|
261
|
-
|
|
262
|
-
Parameters
|
|
263
|
-
----------
|
|
264
|
-
message : str, optional
|
|
265
|
-
The message to display (default is an empty string).
|
|
266
|
-
"""
|
|
267
|
-
pass
|
|
268
|
-
|
|
269
|
-
@abstractmethod
|
|
270
|
-
def ask(self, question: str) -> str:
|
|
271
|
-
"""
|
|
272
|
-
Prompts the user for input and returns the response.
|
|
273
|
-
|
|
274
|
-
Parameters
|
|
275
|
-
----------
|
|
276
|
-
question : str
|
|
277
|
-
The question to ask the user.
|
|
278
|
-
|
|
279
|
-
Returns
|
|
280
|
-
-------
|
|
281
|
-
str
|
|
282
|
-
The user's input.
|
|
283
|
-
"""
|
|
284
|
-
pass
|
|
285
|
-
|
|
286
|
-
@abstractmethod
|
|
287
|
-
def confirm(self, question: str, default: bool = False) -> bool:
|
|
288
|
-
"""
|
|
289
|
-
Asks a confirmation question and returns True/False based on the user's response.
|
|
290
|
-
|
|
291
|
-
Parameters
|
|
292
|
-
----------
|
|
293
|
-
question : str
|
|
294
|
-
The confirmation question to ask.
|
|
295
|
-
default : bool, optional
|
|
296
|
-
The default response if the user presses Enter without typing a response (default is False).
|
|
297
|
-
|
|
298
|
-
Returns
|
|
299
|
-
-------
|
|
300
|
-
bool
|
|
301
|
-
The user's response.
|
|
302
|
-
"""
|
|
303
|
-
pass
|
|
304
|
-
|
|
305
|
-
@abstractmethod
|
|
306
|
-
def secret(self, question: str) -> str:
|
|
307
|
-
"""
|
|
308
|
-
Prompts for hidden input (e.g., password).
|
|
309
|
-
|
|
310
|
-
Parameters
|
|
311
|
-
----------
|
|
312
|
-
question : str
|
|
313
|
-
The prompt to ask the user.
|
|
314
|
-
|
|
315
|
-
Returns
|
|
316
|
-
-------
|
|
317
|
-
str
|
|
318
|
-
The user's hidden input.
|
|
319
|
-
"""
|
|
320
|
-
pass
|
|
321
|
-
|
|
322
|
-
@abstractmethod
|
|
323
|
-
def table(self, headers: list, rows: list):
|
|
324
|
-
"""
|
|
325
|
-
Prints a formatted table in the console.
|
|
326
|
-
|
|
327
|
-
Parameters
|
|
328
|
-
----------
|
|
329
|
-
headers : list of str
|
|
330
|
-
The column headers for the table.
|
|
331
|
-
rows : list of list of str
|
|
332
|
-
The rows of the table.
|
|
333
|
-
|
|
334
|
-
Raises
|
|
335
|
-
------
|
|
336
|
-
ValueError
|
|
337
|
-
If headers or rows are empty.
|
|
338
|
-
"""
|
|
339
|
-
pass
|
|
340
|
-
|
|
341
|
-
@abstractmethod
|
|
342
|
-
def anticipate(self, question: str, options: list, default=None):
|
|
343
|
-
"""
|
|
344
|
-
Provides autocomplete suggestions for user input.
|
|
345
|
-
|
|
346
|
-
Parameters
|
|
347
|
-
----------
|
|
348
|
-
question : str
|
|
349
|
-
The prompt for the user.
|
|
350
|
-
options : list of str
|
|
351
|
-
The list of possible options for autocomplete.
|
|
352
|
-
default : str, optional
|
|
353
|
-
The default value if no matching option is found (default is None).
|
|
354
|
-
|
|
355
|
-
Returns
|
|
356
|
-
-------
|
|
357
|
-
str
|
|
358
|
-
The chosen option or the default value.
|
|
359
|
-
"""
|
|
360
|
-
pass
|
|
361
|
-
|
|
362
|
-
@abstractmethod
|
|
363
|
-
def choice(self, question: str, choices: list, default_index: int = 0) -> str:
|
|
364
|
-
"""
|
|
365
|
-
Prompts the user to select a choice from a list.
|
|
366
|
-
|
|
367
|
-
Parameters
|
|
368
|
-
----------
|
|
369
|
-
question : str
|
|
370
|
-
The prompt for the user.
|
|
371
|
-
choices : list of str
|
|
372
|
-
The list of available choices.
|
|
373
|
-
default_index : int, optional
|
|
374
|
-
The index of the default choice (default is 0).
|
|
375
|
-
|
|
376
|
-
Returns
|
|
377
|
-
-------
|
|
378
|
-
str
|
|
379
|
-
The selected choice.
|
|
380
|
-
|
|
381
|
-
Raises
|
|
382
|
-
------
|
|
383
|
-
ValueError
|
|
384
|
-
If `default_index` is out of the range of choices.
|
|
385
|
-
"""
|
|
386
|
-
pass
|
|
387
|
-
|
|
388
|
-
@abstractmethod
|
|
389
|
-
def createProgressBar(self, total: int = 100, width: int = 50) -> ProgressBar:
|
|
390
|
-
"""
|
|
391
|
-
Creates and returns a new progress bar.
|
|
392
|
-
|
|
393
|
-
This method initializes a `ProgressBar` object with the specified total and width.
|
|
394
|
-
|
|
395
|
-
Parameters
|
|
396
|
-
----------
|
|
397
|
-
total : int, optional
|
|
398
|
-
The total number of steps for the progress bar. Default is 100.
|
|
399
|
-
width : int, optional
|
|
400
|
-
The width (in characters) of the progress bar. Default is 50.
|
|
401
|
-
|
|
402
|
-
Returns
|
|
403
|
-
-------
|
|
404
|
-
ProgressBar
|
|
405
|
-
A new instance of the `ProgressBar` class, initialized with the specified `total` and `width`.
|
|
406
|
-
|
|
407
|
-
Notes
|
|
408
|
-
-----
|
|
409
|
-
The progress bar can be used to visually track the progress of a task.
|
|
410
|
-
The `total` parameter represents the number of steps to complete the task,
|
|
411
|
-
and the `width` parameter controls the number of characters used to represent the progress bar in the console.
|
|
412
|
-
"""
|
|
413
|
-
pass
|
|
414
|
-
|
|
415
|
-
@abstractmethod
|
|
416
|
-
def setArgs(self, args) -> None:
|
|
417
|
-
"""
|
|
418
|
-
Define the logic of setting command arguments.
|
|
419
|
-
|
|
420
|
-
Parameters
|
|
421
|
-
----------
|
|
422
|
-
args : argparse.Namespace or dict
|
|
423
|
-
Contain the arguments to be set for the command.
|
|
424
|
-
"""
|
|
425
|
-
pass
|
|
426
|
-
|
|
427
|
-
@abstractmethod
|
|
428
|
-
def getArgs(self) -> dict:
|
|
429
|
-
"""
|
|
430
|
-
Get the command arguments.
|
|
431
|
-
|
|
432
|
-
Returns
|
|
433
|
-
-------
|
|
434
|
-
dict
|
|
435
|
-
The command arguments.
|
|
436
|
-
"""
|
|
437
|
-
pass
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
from abc import ABC, abstractmethod
|
|
2
|
-
|
|
3
|
-
class ICommandFilter(ABC):
|
|
4
|
-
"""
|
|
5
|
-
CommandFilter handles the exclusion of specific commands from output formatting.
|
|
6
|
-
|
|
7
|
-
This class:
|
|
8
|
-
- Determines whether a command should be excluded from output formatting based on a predefined list.
|
|
9
|
-
- Can be extended or modified to support more advanced filtering if needed.
|
|
10
|
-
|
|
11
|
-
Methods
|
|
12
|
-
-------
|
|
13
|
-
isExcluded(command: str) -> bool
|
|
14
|
-
Checks if the given command is excluded from output formatting.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
@abstractmethod
|
|
18
|
-
def isExcluded(command: str) -> bool:
|
|
19
|
-
"""
|
|
20
|
-
Checks if the given command is in the excluded commands list.
|
|
21
|
-
|
|
22
|
-
Parameters
|
|
23
|
-
----------
|
|
24
|
-
command : str
|
|
25
|
-
The command to check.
|
|
26
|
-
|
|
27
|
-
Returns
|
|
28
|
-
-------
|
|
29
|
-
bool
|
|
30
|
-
Returns True if the command is excluded from output formatting, False otherwise.
|
|
31
|
-
"""
|
|
32
|
-
pass
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
from abc import ABC, abstractmethod
|
|
2
|
-
from typing import Any, Tuple
|
|
3
|
-
|
|
4
|
-
class ICLIKernel(ABC):
|
|
5
|
-
"""
|
|
6
|
-
Interface for CLIKernel, defining the required method for handling CLI command execution.
|
|
7
|
-
|
|
8
|
-
This interface ensures that any implementing class can process CLI arguments
|
|
9
|
-
and delegate execution accordingly.
|
|
10
|
-
|
|
11
|
-
Methods
|
|
12
|
-
-------
|
|
13
|
-
handle(*args: tuple[Any, ...]) -> Any
|
|
14
|
-
Processes CLI arguments and delegates execution to the appropriate command runner.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
@abstractmethod
|
|
18
|
-
def handle(self, *args: Tuple[Any, ...]) -> Any:
|
|
19
|
-
"""
|
|
20
|
-
Handles CLI command execution by forwarding arguments to a command runner.
|
|
21
|
-
|
|
22
|
-
Parameters
|
|
23
|
-
----------
|
|
24
|
-
*args : tuple[Any, ...]
|
|
25
|
-
A tuple containing CLI arguments passed from the command line.
|
|
26
|
-
|
|
27
|
-
Returns
|
|
28
|
-
-------
|
|
29
|
-
Any
|
|
30
|
-
The result of the executed command.
|
|
31
|
-
"""
|
|
32
|
-
pass
|
|
File without changes
|