orionis 0.567.0__py3-none-any.whl → 0.569.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.
@@ -2,7 +2,7 @@ import argparse
2
2
  from dataclasses import dataclass, field
3
3
  from typing import Any, Optional, List, Type, Union, Dict
4
4
  from orionis.console.enums.actions import ArgumentAction
5
- from orionis.console.exceptions.cli_orionis_value_error import CLIOrionisValueError
5
+ from orionis.console.exceptions import CLIOrionisValueError
6
6
 
7
7
  @dataclass(kw_only=True, frozen=True, slots=True)
8
8
  class CLIArgument:
@@ -10,9 +10,9 @@ from orionis.console.contracts.cli_request import ICLIRequest
10
10
  from orionis.console.contracts.command import ICommand
11
11
  from orionis.console.contracts.reactor import IReactor
12
12
  from orionis.console.entities.command import Command
13
- from orionis.console.exceptions import CLIOrionisValueError
14
- from orionis.console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
13
+ from orionis.console.exceptions import CLIOrionisValueError, CLIOrionisRuntimeError
15
14
  from orionis.console.contracts.executor import IExecutor
15
+ from orionis.console.exceptions import CLIOrionisTypeError
16
16
  from orionis.console.request.cli_request import CLIRequest
17
17
  from orionis.foundation.contracts.application import IApplication
18
18
  from orionis.services.introspection.modules.reflection import ReflectionModule
@@ -107,6 +107,7 @@ class Reactor(IReactor):
107
107
  - The internal `__load_commands` flag tracks whether commands have been loaded
108
108
  - Both loading methods handle their own error handling and validation
109
109
  """
110
+
110
111
  # Check if commands have already been loaded to prevent duplicate loading
111
112
  if not self.__load_commands:
112
113
 
@@ -210,39 +211,47 @@ class Reactor(IReactor):
210
211
  f"Failed to read file '{file_path}' for fluent command loading: {e}"
211
212
  ) from e
212
213
 
214
+ # Import Command entity here to avoid circular imports
215
+ from orionis.console.entities.command import Command as CommandEntity
216
+
213
217
  # Iterate through all fluent command definitions
214
218
  for f_command in self.__fluent_commands:
215
219
 
216
- # Validate and extract required command attributes
217
- signature, command_entity = f_command.get()
218
-
219
- # Build the arguments dictionary from the CLIArgument instances
220
- required_args: List[CLIArgument] = command_entity.args
221
-
222
- # Create an ArgumentParser instance to handle the command arguments
223
- arg_parser = argparse.ArgumentParser(
224
- usage=f"python -B reactor {signature} [options]",
225
- description=f"Command [{signature}] : {command_entity.description}",
226
- formatter_class=argparse.RawTextHelpFormatter,
227
- add_help=True,
228
- allow_abbrev=False,
229
- exit_on_error=True,
230
- prog=signature
231
- )
232
-
233
- # Iterate through each CLIArgument and add it to the ArgumentParser
234
- for arg in required_args:
235
- arg.addToParser(arg_parser)
220
+ # If the fluent command has a get method, retrieve its signature and command entity
221
+ if hasattr(f_command, 'get') and callable(getattr(f_command, 'get')):
222
+
223
+ # Get the signature and command entity from the fluent command
224
+ values = f_command.get()
225
+ signature: str = values[0]
226
+ command_entity: CommandEntity = values[1]
227
+
228
+ # Build the arguments dictionary from the CLIArgument instances
229
+ required_args: List[CLIArgument] = command_entity.args
230
+
231
+ # Create an ArgumentParser instance to handle the command arguments
232
+ arg_parser = argparse.ArgumentParser(
233
+ usage=f"python -B reactor {signature} [options]",
234
+ description=f"Command [{signature}] : {command_entity.description}",
235
+ formatter_class=argparse.RawTextHelpFormatter,
236
+ add_help=True,
237
+ allow_abbrev=False,
238
+ exit_on_error=True,
239
+ prog=signature
240
+ )
236
241
 
237
- # Register the command in the internal registry with all its metadata
238
- self.__commands[signature] = Command(
239
- obj=command_entity.obj,
240
- method=command_entity.method,
241
- timestamps=command_entity.timestamps,
242
- signature=signature,
243
- description=command_entity.description,
244
- args=arg_parser
245
- )
242
+ # Iterate through each CLIArgument and add it to the ArgumentParser
243
+ for arg in required_args:
244
+ arg.addToParser(arg_parser)
245
+
246
+ # Register the command in the internal registry with all its metadata
247
+ self.__commands[signature] = Command(
248
+ obj=command_entity.obj,
249
+ method=command_entity.method,
250
+ timestamps=command_entity.timestamps,
251
+ signature=signature,
252
+ description=command_entity.description,
253
+ args=arg_parser
254
+ )
246
255
 
247
256
  def __loadCoreCommands(self) -> None:
248
257
  """
@@ -293,9 +302,15 @@ class Reactor(IReactor):
293
302
  # Iterate through the core command classes and register them
294
303
  for obj in core_commands:
295
304
 
305
+ # Get the signature attribute from the command class
306
+ signature = getattr(obj, 'signature', None)
307
+
308
+ # Skip if signature is not defined
309
+ if signature is None:
310
+ continue
311
+
296
312
  # Validate and extract required command attributes
297
313
  timestamp = self.__ensureTimestamps(obj)
298
- signature = getattr(obj, 'signature', None)
299
314
  description = self.__ensureDescription(obj)
300
315
  args = self.__ensureArguments(obj)
301
316
 
@@ -338,6 +353,8 @@ class Reactor(IReactor):
338
353
 
339
354
  # Iterate through the command path and load command modules
340
355
  for current_directory, _, files in os.walk(commands_path):
356
+
357
+ # Iterate through each file in the current directory
341
358
  for file in files:
342
359
 
343
360
  # Only process Python files
@@ -418,7 +435,7 @@ class Reactor(IReactor):
418
435
 
419
436
  # Ensure the timestamps attribute is a boolean type
420
437
  if not isinstance(obj.timestamps, bool):
421
- raise TypeError(f"Command class {obj.__name__} 'timestamps' must be a boolean.")
438
+ raise CLIOrionisTypeError(f"Command class {obj.__name__} 'timestamps' must be a boolean.")
422
439
 
423
440
  # Return timestamps value
424
441
  return obj.timestamps
@@ -444,24 +461,24 @@ class Reactor(IReactor):
444
461
 
445
462
  Raises
446
463
  ------
447
- ValueError
464
+ CLIOrionisValueError
448
465
  If the command class lacks a 'signature' attribute, if the signature
449
466
  is an empty string, or if the signature doesn't match the required pattern.
450
- TypeError
467
+ CLIOrionisTypeError
451
468
  If the 'signature' attribute is not a string.
452
469
  """
453
470
 
454
471
  # Check if the command class has a signature attribute
455
472
  if not hasattr(obj, 'signature'):
456
- raise ValueError(f"Command class {obj.__name__} must have a 'signature' attribute.")
473
+ raise CLIOrionisValueError(f"Command class {obj.__name__} must have a 'signature' attribute.")
457
474
 
458
475
  # Ensure the signature attribute is a string type
459
476
  if not isinstance(obj.signature, str):
460
- raise TypeError(f"Command class {obj.__name__} 'signature' must be a string.")
477
+ raise CLIOrionisTypeError(f"Command class {obj.__name__} 'signature' must be a string.")
461
478
 
462
479
  # Validate that the signature is not empty after stripping whitespace
463
480
  if obj.signature.strip() == '':
464
- raise ValueError(f"Command class {obj.__name__} 'signature' cannot be an empty string.")
481
+ raise CLIOrionisValueError(f"Command class {obj.__name__} 'signature' cannot be an empty string.")
465
482
 
466
483
  # Define the regex pattern for valid signature format
467
484
  # Pattern allows: alphanumeric chars, underscores, colons
@@ -470,7 +487,7 @@ class Reactor(IReactor):
470
487
 
471
488
  # Validate the signature against the required pattern
472
489
  if not re.match(pattern, obj.signature):
473
- raise ValueError(f"Command class {obj.__name__} 'signature' must contain only alphanumeric characters, underscores (_) and colons (:), cannot start or end with underscore or colon, and cannot start with a number.")
490
+ raise CLIOrionisValueError(f"Command class {obj.__name__} 'signature' must contain only alphanumeric characters, underscores (_) and colons (:), cannot start or end with underscore or colon, and cannot start with a number.")
474
491
 
475
492
  # Return signature
476
493
  return obj.signature.strip()
@@ -496,24 +513,24 @@ class Reactor(IReactor):
496
513
 
497
514
  Raises
498
515
  ------
499
- ValueError
516
+ CLIOrionisValueError
500
517
  If the command class lacks a 'description' attribute or if the description
501
518
  is an empty string after stripping whitespace.
502
- TypeError
519
+ CLIOrionisTypeError
503
520
  If the 'description' attribute is not a string type.
504
521
  """
505
522
 
506
523
  # Check if the command class has a description attribute
507
524
  if not hasattr(obj, 'description'):
508
- raise ValueError(f"Command class {obj.__name__} must have a 'description' attribute.")
525
+ raise CLIOrionisValueError(f"Command class {obj.__name__} must have a 'description' attribute.")
509
526
 
510
527
  # Ensure the description attribute is a string type
511
528
  if not isinstance(obj.description, str):
512
- raise TypeError(f"Command class {obj.__name__} 'description' must be a string.")
529
+ raise CLIOrionisTypeError(f"Command class {obj.__name__} 'description' must be a string.")
513
530
 
514
531
  # Validate that the description is not empty after stripping whitespace
515
532
  if obj.description.strip() == '':
516
- raise ValueError(f"Command class {obj.__name__} 'description' cannot be an empty string.")
533
+ raise CLIOrionisValueError(f"Command class {obj.__name__} 'description' cannot be an empty string.")
517
534
 
518
535
  # Return description
519
536
  return obj.description.strip()
@@ -538,7 +555,7 @@ class Reactor(IReactor):
538
555
 
539
556
  Raises
540
557
  ------
541
- TypeError
558
+ CLIOrionisTypeError
542
559
  If the 'arguments' attribute is not a list or contains non-CLIArgument instances.
543
560
  """
544
561
 
@@ -548,7 +565,7 @@ class Reactor(IReactor):
548
565
 
549
566
  # Ensure the arguments attribute is a list type
550
567
  if not isinstance(obj.arguments, list):
551
- raise TypeError(f"Command class {obj.__name__} 'arguments' must be a list.")
568
+ raise CLIOrionisTypeError(f"Command class {obj.__name__} 'arguments' must be a list.")
552
569
 
553
570
  # If arguments is empty, return None
554
571
  if len(obj.arguments) == 0:
@@ -557,7 +574,7 @@ class Reactor(IReactor):
557
574
  # Validate that all items in the arguments list are CLIArgument instances
558
575
  for index, value in enumerate(obj.arguments):
559
576
  if not isinstance(value, CLIArgument):
560
- raise TypeError(f"Command class {obj.__name__} 'arguments' must contain only CLIArgument instances, found '{type(value).__name__}' at index {index}.")
577
+ raise CLIOrionisTypeError(f"Command class {obj.__name__} 'arguments' must contain only CLIArgument instances, found '{type(value).__name__}' at index {index}.")
561
578
 
562
579
  # Build the arguments dictionary from the CLIArgument instances
563
580
  required_args: List[CLIArgument] = obj.arguments
@@ -669,7 +686,7 @@ class Reactor(IReactor):
669
686
 
670
687
  Raises
671
688
  ------
672
- TypeError
689
+ CLIOrionisTypeError
673
690
  If the signature is not a string or if the handler is not a valid list.
674
691
  ValueError
675
692
  If the signature does not meet the required naming conventions.
@@ -680,11 +697,11 @@ class Reactor(IReactor):
680
697
 
681
698
  # Validate the handler parameter
682
699
  if len(handler) < 1 or not isinstance(handler, list):
683
- raise TypeError("Handler must be a list with at least one element (the callable).")
700
+ raise CLIOrionisValueError("Handler must be a list with at least one element (the callable).")
684
701
 
685
702
  # Ensure the first element is a class
686
703
  if not hasattr(handler[0], '__call__') or not hasattr(handler[0], '__name__'):
687
- raise TypeError("The first element of handler must be a class.")
704
+ raise CLIOrionisTypeError("The first element of handler must be a class.")
688
705
 
689
706
  # Create a new FluentCommand instance with the provided signature and handler
690
707
  f_command = FluentCommand(
@@ -2,42 +2,61 @@ from enum import Enum
2
2
 
3
3
  class ArgumentAction(Enum):
4
4
  """
5
- Enumeration for valid argparse action types.
6
-
7
- This enum provides a comprehensive list of all standard action types
8
- that can be used with Python's argparse module when defining command
9
- line arguments. Each enum member corresponds to a specific behavior
10
- for how argument values should be processed and stored.
5
+ Enumeration of valid action types for use with Python's argparse module.
6
+
7
+ This enum defines all standard action types that can be assigned to command-line arguments
8
+ using argparse. Each member represents a specific way argparse processes and stores argument values.
9
+
10
+ Attributes
11
+ ----------
12
+ STORE : str
13
+ Stores the argument value directly.
14
+ STORE_CONST : str
15
+ Stores a constant value when the argument is specified.
16
+ STORE_TRUE : str
17
+ Stores True when the argument is specified.
18
+ STORE_FALSE : str
19
+ Stores False when the argument is specified.
20
+ APPEND : str
21
+ Appends each argument value to a list.
22
+ APPEND_CONST : str
23
+ Appends a constant value to a list when the argument is specified.
24
+ COUNT : str
25
+ Counts the number of times the argument is specified.
26
+ HELP : str
27
+ Displays the help message and exits.
28
+ VERSION : str
29
+ Displays version information and exits.
11
30
 
12
31
  Returns
13
32
  -------
14
33
  str
15
- The string value representing the argparse action type.
34
+ The string value representing the corresponding argparse action type.
16
35
  """
17
36
 
18
- # Store the argument value directly
37
+ # Stores the argument value directly
19
38
  STORE = "store"
20
39
 
21
- # Store a constant value when the argument is specified
40
+ # Stores a constant value when the argument is specified
22
41
  STORE_CONST = "store_const"
23
42
 
24
- # Store True when the argument is specified
43
+ # Stores True when the argument is specified
25
44
  STORE_TRUE = "store_true"
26
45
 
27
- # Store False when the argument is specified
46
+ # Stores False when the argument is specified
28
47
  STORE_FALSE = "store_false"
29
48
 
30
- # Append each argument value to a list
49
+ # Appends each argument value to a list
31
50
  APPEND = "append"
32
51
 
33
- # Append a constant value to a list when the argument is specified
52
+ # Appends a constant value to a list when the argument is specified
34
53
  APPEND_CONST = "append_const"
35
54
 
36
- # Count the number of times the argument is specified
55
+ # Counts the number of times the argument is specified
37
56
  COUNT = "count"
38
57
 
39
- # Display help message and exit
58
+ # Displays the help message and exits the program
40
59
  HELP = "help"
41
60
 
42
- # Display version information and exit
61
+ # Displays version information and exits the program
43
62
  VERSION = "version"
@@ -2,62 +2,60 @@ from enum import Enum
2
2
 
3
3
  class ListeningEvent(Enum):
4
4
  """
5
- Enumeration of events related to a scheduler and its jobs.
5
+ Enumeration of scheduler and job-related events.
6
6
 
7
- This class defines various events that can occur during the lifecycle of a scheduler
8
- and its associated jobs. These events can be used to monitor and respond to changes
9
- in the scheduler's state or the execution of jobs.
7
+ This enumeration defines the various events that can occur during the lifecycle of a scheduler
8
+ and its associated jobs. These events are intended to be used for monitoring, logging, or
9
+ triggering actions in response to changes in the scheduler's state or job execution.
10
10
 
11
11
  Attributes
12
12
  ----------
13
13
  SCHEDULER_STARTED : str
14
- Event triggered when the scheduler starts.
14
+ Triggered when the scheduler starts.
15
15
  SCHEDULER_SHUTDOWN : str
16
- Event triggered when the scheduler shuts down.
16
+ Triggered when the scheduler shuts down.
17
17
  SCHEDULER_PAUSED : str
18
- Event triggered when the scheduler is paused.
18
+ Triggered when the scheduler is paused.
19
19
  SCHEDULER_RESUMED : str
20
- Event triggered when the scheduler is resumed.
20
+ Triggered when the scheduler is resumed.
21
21
  SCHEDULER_ERROR : str
22
- Event triggered when the scheduler encounters an error.
22
+ Triggered when the scheduler encounters an error.
23
23
  JOB_BEFORE : str
24
- Event triggered before a job is executed.
24
+ Triggered before a job is executed.
25
25
  JOB_AFTER : str
26
- Event triggered after a job is executed.
27
- JOB_ON_SUCCESS : str
28
- Event triggered when a job completes successfully.
26
+ Triggered after a job is executed.
29
27
  JOB_ON_FAILURE : str
30
- Event triggered when a job fails.
28
+ Triggered when a job fails.
31
29
  JOB_ON_MISSED : str
32
- Event triggered when a job is missed.
30
+ Triggered when a job is missed.
33
31
  JOB_ON_MAXINSTANCES : str
34
- Event triggered when a job exceeds its maximum allowed instances.
32
+ Triggered when a job exceeds its maximum allowed instances.
35
33
  JOB_ON_PAUSED : str
36
- Event triggered when a job is paused.
34
+ Triggered when a job is paused.
37
35
  JOB_ON_RESUMED : str
38
- Event triggered when a paused job is resumed.
36
+ Triggered when a paused job is resumed.
39
37
  JOB_ON_REMOVED : str
40
- Event triggered when a job is removed.
38
+ Triggered when a job is removed.
41
39
 
42
40
  Returns
43
41
  -------
44
42
  str
45
- The string representation of the event name.
43
+ The string value representing the event name.
46
44
  """
47
45
 
48
46
  # Scheduler-related events
49
- SCHEDULER_STARTED = "schedulerStarted" # Triggered when the scheduler starts
50
- SCHEDULER_SHUTDOWN = "schedulerShutdown" # Triggered when the scheduler shuts down
51
- SCHEDULER_PAUSED = "schedulerPaused" # Triggered when the scheduler is paused
52
- SCHEDULER_RESUMED = "schedulerResumed" # Triggered when the scheduler is resumed
53
- SCHEDULER_ERROR = "schedulerError" # Triggered when the scheduler encounters an error
47
+ SCHEDULER_STARTED = "schedulerStarted" # Triggered when the scheduler starts
48
+ SCHEDULER_SHUTDOWN = "schedulerShutdown" # Triggered when the scheduler shuts down
49
+ SCHEDULER_PAUSED = "schedulerPaused" # Triggered when the scheduler is paused
50
+ SCHEDULER_RESUMED = "schedulerResumed" # Triggered when the scheduler is resumed
51
+ SCHEDULER_ERROR = "schedulerError" # Triggered when the scheduler encounters an error
54
52
 
55
53
  # Job-related events
56
- JOB_BEFORE = "before" # Triggered before a job is executed
57
- JOB_AFTER = "after" # Triggered after a job is executed
58
- JOB_ON_FAILURE = "onFailure" # Triggered when a job fails
59
- JOB_ON_MISSED = "onMissed" # Triggered when a job is missed
60
- JOB_ON_MAXINSTANCES = "onMaxInstances" # Triggered when a job exceeds its max instances
61
- JOB_ON_PAUSED = "onPaused" # Triggered when a job is paused
62
- JOB_ON_RESUMED = "onResumed" # Triggered when a paused job is resumed
63
- JOB_ON_REMOVED = "onRemoved" # Triggered when a job is removed
54
+ JOB_BEFORE = "before" # Triggered before a job is executed
55
+ JOB_AFTER = "after" # Triggered after a job is executed
56
+ JOB_ON_FAILURE = "onFailure" # Triggered when a job fails
57
+ JOB_ON_MISSED = "onMissed" # Triggered when a job is missed
58
+ JOB_ON_MAXINSTANCES = "onMaxInstances" # Triggered when a job exceeds its max instances
59
+ JOB_ON_PAUSED = "onPaused" # Triggered when a job is paused
60
+ JOB_ON_RESUMED = "onResumed" # Triggered when a paused job is resumed
61
+ JOB_ON_REMOVED = "onRemoved" # Triggered when a job is removed
@@ -2,106 +2,103 @@ from enum import Enum
2
2
 
3
3
  class ANSIColors(Enum):
4
4
  """
5
- ANSI escape codes for text and background styling in the terminal.
5
+ ANSI escape codes for styling text and backgrounds in terminal applications.
6
6
 
7
- This Enum provides color codes for text styling in console applications,
8
- including foreground (TEXT), background (BG), bold (TEXT_BOLD), and
9
- additional text styles like underlining.
7
+ This Enum provides a comprehensive set of ANSI escape codes for coloring and styling
8
+ text output in console applications. It includes codes for foreground (text) colors,
9
+ background colors, bold and underlined styles, as well as additional effects such as
10
+ dim, italic, and magenta. These codes can be used to enhance the readability and
11
+ emphasis of console messages, such as errors, warnings, informational, and success messages.
10
12
 
11
13
  Attributes
12
14
  ----------
13
15
  DEFAULT : str
14
- Resets all colors and styles to default terminal settings.
15
-
16
- Background Colors
17
- -----------------
16
+ ANSI code to reset all colors and styles to the terminal's default.
18
17
  BG_INFO : str
19
- Blue background, typically used for informational messages.
18
+ ANSI code for a blue background, typically used for informational messages.
20
19
  BG_ERROR : str
21
- Red background, typically used for error messages.
20
+ ANSI code for a red background, typically used for error messages.
21
+ BG_FAIL : str
22
+ ANSI code for a specific red background, often used for failure messages.
22
23
  BG_WARNING : str
23
- Yellow background, typically used for warnings.
24
+ ANSI code for a yellow background, typically used for warnings.
24
25
  BG_SUCCESS : str
25
- Green background, typically used for success messages.
26
-
27
- Foreground Colors
28
- -----------------
26
+ ANSI code for a green background, typically used for success messages.
29
27
  TEXT_INFO : str
30
- Blue text, typically used for informational messages.
28
+ ANSI code for blue foreground text, used for informational messages.
31
29
  TEXT_ERROR : str
32
- Bright red text, typically used for errors.
30
+ ANSI code for bright red foreground text, used for errors.
33
31
  TEXT_WARNING : str
34
- Yellow text, typically used for warnings.
32
+ ANSI code for yellow foreground text, used for warnings.
35
33
  TEXT_SUCCESS : str
36
- Green text, typically used for success messages.
34
+ ANSI code for green foreground text, used for success messages.
37
35
  TEXT_WHITE : str
38
- White text, useful for contrast.
36
+ ANSI code for white foreground text, useful for contrast.
39
37
  TEXT_MUTED : str
40
- Gray text, typically used for secondary/muted information.
41
-
42
- Bold Foreground Colors
43
- ----------------------
38
+ ANSI code for gray (muted) foreground text, used for secondary information.
44
39
  TEXT_BOLD_INFO : str
45
- Bold blue text for informational emphasis.
40
+ ANSI code for bold blue foreground text, emphasizing informational messages.
46
41
  TEXT_BOLD_ERROR : str
47
- Bold red text for error emphasis.
42
+ ANSI code for bold red foreground text, emphasizing errors.
48
43
  TEXT_BOLD_WARNING : str
49
- Bold yellow text for warning emphasis.
44
+ ANSI code for bold yellow foreground text, emphasizing warnings.
50
45
  TEXT_BOLD_SUCCESS : str
51
- Bold green text for success emphasis.
46
+ ANSI code for bold green foreground text, emphasizing success messages.
52
47
  TEXT_BOLD_WHITE : str
53
- Bold white text for strong contrast.
48
+ ANSI code for bold white foreground text, for strong contrast.
54
49
  TEXT_BOLD_MUTED : str
55
- Bold gray text for muted yet emphasized information.
56
-
57
- Additional Text Styles
58
- ----------------------
50
+ ANSI code for bold gray (muted) foreground text, for emphasized secondary information.
59
51
  TEXT_BOLD : str
60
- Bold text style.
52
+ ANSI code for bold text style.
61
53
  TEXT_STYLE_UNDERLINE : str
62
- Underlined text for emphasis.
54
+ ANSI code for underlined text style.
63
55
  TEXT_RESET : str
64
- Resets text styles to default settings.
56
+ ANSI code to reset text styles to default settings.
65
57
  CYAN : str
66
- Cyan text for special emphasis.
58
+ ANSI code for cyan foreground text, for special emphasis.
67
59
  DIM : str
68
- Dim text for subtle emphasis.
60
+ ANSI code for dimmed foreground text, for subtle emphasis.
69
61
  MAGENTA : str
70
- Magenta text for special emphasis.
62
+ ANSI code for magenta foreground text, for special emphasis.
71
63
  ITALIC : str
72
- Italic text for special emphasis.
64
+ ANSI code for italicized foreground text, for special emphasis.
65
+
66
+ Returns
67
+ -------
68
+ str
69
+ The ANSI escape code string corresponding to the selected color or style.
73
70
  """
74
71
 
75
72
  DEFAULT = '\033[0m' # Reset all colors and styles
76
73
 
77
74
  # Background Colors
78
- BG_INFO = '\033[44m' # Blue background for INFO
79
- BG_ERROR = '\033[41m' # Red background for ERROR
80
- BG_FAIL = '\033[48;5;166m' # Red background for FAIL
81
- BG_WARNING = '\033[43m' # Yellow background for WARNING
82
- BG_SUCCESS = '\033[42m' # Green background for SUCCESS
75
+ BG_INFO = '\033[44m' # Blue background for informational messages
76
+ BG_ERROR = '\033[41m' # Red background for error messages
77
+ BG_FAIL = '\033[48;5;166m' # Specific red background for failure messages
78
+ BG_WARNING = '\033[43m' # Yellow background for warning messages
79
+ BG_SUCCESS = '\033[42m' # Green background for success messages
83
80
 
84
81
  # Foreground Text Colors
85
- TEXT_INFO = '\033[34m' # Blue for informational messages
86
- TEXT_ERROR = '\033[91m' # Bright red for errors
87
- TEXT_WARNING = '\033[33m' # Yellow for warnings
88
- TEXT_SUCCESS = '\033[32m' # Green for success
89
- TEXT_WHITE = '\033[97m' # White text
90
- TEXT_MUTED = '\033[90m' # Gray (muted) text
82
+ TEXT_INFO = '\033[34m' # Blue text for informational messages
83
+ TEXT_ERROR = '\033[91m' # Bright red text for errors
84
+ TEXT_WARNING = '\033[33m' # Yellow text for warnings
85
+ TEXT_SUCCESS = '\033[32m' # Green text for success messages
86
+ TEXT_WHITE = '\033[97m' # White text for high contrast
87
+ TEXT_MUTED = '\033[90m' # Gray (muted) text for secondary information
91
88
 
92
89
  # Bold Foreground Text Colors
93
- TEXT_BOLD_INFO = '\033[1;34m' # Bold blue for INFO
94
- TEXT_BOLD_ERROR = '\033[1;91m' # Bold red for ERROR
95
- TEXT_BOLD_WARNING = '\033[1;33m' # Bold yellow for WARNING
96
- TEXT_BOLD_SUCCESS = '\033[1;32m' # Bold green for SUCCESS
97
- TEXT_BOLD_WHITE = '\033[1;97m' # Bold white text
98
- TEXT_BOLD_MUTED = '\033[1;90m' # Bold gray (muted) text
90
+ TEXT_BOLD_INFO = '\033[1;34m' # Bold blue text for informational emphasis
91
+ TEXT_BOLD_ERROR = '\033[1;91m' # Bold red text for error emphasis
92
+ TEXT_BOLD_WARNING = '\033[1;33m' # Bold yellow text for warning emphasis
93
+ TEXT_BOLD_SUCCESS = '\033[1;32m' # Bold green text for success emphasis
94
+ TEXT_BOLD_WHITE = '\033[1;97m' # Bold white text for strong contrast
95
+ TEXT_BOLD_MUTED = '\033[1;90m' # Bold gray (muted) text for emphasized secondary info
99
96
 
100
97
  # Additional Text Styles
101
- TEXT_BOLD = "\033[1m" # Bold text
102
- TEXT_STYLE_UNDERLINE = '\033[4m' # Underline text
103
- TEXT_RESET = "\033[0m" # Reset styles
104
- CYAN = "\033[36m" # Cyan text
105
- DIM = "\033[2m" # Dim text
106
- MAGENTA = "\033[35m" # Magenta text
107
- ITALIC = "\033[3m" # Italic text
98
+ TEXT_BOLD = "\033[1m" # Bold text style
99
+ TEXT_STYLE_UNDERLINE = '\033[4m' # Underlined text style
100
+ TEXT_RESET = "\033[0m" # Reset all text styles to default
101
+ CYAN = "\033[36m" # Cyan text for special emphasis
102
+ DIM = "\033[2m" # Dim text for subtle emphasis
103
+ MAGENTA = "\033[35m" # Magenta text for special emphasis
104
+ ITALIC = "\033[3m" # Italic text for special emphasis
@@ -1,11 +1,15 @@
1
- from .cli_exception import CLIOrionisException
2
- from .cli_runtime_error import CLIOrionisRuntimeError
3
- from .cli_schedule_exception import CLIOrionisScheduleException
4
- from .cli_orionis_value_error import CLIOrionisValueError
1
+ from .cli_exception import (
2
+ CLIOrionisException,
3
+ CLIOrionisRuntimeError,
4
+ CLIOrionisScheduleException,
5
+ CLIOrionisValueError,
6
+ CLIOrionisTypeError
7
+ )
5
8
 
6
9
  __all__ = [
7
10
  'CLIOrionisException',
8
11
  'CLIOrionisRuntimeError',
9
12
  'CLIOrionisScheduleException',
10
- 'CLIOrionisValueError'
13
+ 'CLIOrionisValueError',
14
+ 'CLIOrionisTypeError',
11
15
  ]
@@ -1,41 +1,118 @@
1
1
  class CLIOrionisException(Exception):
2
2
  """
3
- Custom exception raised when there is an issue with dumping the Orionis data.
3
+ Base exception for Orionis CLI errors.
4
+
5
+ This exception is raised for errors that are specific to the Orionis command-line interface (CLI)
6
+ operations. It serves as the base class for all CLI-related exceptions within the Orionis framework,
7
+ allowing for consistent error handling and identification of CLI-specific issues.
4
8
 
5
9
  Parameters
6
10
  ----------
7
- message : str
8
- The response message associated with the exception.
11
+ message : str, optional
12
+ An optional error message describing the exception.
13
+
14
+ Returns
15
+ -------
16
+ CLIOrionisException
17
+ An instance of the CLIOrionisException class.
18
+
19
+ Notes
20
+ -----
21
+ Subclass this exception to create more specific CLI-related exceptions as needed.
22
+ """
23
+ pass # No additional implementation; serves as a base exception class.
24
+
9
25
 
10
- Attributes
26
+ class CLIOrionisValueError(ValueError):
27
+ """
28
+ Exception for invalid CLI input values in Orionis.
29
+
30
+ Raised when a function receives an argument of the correct type but an inappropriate value
31
+ during CLI operations within the Orionis framework.
32
+
33
+ Parameters
11
34
  ----------
12
- message : str
13
- Stores the response message passed during initialization.
35
+ message : str, optional
36
+ An optional error message describing the value error.
14
37
 
15
- Methods
38
+ Returns
16
39
  -------
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 CLIOrionisException 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"CLIOrionisException: {self.args[0]}"
40
+ CLIOrionisValueError
41
+ An instance of the CLIOrionisValueError class.
42
+
43
+ Notes
44
+ -----
45
+ Use this exception to signal invalid or inappropriate values encountered during CLI operations.
46
+ """
47
+ pass # Inherits from ValueError to indicate value-related errors.
48
+
49
+
50
+ class CLIOrionisRuntimeError(RuntimeError):
51
+ """
52
+ Exception for runtime errors in Orionis CLI.
53
+
54
+ Raised when a runtime error occurs during the execution of CLI commands within the Orionis framework,
55
+ distinguishing these errors from other runtime errors.
56
+
57
+ Parameters
58
+ ----------
59
+ message : str, optional
60
+ An optional error message describing the runtime error.
61
+
62
+ Returns
63
+ -------
64
+ CLIOrionisRuntimeError
65
+ An instance of the CLIOrionisRuntimeError class.
66
+
67
+ Notes
68
+ -----
69
+ Use this exception to handle runtime errors specific to CLI contexts.
70
+ """
71
+ pass # Inherits from RuntimeError for CLI-specific runtime issues.
72
+
73
+
74
+ class CLIOrionisScheduleException(Exception):
75
+ """
76
+ Exception for scheduling errors in Orionis CLI.
77
+
78
+ Raised when issues are encountered during scheduling tasks within the Orionis command-line interface.
79
+
80
+ Parameters
81
+ ----------
82
+ message : str, optional
83
+ An optional error message describing the scheduling exception.
84
+
85
+ Returns
86
+ -------
87
+ CLIOrionisScheduleException
88
+ An instance of the CLIOrionisScheduleException class.
89
+
90
+ Notes
91
+ -----
92
+ Use this exception to signal errors related to scheduling operations in the CLI.
93
+ """
94
+ pass # Used for errors related to scheduling operations.
95
+
96
+
97
+ class CLIOrionisTypeError(TypeError):
98
+ """
99
+ Exception for invalid types in Orionis CLI.
100
+
101
+ Raised when an invalid type is encountered during command-line interface operations in the Orionis framework,
102
+ providing clearer context than the built-in TypeError.
103
+
104
+ Parameters
105
+ ----------
106
+ message : str, optional
107
+ An optional error message describing the type error.
108
+
109
+ Returns
110
+ -------
111
+ CLIOrionisTypeError
112
+ An instance of the CLIOrionisTypeError class.
113
+
114
+ Notes
115
+ -----
116
+ Use this exception to handle type-related errors specific to CLI operations.
117
+ """
118
+ pass # Inherits from TypeError for CLI-specific type errors.
@@ -1,6 +1,6 @@
1
1
  from typing import Any, List
2
2
  from orionis.console.contracts.cli_request import ICLIRequest
3
- from orionis.console.exceptions.cli_orionis_value_error import CLIOrionisValueError
3
+ from orionis.console.exceptions import CLIOrionisValueError
4
4
 
5
5
  class CLIRequest(ICLIRequest):
6
6
 
@@ -1,6 +1,6 @@
1
1
  from orionis.console.base.command import BaseCommand
2
2
  from orionis.console.args.argument import CLIArgument
3
- from orionis.console.exceptions.cli_runtime_error import CLIOrionisRuntimeError
3
+ from orionis.console.exceptions import CLIOrionisRuntimeError
4
4
 
5
5
  class {{class_name}}(BaseCommand):
6
6
  """
@@ -33,7 +33,7 @@ from orionis.console.entities.scheduler_started import SchedulerStarted
33
33
  from orionis.console.entities.event import Event as EventEntity
34
34
  from orionis.console.enums.listener import ListeningEvent
35
35
  from orionis.console.exceptions import CLIOrionisRuntimeError
36
- from orionis.console.exceptions.cli_orionis_value_error import CLIOrionisValueError
36
+ from orionis.console.exceptions import CLIOrionisValueError
37
37
  from orionis.console.request.cli_request import CLIRequest
38
38
  from orionis.failure.contracts.catch import ICatch
39
39
  from orionis.foundation.contracts.application import IApplication
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.567.0"
8
+ VERSION = "0.569.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.567.0
3
+ Version: 0.569.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
@@ -3,7 +3,7 @@ orionis/app.py,sha256=foCcJAfebeZD69wsAiNvPUx_7UMK6w8ow5WpVjzwDDk,1131
3
3
  orionis/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  orionis/console/kernel.py,sha256=-TRE9caKJ76fUfK7OxA4JgBBLw9wxlmRBC020_EeD84,3795
5
5
  orionis/console/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- orionis/console/args/argument.py,sha256=3Q_4p56qF0VPxK34xX3W4Ln2-Sua9rCHClGOeO96YcY,20355
6
+ orionis/console/args/argument.py,sha256=QkdTrIYfG6CqDEMVBlQvNzRVHlBAcJOinVjq5Lz-wl8,20331
7
7
  orionis/console/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  orionis/console/base/command.py,sha256=jdUPc7MoJs9QWo_WEPV0Mb_7f6G563OWFTh7DJeUfM8,6642
9
9
  orionis/console/base/scheduler.py,sha256=IKNhpI_lPbI8H3YruD9z7eNdjuqNYceaclx_Hr5BHfY,8065
@@ -33,7 +33,7 @@ orionis/console/contracts/reactor.py,sha256=iT6ShoCutAWEeJzOf_PK7CGXi9TgrOD5tewH
33
33
  orionis/console/contracts/schedule.py,sha256=N-AYUa1CJY7a4CV9L1EX_EUDtGlDJMg4y0aV9EDby1Q,16090
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=57EFQAA4lFY2yrYAzQIiQSRBTV2rLYXLEFsB0C8dxj4,41798
36
+ orionis/console/core/reactor.py,sha256=40-gWJmSfJJXdIrQpbUaO9LdFHpjqQvz9UnL9DJXQDU,42758
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
@@ -49,14 +49,11 @@ orionis/console/entities/scheduler_resumed.py,sha256=A5eIuhqmQIUYEnfpCF8HHaoBOAG
49
49
  orionis/console/entities/scheduler_shutdown.py,sha256=aXOhNgXFQT7vdUk05Ib7mjfd0-Y_A7jq66uok9v-nsM,1036
50
50
  orionis/console/entities/scheduler_started.py,sha256=-ONkJSX3XhhT7JgqTb727St-tcowknI-GHocNrxf2AE,950
51
51
  orionis/console/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
- orionis/console/enums/actions.py,sha256=S3T-vWS6DJSGtANrq3od3-90iYAjPvJwaOZ2V02y34c,1222
53
- orionis/console/enums/listener.py,sha256=bDHDOkKQFEfEmZyiisZj37ozr8Hs7_lKvm_3uYjvEpw,2988
54
- orionis/console/enums/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
55
- orionis/console/exceptions/__init__.py,sha256=0qlHNuHMVZO87M-rP8lThUUyljRM1jSFNikaxSCjSbw,366
56
- orionis/console/exceptions/cli_exception.py,sha256=HsZ_vSeNiJWQ0gznVFNcIdhM0Bj_vkSRVBJs0wMjEKY,1141
57
- orionis/console/exceptions/cli_orionis_value_error.py,sha256=RQP0HRwxDG8hxFOT1kUoZ1Ab1CZ1KLoSIl5yqlmgG4M,1147
58
- orionis/console/exceptions/cli_runtime_error.py,sha256=DaCDGu6mXBk1LIzc7cwRROw1mePAigPNASjNZHhUSBE,1154
59
- orionis/console/exceptions/cli_schedule_exception.py,sha256=IBbXb_5zi02pyo1laHdjGn6FYZK7WWRp4j2fkZOCT6I,1161
52
+ orionis/console/enums/actions.py,sha256=1peNzH9R9RBf_uEXB1Q2__J5r-Rb7qm3pcRjbBkDc7g,1935
53
+ orionis/console/enums/listener.py,sha256=eIBWeWtg-FdTFbbPU43ChymAV3mXYZPj2H2FCyE10w8,2711
54
+ orionis/console/enums/styles.py,sha256=IItXN6uJ2tGmJZFZekn6ZrMHLDUVierU0koO625OD3c,5199
55
+ orionis/console/exceptions/__init__.py,sha256=IwFMI6PKPPam8pNLGgt638LhopoQlWx-bM1hpO5HEvg,342
56
+ orionis/console/exceptions/cli_exception.py,sha256=nk3EGkRheDbw8vrxKgUxkAAPA6gPpO2dE5nDeVHJHA0,3580
60
57
  orionis/console/fluent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
58
  orionis/console/fluent/command.py,sha256=ayEh2fH83pCITyYUXHvt2jEgjMU63zdgRRYVdvUgFvk,8195
62
59
  orionis/console/fluent/event.py,sha256=kEynb0mQDyEiTiEnctoJoPizFfe0TkySOsMaECob3UY,166495
@@ -64,11 +61,11 @@ orionis/console/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
64
61
  orionis/console/output/console.py,sha256=EtSDWRBW8wk0iJdPfB1mzU49krLJBaSAUdVdVOzzhQ4,17888
65
62
  orionis/console/output/executor.py,sha256=uQjFPOlyZLFj9pcyYPugCqxwJog0AJgK1OcmQH2ELbw,7314
66
63
  orionis/console/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
- orionis/console/request/cli_request.py,sha256=zFuoFzLVDCcSNcJZAuLAlsc9jfhck5o23qaKc2C0QAg,13231
68
- orionis/console/stub/command.stub,sha256=ATmJunhcRMGWkEKcwhJlnuAAzyGDMo9XGiPPp6xxwTQ,1258
64
+ orionis/console/request/cli_request.py,sha256=lO7088xlVK1VP-NhCIgAo7qXGzCW3nXVOJag43fUv20,13207
65
+ orionis/console/stub/command.stub,sha256=IfQ0bTrpataVFcT1ZdHyyiYNZ67D5Aox_QvgVJLeJnI,1240
69
66
  orionis/console/stub/listener.stub,sha256=DbX-ghx2-vb73kzQ6L20lyg5vSKn58jSLTwFuwNQU9k,4331
70
67
  orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
- orionis/console/tasks/schedule.py,sha256=qFnzoLyK69iaKEWMfEVxLs3S9aWVRzD4G6emTFhJMaY,83386
68
+ orionis/console/tasks/schedule.py,sha256=r0m_AESx18ahcQyuJvdhKkjmXOMIpkRYWC8eFNWNDoU,83362
72
69
  orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
70
  orionis/container/container.py,sha256=9beW1IQzgZkgVIMo0ePBAkTz7bnNz3GNZZDRogMp8AI,96902
74
71
  orionis/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -227,7 +224,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=1do4B09bU_6xbFHHVYYTGM
227
224
  orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
228
225
  orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
229
226
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
- orionis/metadata/framework.py,sha256=H1bCNz2LPAeb0lblP84YyMuz5oV3s6sZg6tNOJXdgt0,4109
227
+ orionis/metadata/framework.py,sha256=UoERiZgmjUgxCtMs2ffkbkUzrOF5Qd5wi9VDFJfN3ZA,4109
231
228
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
232
229
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
230
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -420,8 +417,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
420
417
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
421
418
  orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
422
419
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
423
- orionis-0.567.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
424
- orionis-0.567.0.dist-info/METADATA,sha256=w5agxagM2wQhVG0aRNo2DiVlYPE3JY9y3Ih9SR_Rmx4,4801
425
- orionis-0.567.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
- orionis-0.567.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
427
- orionis-0.567.0.dist-info/RECORD,,
420
+ orionis-0.569.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
421
+ orionis-0.569.0.dist-info/METADATA,sha256=b3DPny_vyZAPD-JGiVYDcxLyyTDKDAiM3SQa0Xn60Ug,4801
422
+ orionis-0.569.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
423
+ orionis-0.569.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
424
+ orionis-0.569.0.dist-info/RECORD,,
@@ -1,41 +0,0 @@
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]}"
@@ -1,41 +0,0 @@
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]}"
@@ -1,41 +0,0 @@
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]}"