orionis 0.573.0__py3-none-any.whl → 0.574.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.
@@ -75,53 +75,81 @@ class Reactor(IReactor):
75
75
  # List to hold fluent command definitions
76
76
  self.__fluent_commands: List[ICommand] = []
77
77
 
78
- # Flag to indicate whether commands have been loaded
79
- self.__load_commands: bool = False
78
+ # Load core commands immediately upon initialization
79
+ self.__loadCoreCommands()
80
+ self.__load__core_commands: bool = True
81
+
82
+ # Load custom user-defined commands from the project's commands directory
83
+ self.__loadCustomCommands()
84
+ self.__load__custom_commands: bool = True
85
+
86
+ # Flag to track if fluent commands have been loaded
87
+ self.__load_fluent_commands: bool = False
80
88
 
81
89
  def __loadCommands(self) -> None:
82
90
  """
83
- Loads all available commands for the console application.
91
+ Loads all available commands into the reactor's internal registry.
92
+
93
+ This method ensures that all commands—custom user-defined, core framework, and fluent interface
94
+ commands—are loaded and registered in the reactor's internal command registry. It uses internal
95
+ flags to prevent duplicate loading and to optimize performance by ensuring each command set is
96
+ loaded only once per reactor instance.
97
+
98
+ The loading order is as follows:
99
+ 1. Core commands (if not already loaded)
100
+ 2. Custom user-defined commands (if not already loaded)
101
+ 3. Fluent interface commands (if not already loaded)
84
102
 
85
- This method orchestrates the loading of both custom user-defined commands and
86
- core framework commands into the reactor's internal command registry. It implements
87
- a lazy loading pattern using an internal flag to ensure commands are loaded only
88
- once during the reactor instance's lifetime, preventing duplicate registrations
89
- and improving performance on subsequent calls.
103
+ This order allows custom commands to override core commands if they share the same signature,
104
+ and ensures that all available commands are discoverable and executable.
90
105
 
91
- The loading process follows a specific order: custom commands are loaded first,
92
- followed by core framework commands. This ensures that custom commands can
93
- potentially override core commands if they share the same signature, giving
94
- users the flexibility to customize framework behavior.
106
+ Parameters
107
+ ----------
108
+ None
95
109
 
96
110
  Returns
97
111
  -------
98
112
  None
99
- This method does not return any value. All discovered commands are
100
- registered internally in the reactor's command registry and become
101
- available for execution through the `call` and `callAsync` methods.
113
+ This method does not return any value. All discovered commands are registered
114
+ internally in the reactor's command registry and become available for execution.
102
115
 
103
116
  Notes
104
117
  -----
105
- - Commands are loaded only once per reactor instance to prevent duplicates
106
- - Custom commands are loaded before core commands to allow potential overrides
107
- - The internal `__load_commands` flag tracks whether commands have been loaded
108
- - Both loading methods handle their own error handling and validation
118
+ - Each command set is loaded only once per reactor instance.
119
+ - The internal flags `__load__core_commands`, `__load__custom_commands`, and
120
+ `__load_fluent_commands` track the loading state of each command set.
121
+ - Both loading methods handle their own error handling and validation.
109
122
  """
110
123
 
111
- # Check if commands have already been loaded to prevent duplicate loading
112
- if not self.__load_commands:
124
+ # Load core commands if they have not been loaded yet
125
+ if not self.__load__core_commands:
126
+ self.__loadCoreCommands()
127
+ self.__load__core_commands = True
113
128
 
114
- # Load custom user-defined commands from the project's commands directory
129
+ # Load custom user-defined commands if they have not been loaded yet
130
+ if not self.__load__custom_commands:
115
131
  self.__loadCustomCommands()
132
+ self.__load__custom_commands = True
133
+
134
+ # Load fluent interface commands if they have not been loaded yet
135
+ if not self.__load_fluent_commands:
136
+ self.__loadFluentCommands()
137
+ self.__load_fluent_commands = True
116
138
 
117
- # Load core framework commands that are bundled with Orionis
139
+ # Check if commands have already been loaded to prevent duplicate loading
140
+ if not self.__load__core_commands:
118
141
  self.__loadCoreCommands()
142
+ self.__load__core_commands = True
119
143
 
120
- # Load commands defined using the fluent interface
121
- self.__loadFluentCommands()
144
+ # Load custom user-defined commands if not already loaded
145
+ if not self.__load__custom_commands:
146
+ self.__loadCustomCommands()
147
+ self.__load__custom_commands = True
122
148
 
123
- # Set the flag to indicate that commands have been successfully loaded
124
- self.__load_commands = True
149
+ # Load fluent interface defined commands if not already loaded
150
+ if not self.__load_fluent_commands:
151
+ self.__loadFluentCommands()
152
+ self.__load_fluent_commands = True
125
153
 
126
154
  def __loadFluentCommands(self) -> None:
127
155
  """
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.573.0"
8
+ VERSION = "0.574.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.573.0
3
+ Version: 0.574.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
@@ -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=40-gWJmSfJJXdIrQpbUaO9LdFHpjqQvz9UnL9DJXQDU,42758
36
+ orionis/console/core/reactor.py,sha256=NqhebHrFaKTtgdaOAG0XNJ0U29fR1oeTpm_GDV1rCR8,43767
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
@@ -224,7 +224,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=1do4B09bU_6xbFHHVYYTGM
224
224
  orionis/foundation/providers/testing_provider.py,sha256=SrJRpdvcblx9WvX7x9Y3zc7OQfiTf7la0HAJrm2ESlE,3725
225
225
  orionis/foundation/providers/workers_provider.py,sha256=oa_2NIDH6UxZrtuGkkoo_zEoNIMGgJ46vg5CCgAm7wI,3926
226
226
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
227
- orionis/metadata/framework.py,sha256=OoU8YsgokrzN0AgS4XoBYMVhjPjnhvnsE4MviMHwUnA,4109
227
+ orionis/metadata/framework.py,sha256=lmy5cgizS3-tTcfPYK4CAIT3BYMtAKq0lrd3Iw94kto,4109
228
228
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
229
229
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
230
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -417,8 +417,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
417
417
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
418
418
  orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
419
419
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
420
- orionis-0.573.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
421
- orionis-0.573.0.dist-info/METADATA,sha256=calbVjVO9Lu_izyF8n9_jbTllJLk62mm_AL8VoMxEHc,4801
422
- orionis-0.573.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
423
- orionis-0.573.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
424
- orionis-0.573.0.dist-info/RECORD,,
420
+ orionis-0.574.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
421
+ orionis-0.574.0.dist-info/METADATA,sha256=Gqx-xcIRbaWJdR1_eWTJE8P7JeTrVNMVBdLZ058C2F8,4801
422
+ orionis-0.574.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
423
+ orionis-0.574.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
424
+ orionis-0.574.0.dist-info/RECORD,,