orionis 0.153.0__py3-none-any.whl → 0.156.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/installer/manager.py +2 -2
- orionis/installer/output/output.py +1 -1
- orionis/luminate/application.py +44 -65
- orionis/luminate/foundation/config/config_bootstrapper.py +1 -1
- orionis/luminate/services/commands/reactor_commands_service.py +2 -1
- orionis/luminate/services/config/config_service.py +2 -1
- orionis/luminate/services/environment/environment_service.py +1 -1
- {orionis-0.153.0.dist-info → orionis-0.156.0.dist-info}/METADATA +1 -1
- {orionis-0.153.0.dist-info → orionis-0.156.0.dist-info}/RECORD +18 -18
- /orionis/installer/contracts/{i_installer_manager.py → installer_manager.py} +0 -0
- /orionis/installer/contracts/{i_installer_output.py → installer_output.py} +0 -0
- /orionis/installer/contracts/{i_installer_setup.py → installer_setup.py} +0 -0
- /orionis/luminate/contracts/config/{i_config.py → config.py} +0 -0
- {orionis-0.153.0.dist-info → orionis-0.156.0.dist-info}/LICENCE +0 -0
- {orionis-0.153.0.dist-info → orionis-0.156.0.dist-info}/WHEEL +0 -0
- {orionis-0.153.0.dist-info → orionis-0.156.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.153.0.dist-info → orionis-0.156.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
orionis/installer/manager.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
2
|
import subprocess
|
3
3
|
import sys
|
4
|
-
from orionis.installer.contracts.
|
5
|
-
from orionis.installer.contracts.
|
4
|
+
from orionis.installer.contracts.installer_manager import IInstallerManager
|
5
|
+
from orionis.installer.contracts.installer_setup import InstallerSetup
|
6
6
|
from orionis.installer.output.output import InstallerOutput
|
7
7
|
|
8
8
|
class InstallerManager(IInstallerManager):
|
@@ -3,7 +3,7 @@ import sys
|
|
3
3
|
import datetime
|
4
4
|
import traceback
|
5
5
|
from orionis.framework import NAME, VERSION, DOCS
|
6
|
-
from orionis.installer.contracts.
|
6
|
+
from orionis.installer.contracts.installer_output import IInstallerOutput
|
7
7
|
|
8
8
|
class InstallerOutput(IInstallerOutput):
|
9
9
|
"""
|
orionis/luminate/application.py
CHANGED
@@ -150,12 +150,14 @@ class Application(metaclass=SingletonMeta):
|
|
150
150
|
provider: IServiceProvider = service(app=self._container)
|
151
151
|
provider.register()
|
152
152
|
|
153
|
-
# If the provider has a boot method, execute it (sync or async)
|
154
153
|
if hasattr(provider, 'boot') and callable(provider.boot):
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
154
|
+
try:
|
155
|
+
if inspect.iscoroutinefunction(provider.boot):
|
156
|
+
await provider.boot()
|
157
|
+
else:
|
158
|
+
provider.boot()
|
159
|
+
except Exception as e:
|
160
|
+
raise RuntimeError(f"Error booting service provider {service.__name__}: {e}") from e
|
159
161
|
|
160
162
|
def _bootstrapping(self) -> None:
|
161
163
|
"""
|
@@ -184,71 +186,48 @@ class Application(metaclass=SingletonMeta):
|
|
184
186
|
for command, data_command in self._commands.items():
|
185
187
|
self._container.transient(data_command.get('signature'), data_command.get('concrete'))
|
186
188
|
|
189
|
+
@contextmanager
|
190
|
+
def app_context():
|
191
|
+
"""
|
192
|
+
Context manager for creating an instance of the Orionis application.
|
187
193
|
|
194
|
+
This function initializes the Orionis application with a new container,
|
195
|
+
ensuring that the application is properly set up before use.
|
188
196
|
|
197
|
+
Yields
|
198
|
+
------
|
199
|
+
Application
|
200
|
+
The initialized Orionis application instance.
|
189
201
|
|
202
|
+
Raises
|
203
|
+
------
|
204
|
+
RuntimeError
|
205
|
+
If the application has not been properly initialized.
|
206
|
+
"""
|
207
|
+
try:
|
208
|
+
yield Application.getInstance()
|
209
|
+
finally:
|
210
|
+
pass
|
190
211
|
|
212
|
+
def app_booted():
|
213
|
+
"""
|
214
|
+
Check if the application has been booted.
|
191
215
|
|
216
|
+
Returns:
|
217
|
+
bool: True if the application has been booted, False otherwise.
|
218
|
+
"""
|
219
|
+
return Application.isRunning()
|
192
220
|
|
221
|
+
def orionis():
|
222
|
+
"""
|
223
|
+
Creates a new instance of the Orionis application.
|
193
224
|
|
225
|
+
Returns
|
226
|
+
-------
|
227
|
+
Application
|
228
|
+
A new instance of the Orionis application.
|
229
|
+
"""
|
230
|
+
if Application.isRunning():
|
231
|
+
Application.destroy()
|
194
232
|
|
195
|
-
|
196
|
-
# @contextmanager
|
197
|
-
# def app_context():
|
198
|
-
# """
|
199
|
-
# Context manager for creating an instance of the Orionis application.
|
200
|
-
|
201
|
-
# This function initializes the Orionis application with a new container,
|
202
|
-
# ensuring that the application is properly set up before use.
|
203
|
-
|
204
|
-
# Yields
|
205
|
-
# ------
|
206
|
-
# Application
|
207
|
-
# The initialized Orionis application instance.
|
208
|
-
|
209
|
-
# Raises
|
210
|
-
# ------
|
211
|
-
# RuntimeError
|
212
|
-
# If the application has not been properly initialized.
|
213
|
-
# """
|
214
|
-
# try:
|
215
|
-
|
216
|
-
# # Check if the application has been booted
|
217
|
-
# if not Application.booted:
|
218
|
-
# app = Application(Container()).boot()
|
219
|
-
# else:
|
220
|
-
# app = Application.getCurrentInstance()
|
221
|
-
|
222
|
-
# # Yield the application instance
|
223
|
-
# yield app
|
224
|
-
|
225
|
-
# finally:
|
226
|
-
|
227
|
-
# # Close Context Manager
|
228
|
-
# pass
|
229
|
-
|
230
|
-
# def app_booted():
|
231
|
-
# """
|
232
|
-
# Check if the application has been booted.
|
233
|
-
|
234
|
-
# Returns:
|
235
|
-
# bool: True if the application has been booted, False otherwise.
|
236
|
-
# """
|
237
|
-
# return Application.booted
|
238
|
-
|
239
|
-
# def orionis():
|
240
|
-
# """
|
241
|
-
# Creates a new instance of the Orionis application.
|
242
|
-
|
243
|
-
# Ensures that any existing singleton instance of `Application` is removed before
|
244
|
-
# creating a fresh instance. It resets the singleton instances stored in `SingletonMeta`
|
245
|
-
# and `Container`.
|
246
|
-
|
247
|
-
# Returns
|
248
|
-
# -------
|
249
|
-
# Application
|
250
|
-
# A new instance of the Orionis application.
|
251
|
-
# """
|
252
|
-
# Application.reset()
|
253
|
-
|
254
|
-
# return Application()
|
233
|
+
return Application()
|
@@ -3,7 +3,7 @@ import pathlib
|
|
3
3
|
from dataclasses import asdict
|
4
4
|
from typing import Any, Dict
|
5
5
|
from orionis.luminate.contracts.foundation.config.config_bootstrapper import IConfigBootstrapper
|
6
|
-
from orionis.luminate.contracts.config.
|
6
|
+
from orionis.luminate.contracts.config.config import IConfig
|
7
7
|
from orionis.luminate.foundation.exceptions.exception_bootstrapper import BootstrapRuntimeError
|
8
8
|
|
9
9
|
class ConfigBootstrapper(IConfigBootstrapper):
|
@@ -7,6 +7,7 @@ from orionis.luminate.console.exceptions.cli_exception import CLIOrionisExceptio
|
|
7
7
|
from orionis.luminate.console.output.console import Console
|
8
8
|
from orionis.luminate.console.output.executor import Executor
|
9
9
|
from orionis.luminate.console.parser import Parser
|
10
|
+
from orionis.luminate.contracts.application import IApplication
|
10
11
|
from orionis.luminate.facades.app_facade import app
|
11
12
|
from orionis.luminate.facades.log.log_facade import Log
|
12
13
|
|
@@ -20,7 +21,7 @@ class ReactorCommandsService:
|
|
20
21
|
- Managing execution timing and error handling.
|
21
22
|
"""
|
22
23
|
|
23
|
-
def __init__(self, command_filter: CommandFilter, log: Log, executor: Executor, console: Console, app = Resolve(
|
24
|
+
def __init__(self, command_filter: CommandFilter, log: Log, executor: Executor, console: Console, app = Resolve(IApplication)) -> None:
|
24
25
|
"""
|
25
26
|
Initializes the ReactorCommandsService instance.
|
26
27
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import copy
|
2
2
|
from typing import Any, Optional
|
3
3
|
from orionis.luminate.container.resolve import Resolve
|
4
|
+
from orionis.luminate.contracts.application import IApplication
|
4
5
|
|
5
6
|
class ConfigService:
|
6
7
|
|
7
|
-
def __init__(self, app = Resolve(
|
8
|
+
def __init__(self, app = Resolve(IApplication)) -> None:
|
8
9
|
"""
|
9
10
|
Initializes the ConfigService with the provided configuration.
|
10
11
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/cli_manager.py,sha256=oXY5UYvtalP996h7z5iaEc7z5b1hyFWXrLPrvtoxWcU,1368
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=vS4P2vKMlH82vuoBGF5SyGiY6lYsvWPsRi6u-KAyTY0,1387
|
4
4
|
orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
orionis/installer/manager.py,sha256=
|
5
|
+
orionis/installer/manager.py,sha256=SiypGJ2YiFeWyK_4drkheHUd42oS2CH63PNuxiw6Cps,3139
|
6
6
|
orionis/installer/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
orionis/installer/contracts/
|
8
|
-
orionis/installer/contracts/
|
9
|
-
orionis/installer/contracts/
|
7
|
+
orionis/installer/contracts/installer_manager.py,sha256=Zfndhuyu0JaTKo3PsGsKmVsvotQMw8Pmt4KQp97elY8,1567
|
8
|
+
orionis/installer/contracts/installer_output.py,sha256=SQZeXg5HRu-x1697HCdoU1-RVJWEqCWY-zNboWnc_vs,2897
|
9
|
+
orionis/installer/contracts/installer_setup.py,sha256=enXOusaAJVWamTpH9FjXpJf-o35twEJPaEkHz7fvB48,1711
|
10
10
|
orionis/installer/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
orionis/installer/output/output.py,sha256=
|
11
|
+
orionis/installer/output/output.py,sha256=0ZawkGxSHEYFSElbolQD5V0VjzmQHqRQ6_H7RBQRZA0,7171
|
12
12
|
orionis/installer/setup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
orionis/installer/setup/setup.py,sha256=zAZDelFwieZ9HbR_mSgvW9-gI--Zzu__6SZWWw4VEE8,6967
|
14
14
|
orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
orionis/luminate/application.py,sha256=
|
15
|
+
orionis/luminate/application.py,sha256=eKbqYtJcRzD_1eipvkyCuk-N83m7Ec_Vd63HrMABOUA,7865
|
16
16
|
orionis/luminate/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
orionis/luminate/config/app.py,sha256=7teuVPuaV2ao0M5Bv-jhSgjEwb9DtVwde2saTRmYru4,1737
|
18
18
|
orionis/luminate/config/auth.py,sha256=CG8F0pfVjKz4DY3d1Wi7gscdhnp4TT-Q8SJ2sdsHh18,523
|
@@ -52,7 +52,7 @@ orionis/luminate/container/resolve.py,sha256=aPkv2EAommw8cRZiKNLrC5gHbi5QWAB54KO
|
|
52
52
|
orionis/luminate/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
orionis/luminate/contracts/application.py,sha256=FIR6WMY0y-Hkjp0jWfjJV9kwIqBb-RB1-Jl0GWCk9eI,1077
|
54
54
|
orionis/luminate/contracts/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
|
-
orionis/luminate/contracts/config/
|
55
|
+
orionis/luminate/contracts/config/config.py,sha256=rbeojO2gm8XhSXIPY8EnUt4e0wO633OKF9Nx_tN5y60,785
|
56
56
|
orionis/luminate/contracts/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
57
57
|
orionis/luminate/contracts/console/command_filter.py,sha256=g66AlKNjTyQfdarO23r27nFqwiCnrP6kjaZ7tUGql-c,937
|
58
58
|
orionis/luminate/contracts/console/kernel.py,sha256=GtiGlWe7EQ9aeChHpQ-GlIJlJ5tEqpZYYkjNcrwXI94,945
|
@@ -124,7 +124,7 @@ orionis/luminate/facades/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
124
124
|
orionis/luminate/facades/tests/tests_facade.py,sha256=hvNMU8idxxfvz4x-1_jeloff2Gee0k61VfUhxDrR6eg,1667
|
125
125
|
orionis/luminate/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
126
126
|
orionis/luminate/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
127
|
-
orionis/luminate/foundation/config/config_bootstrapper.py,sha256=
|
127
|
+
orionis/luminate/foundation/config/config_bootstrapper.py,sha256=Zdk3C-asIc0zizRI6r_V-e3mQQ1yuh39B8DHdspOxw0,7508
|
128
128
|
orionis/luminate/foundation/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
129
129
|
orionis/luminate/foundation/console/command_bootstrapper.py,sha256=o1R3puuDyRIf3KXfxyluj6KixPTg96JD2V6TYKLOonw,7064
|
130
130
|
orionis/luminate/foundation/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -151,12 +151,12 @@ orionis/luminate/providers/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
151
151
|
orionis/luminate/providers/log/log_service_provider.py,sha256=uDG_tTdrI7PwDnV186bYQKGsZGh5rkLUsaMW2afzKqI,728
|
152
152
|
orionis/luminate/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
153
153
|
orionis/luminate/services/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
154
|
-
orionis/luminate/services/commands/reactor_commands_service.py,sha256=
|
154
|
+
orionis/luminate/services/commands/reactor_commands_service.py,sha256=rLTAZYEoaVsGXqSKk6nfgVghYIhh29wexWuyldPvjiA,6279
|
155
155
|
orionis/luminate/services/commands/scheduler_service.py,sha256=bOovnY83aZPfDz7XhGv4mQXVV116l_9UeaCstA89i_8,22474
|
156
156
|
orionis/luminate/services/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
157
|
-
orionis/luminate/services/config/config_service.py,sha256=
|
157
|
+
orionis/luminate/services/config/config_service.py,sha256=ckRUgRy_elSkpC13G5nS0bLLwuteM0XxpKQDdZL-p4o,2179
|
158
158
|
orionis/luminate/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
159
|
-
orionis/luminate/services/environment/environment_service.py,sha256=
|
159
|
+
orionis/luminate/services/environment/environment_service.py,sha256=GdrXWmOK2lWpa6GkIwFI8kHee5hQel_cIF9sduRfGfo,4776
|
160
160
|
orionis/luminate/services/files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
161
161
|
orionis/luminate/services/files/path_resolver_service.py,sha256=gCGVLtdXGuEIE6I8tm6JEB84HS1Fa5rk2whO2R6u8Wc,1698
|
162
162
|
orionis/luminate/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -181,9 +181,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
182
182
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
183
183
|
tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
|
184
|
-
orionis-0.
|
185
|
-
orionis-0.
|
186
|
-
orionis-0.
|
187
|
-
orionis-0.
|
188
|
-
orionis-0.
|
189
|
-
orionis-0.
|
184
|
+
orionis-0.156.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
185
|
+
orionis-0.156.0.dist-info/METADATA,sha256=607vUq8uxikjvn9jRoKYsnhKQ5KN7MDfTsRL0eDZ0O0,2970
|
186
|
+
orionis-0.156.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
187
|
+
orionis-0.156.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
188
|
+
orionis-0.156.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
189
|
+
orionis-0.156.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|