orionis 0.44.0__py3-none-any.whl → 0.47.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- orionis/cli_manager.py +16 -30
- orionis/contracts/bootstrap/i_command_bootstrapper.py +59 -0
- orionis/contracts/bootstrap/i_config_bootstrapper.py +112 -0
- orionis/contracts/bootstrap/i_environment_bootstrapper.py +33 -0
- orionis/{luminate/contracts/console/base/base_command_interface.py → contracts/console/base/i_command.py} +0 -1
- orionis/contracts/facades/config/i_config_facade.py +37 -0
- orionis/contracts/facades/environment/i_environment_facade.py +40 -0
- orionis/{luminate/contracts/facades/paths_interface.py → contracts/facades/files/i_path_facade.py} +27 -20
- orionis/contracts/facades/log/i_log_facade.py +83 -0
- orionis/{luminate/contracts/facades/tests_interface.py → contracts/facades/tests/i_tests_facade.py} +3 -6
- orionis/{luminate/contracts/console/scripts/management_interface.py → contracts/installer/i_installer_manager.py} +19 -16
- orionis/contracts/installer/i_installer_output.py +101 -0
- orionis/contracts/installer/i_installer_setup.py +59 -0
- orionis/contracts/providers/i_service_provider.py +27 -0
- orionis/contracts/services/config/i_config_service.py +37 -0
- orionis/contracts/services/files/i_path_service.py +31 -0
- orionis/contracts/services/log/i_log_service.py +89 -0
- orionis/{luminate/facades/environment.py → contracts/support/i_environment.py} +25 -32
- orionis/{luminate/contracts/tools/exception_to_dict_interface.py → contracts/support/i_exception_to_dict.py} +0 -9
- orionis/{luminate/contracts/tools/reflection_interface.py → contracts/support/i_reflection.py} +17 -8
- orionis/{luminate/contracts/tools/std_interface.py → contracts/support/i_std.py} +3 -16
- orionis/framework.py +1 -1
- orionis/{luminate/console/scripts/management.py → installer/installer_manager.py} +22 -16
- orionis/{luminate/installer/output.py → installer/installer_output.py} +16 -10
- orionis/{luminate/installer/setup.py → installer/installer_setup.py} +13 -25
- orionis/luminate/app.py +15 -11
- orionis/luminate/bootstrap/command_bootstrapper.py +150 -0
- orionis/luminate/bootstrap/config_bootstrapper.py +168 -0
- orionis/luminate/bootstrap/environment_bootstrapper.py +67 -0
- orionis/luminate/config/helpers.py +20 -0
- orionis/luminate/console/base/command.py +1 -3
- orionis/luminate/console/command_filter.py +2 -2
- orionis/luminate/console/commands/cache_clear.py +17 -5
- orionis/luminate/console/commands/help.py +19 -13
- orionis/luminate/console/commands/schedule_work.py +6 -3
- orionis/luminate/console/commands/tests.py +1 -6
- orionis/luminate/console/commands/version.py +0 -5
- orionis/luminate/console/exceptions/cli_exception.py +1 -4
- orionis/luminate/console/kernel.py +2 -2
- orionis/luminate/console/output/console.py +2 -2
- orionis/luminate/console/output/executor.py +1 -1
- orionis/luminate/console/output/progress_bar.py +1 -1
- orionis/luminate/console/parser.py +2 -2
- orionis/luminate/console/runner.py +127 -126
- orionis/luminate/console/tasks/scheduler.py +8 -7
- orionis/luminate/container/container.py +1 -1
- orionis/luminate/container/types.py +38 -12
- orionis/luminate/facades/config/config_facade.py +43 -0
- orionis/luminate/facades/environment/environment_facade.py +68 -0
- orionis/luminate/facades/{paths.py → files/path_facade.py} +50 -6
- orionis/luminate/facades/log/__init__.py +0 -0
- orionis/luminate/facades/log/log_facade.py +95 -0
- orionis/luminate/facades/tests/__init__.py +0 -0
- orionis/luminate/facades/{tests.py → tests/tests_facade.py} +1 -1
- orionis/luminate/patterns/__init__.py +0 -0
- orionis/luminate/pipelines/cli_pipeline.py +122 -116
- orionis/luminate/providers/__init__.py +0 -0
- orionis/luminate/providers/config/__init__.py +0 -0
- orionis/luminate/providers/config/config_service_provider.py +26 -0
- orionis/luminate/providers/files/__init__.py +0 -0
- orionis/luminate/providers/files/path_service_provider.py +26 -0
- orionis/luminate/providers/log/__init__.py +0 -0
- orionis/luminate/providers/log/log_service_provider.py +26 -0
- orionis/luminate/services/__init__.py +0 -0
- orionis/luminate/services/config/__init__.py +0 -0
- orionis/luminate/services/config/config_service.py +72 -0
- orionis/luminate/services/files/__init__.py +0 -0
- orionis/luminate/services/files/path_service.py +71 -0
- orionis/luminate/services/log/__init__.py +0 -0
- orionis/luminate/services/log/log_service.py +159 -0
- orionis/luminate/{config → support}/environment.py +21 -32
- orionis/luminate/{tools → support}/exception_to_dict.py +1 -1
- orionis/luminate/{tools → support}/reflection.py +1 -1
- orionis/luminate/{tools → support}/std.py +1 -1
- orionis/luminate/test/unit_test.py +1 -2
- {orionis-0.44.0.dist-info → orionis-0.47.0.dist-info}/METADATA +1 -1
- orionis-0.47.0.dist-info/RECORD +157 -0
- tests/tools/test_reflection.py +1 -1
- orionis/luminate/bootstrap/commands/bootstrapper.py +0 -101
- orionis/luminate/bootstrap/commands/register.py +0 -92
- orionis/luminate/bootstrap/config/bootstrapper.py +0 -79
- orionis/luminate/bootstrap/config/parser.py +0 -53
- orionis/luminate/bootstrap/config/register.py +0 -76
- orionis/luminate/cache/app/config.py +0 -91
- orionis/luminate/cache/console/commands.py +0 -97
- orionis/luminate/console/cache.py +0 -87
- orionis/luminate/console/command.py +0 -40
- orionis/luminate/contracts/bootstrap/commands/bootstrapper_interface.py +0 -44
- orionis/luminate/contracts/bootstrap/commands/register_interface.py +0 -33
- orionis/luminate/contracts/bootstrap/config/bootstrapper_interface.py +0 -40
- orionis/luminate/contracts/bootstrap/config/parser_interface.py +0 -46
- orionis/luminate/contracts/bootstrap/config/register_interface.py +0 -47
- orionis/luminate/contracts/cache/app/config_interface.py +0 -76
- orionis/luminate/contracts/cache/console/commands_interface.py +0 -78
- orionis/luminate/contracts/config/environment_interface.py +0 -64
- orionis/luminate/contracts/console/command_interface.py +0 -36
- orionis/luminate/contracts/console/runner_interface.py +0 -50
- orionis/luminate/contracts/facades/env_interface.py +0 -64
- orionis/luminate/contracts/facades/log_interface.py +0 -48
- orionis/luminate/contracts/files/paths_interface.py +0 -29
- orionis/luminate/contracts/installer/output_interface.py +0 -125
- orionis/luminate/contracts/installer/setup_interface.py +0 -29
- orionis/luminate/contracts/installer/upgrade_interface.py +0 -24
- orionis/luminate/contracts/log/logger_interface.py +0 -33
- orionis/luminate/contracts/pipelines/cli_pipeline_interface.py +0 -84
- orionis/luminate/contracts/publisher/pypi_publisher_interface.py +0 -36
- orionis/luminate/contracts/test/unit_test_interface.py +0 -51
- orionis/luminate/facades/config.py +0 -10
- orionis/luminate/facades/log.py +0 -56
- orionis/luminate/files/paths.py +0 -56
- orionis/luminate/installer/upgrade.py +0 -42
- orionis/luminate/log/logger.py +0 -116
- orionis/luminate/publisher/pypi.py +0 -215
- orionis-0.44.0.dist-info/RECORD +0 -156
- /orionis/{luminate/bootstrap/config → contracts}/__init__.py +0 -0
- /orionis/{luminate/cache → contracts/config}/__init__.py +0 -0
- /orionis/{luminate/contracts/config/config_interface.py → contracts/config/i_config.py} +0 -0
- /orionis/{luminate/cache/app → contracts/console}/__init__.py +0 -0
- /orionis/{luminate/cache/console → contracts/console/base}/__init__.py +0 -0
- /orionis/{luminate/contracts/console/command_filter_interface.py → contracts/console/i_command_filter.py} +0 -0
- /orionis/{luminate/contracts/console/kernel_interface.py → contracts/console/i_kernel.py} +0 -0
- /orionis/{luminate/contracts/console/parser_interface.py → contracts/console/i_parser.py} +0 -0
- /orionis/{luminate/contracts/console/task_manager_interface.py → contracts/console/i_task_manager.py} +0 -0
- /orionis/{luminate/config/dataclass → contracts/console/output}/__init__.py +0 -0
- /orionis/{luminate/contracts/console/output/console_interface.py → contracts/console/output/i_console.py} +0 -0
- /orionis/{luminate/contracts/console/output/executor_interface.py → contracts/console/output/i_executor.py} +0 -0
- /orionis/{luminate/contracts/console/output/progress_bar_interface.py → contracts/console/output/i_progress_bar.py} +0 -0
- /orionis/{luminate/console/scripts → contracts/console/tasks}/__init__.py +0 -0
- /orionis/{luminate/contracts/console/tasks/schedule_interface.py → contracts/console/tasks/i_schedule.py} +0 -0
- /orionis/{luminate/contracts/container/container_interface.py → contracts/container/i_container.py} +0 -0
- /orionis/{luminate/contracts/container/types_interface.py → contracts/container/i_types.py} +0 -0
- /orionis/{luminate/contracts → contracts/facades}/__init__.py +0 -0
- /orionis/{luminate/contracts/cache → contracts/facades/config}/__init__.py +0 -0
- /orionis/{luminate/contracts/config → contracts/facades/environment}/__init__.py +0 -0
- /orionis/{luminate/contracts/console → contracts/facades/files}/__init__.py +0 -0
- /orionis/{luminate/contracts/facades → contracts/facades/log}/__init__.py +0 -0
- /orionis/{luminate/contracts/files → contracts/facades/tests}/__init__.py +0 -0
- /orionis/{luminate/contracts → contracts}/installer/__init__.py +0 -0
- /orionis/{luminate/contracts/log → contracts/providers}/__init__.py +0 -0
- /orionis/{luminate/contracts/publisher → contracts/services}/__init__.py +0 -0
- /orionis/{luminate/contracts/test → contracts/services/config}/__init__.py +0 -0
- /orionis/{luminate/contracts/tools → contracts/services/files}/__init__.py +0 -0
- /orionis/{luminate/files → contracts/services/log}/__init__.py +0 -0
- /orionis/{luminate/installer → installer}/__init__.py +0 -0
- /orionis/luminate/bootstrap/{cli_exception.py → exception_bootstrapper.py} +0 -0
- /orionis/luminate/config/{dataclass/app.py → app.py} +0 -0
- /orionis/luminate/config/{dataclass/auth.py → auth.py} +0 -0
- /orionis/luminate/config/{dataclass/cache.py → cache.py} +0 -0
- /orionis/luminate/config/{dataclass/cors.py → cors.py} +0 -0
- /orionis/luminate/config/{dataclass/database.py → database.py} +0 -0
- /orionis/luminate/config/{dataclass/filesystems.py → filesystems.py} +0 -0
- /orionis/luminate/config/{dataclass/logging.py → logging.py} +0 -0
- /orionis/luminate/config/{dataclass/mail.py → mail.py} +0 -0
- /orionis/luminate/config/{dataclass/queue.py → queue.py} +0 -0
- /orionis/luminate/config/{dataclass/session.py → session.py} +0 -0
- /orionis/luminate/{log → facades/config}/__init__.py +0 -0
- /orionis/luminate/{publisher → facades/environment}/__init__.py +0 -0
- /orionis/luminate/{tools → facades/files}/__init__.py +0 -0
- /orionis/luminate/{tools → support}/dot_dict.py +0 -0
- /orionis/{luminate/installer → static/ascii}/icon.ascii +0 -0
- /orionis/{luminate/installer → static/ascii}/info.ascii +0 -0
- /orionis/{luminate/static → static}/bg/galaxy.jpg +0 -0
- /orionis/{luminate/static → static}/favicon/OrionisFrameworkFavicon.png +0 -0
- /orionis/{luminate/static → static}/logos/OrionisFramework.jpg +0 -0
- /orionis/{luminate/static → static}/logos/OrionisFramework.png +0 -0
- /orionis/{luminate/static → static}/logos/OrionisFramework.psd +0 -0
- /orionis/{luminate/static → static}/logos/OrionisFramework2.png +0 -0
- /orionis/{luminate/static → static}/logos/OrionisFramework3.png +0 -0
- {orionis-0.44.0.dist-info → orionis-0.47.0.dist-info}/LICENCE +0 -0
- {orionis-0.44.0.dist-info → orionis-0.47.0.dist-info}/WHEEL +0 -0
- {orionis-0.44.0.dist-info → orionis-0.47.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.44.0.dist-info → orionis-0.47.0.dist-info}/top_level.txt +0 -0
@@ -1,29 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class ISkeletonPath(ABC):
|
4
|
-
"""
|
5
|
-
Resolves the absolute path for a given relative directory based on the script's execution directory.
|
6
|
-
Ensures that the requested path is a valid directory.
|
7
|
-
|
8
|
-
Attributes
|
9
|
-
----------
|
10
|
-
route : str
|
11
|
-
The resolved absolute path to the directory.
|
12
|
-
|
13
|
-
Methods
|
14
|
-
-------
|
15
|
-
__str__():
|
16
|
-
Returns the absolute path as a string.
|
17
|
-
"""
|
18
|
-
|
19
|
-
@abstractmethod
|
20
|
-
def resolve(self) -> str:
|
21
|
-
"""
|
22
|
-
Returns the absolute path as a string.
|
23
|
-
|
24
|
-
Returns
|
25
|
-
-------
|
26
|
-
str
|
27
|
-
The absolute directory path.
|
28
|
-
"""
|
29
|
-
pass
|
@@ -1,125 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class IOutput(ABC):
|
4
|
-
"""
|
5
|
-
Interface defining the contract for the Output class.
|
6
|
-
|
7
|
-
This interface ensures that any implementing class provides methods for
|
8
|
-
displaying messages, ASCII-based framework information, and handling errors.
|
9
|
-
|
10
|
-
Methods
|
11
|
-
-------
|
12
|
-
asciiIco() -> None
|
13
|
-
Displays the framework's ASCII icon along with relevant information.
|
14
|
-
asciiInfo() -> None
|
15
|
-
Displays additional ASCII-based information about the framework.
|
16
|
-
startInstallation() -> None
|
17
|
-
Shows a welcome message when installation starts.
|
18
|
-
endInstallation() -> None
|
19
|
-
Shows a completion message when installation finishes.
|
20
|
-
info(message: str) -> None
|
21
|
-
Displays an informational message.
|
22
|
-
fail(message: str) -> None
|
23
|
-
Displays a failure message.
|
24
|
-
error(message: str) -> None
|
25
|
-
Displays an error message and terminates the program.
|
26
|
-
"""
|
27
|
-
|
28
|
-
@abstractmethod
|
29
|
-
def asciiIco(self) -> None:
|
30
|
-
"""
|
31
|
-
Displays the framework's ASCII icon along with relevant information.
|
32
|
-
|
33
|
-
Raises
|
34
|
-
------
|
35
|
-
Exception
|
36
|
-
If an error occurs while displaying the ASCII art.
|
37
|
-
"""
|
38
|
-
pass
|
39
|
-
|
40
|
-
@abstractmethod
|
41
|
-
def asciiInfo(self) -> None:
|
42
|
-
"""
|
43
|
-
Displays additional ASCII-based information about the framework.
|
44
|
-
|
45
|
-
Raises
|
46
|
-
------
|
47
|
-
Exception
|
48
|
-
If an error occurs while displaying the ASCII information.
|
49
|
-
"""
|
50
|
-
pass
|
51
|
-
|
52
|
-
@abstractmethod
|
53
|
-
def startInstallation(self) -> None:
|
54
|
-
"""
|
55
|
-
Shows a welcome message when installation starts.
|
56
|
-
|
57
|
-
Raises
|
58
|
-
------
|
59
|
-
Exception
|
60
|
-
If an error occurs during message display.
|
61
|
-
"""
|
62
|
-
pass
|
63
|
-
|
64
|
-
@abstractmethod
|
65
|
-
def endInstallation(self) -> None:
|
66
|
-
"""
|
67
|
-
Shows a completion message when installation finishes.
|
68
|
-
|
69
|
-
Raises
|
70
|
-
------
|
71
|
-
Exception
|
72
|
-
If an error occurs during message display.
|
73
|
-
"""
|
74
|
-
pass
|
75
|
-
|
76
|
-
@abstractmethod
|
77
|
-
def info(self, message: str) -> None:
|
78
|
-
"""
|
79
|
-
Displays an informational message.
|
80
|
-
|
81
|
-
Parameters
|
82
|
-
----------
|
83
|
-
message : str
|
84
|
-
The message to display.
|
85
|
-
|
86
|
-
Raises
|
87
|
-
------
|
88
|
-
Exception
|
89
|
-
If an error occurs while displaying the message.
|
90
|
-
"""
|
91
|
-
pass
|
92
|
-
|
93
|
-
@abstractmethod
|
94
|
-
def fail(self, message: str) -> None:
|
95
|
-
"""
|
96
|
-
Displays a failure message.
|
97
|
-
|
98
|
-
Parameters
|
99
|
-
----------
|
100
|
-
message : str
|
101
|
-
The message to display.
|
102
|
-
|
103
|
-
Raises
|
104
|
-
------
|
105
|
-
Exception
|
106
|
-
If an error occurs while displaying the message.
|
107
|
-
"""
|
108
|
-
pass
|
109
|
-
|
110
|
-
@abstractmethod
|
111
|
-
def error(self, message: str) -> None:
|
112
|
-
"""
|
113
|
-
Displays an error message and terminates the program.
|
114
|
-
|
115
|
-
Parameters
|
116
|
-
----------
|
117
|
-
message : str
|
118
|
-
The message to display.
|
119
|
-
|
120
|
-
Raises
|
121
|
-
------
|
122
|
-
SystemExit
|
123
|
-
Terminates the program with an exit code.
|
124
|
-
"""
|
125
|
-
pass
|
@@ -1,29 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class ISetup(ABC):
|
4
|
-
"""
|
5
|
-
Abstract base class for setup operations.
|
6
|
-
|
7
|
-
This interface defines a contract for setup classes, requiring the implementation
|
8
|
-
of the `handle` method to execute setup logic.
|
9
|
-
|
10
|
-
Methods
|
11
|
-
-------
|
12
|
-
handle()
|
13
|
-
Abstract method that must be implemented by subclasses to define setup behavior.
|
14
|
-
"""
|
15
|
-
|
16
|
-
@abstractmethod
|
17
|
-
def handle(self):
|
18
|
-
"""
|
19
|
-
Execute the setup process.
|
20
|
-
|
21
|
-
This method must be implemented by any subclass to perform the necessary
|
22
|
-
setup actions. The specific implementation details depend on the subclass.
|
23
|
-
|
24
|
-
Raises
|
25
|
-
------
|
26
|
-
NotImplementedError
|
27
|
-
If the method is not implemented in a subclass.
|
28
|
-
"""
|
29
|
-
pass
|
@@ -1,24 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class IUpgrade(ABC):
|
4
|
-
"""
|
5
|
-
Interface for the Upgrade process in Orionis.
|
6
|
-
|
7
|
-
This interface enforces the implementation of methods required to handle
|
8
|
-
upgrading Orionis to the latest version.
|
9
|
-
"""
|
10
|
-
|
11
|
-
@abstractmethod
|
12
|
-
def execute() -> None:
|
13
|
-
"""
|
14
|
-
Executes the upgrade process for Orionis.
|
15
|
-
|
16
|
-
This method should be implemented to define the upgrade logic, ensuring
|
17
|
-
the application is updated to the latest available version.
|
18
|
-
|
19
|
-
Raises
|
20
|
-
------
|
21
|
-
ValueError
|
22
|
-
If the upgrade process fails or encounters any error during execution.
|
23
|
-
"""
|
24
|
-
pass
|
@@ -1,33 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class ILogger(ABC):
|
4
|
-
"""
|
5
|
-
Abstract base class for a logger.
|
6
|
-
|
7
|
-
This defines the contract that any concrete logger class must implement.
|
8
|
-
"""
|
9
|
-
|
10
|
-
@abstractmethod
|
11
|
-
def info(self, message: str) -> None:
|
12
|
-
"""Logs an informational message."""
|
13
|
-
pass
|
14
|
-
|
15
|
-
@abstractmethod
|
16
|
-
def error(self, message: str) -> None:
|
17
|
-
"""Logs an error message."""
|
18
|
-
pass
|
19
|
-
|
20
|
-
@abstractmethod
|
21
|
-
def success(self, message: str) -> None:
|
22
|
-
"""Logs a success message (treated as info)."""
|
23
|
-
pass
|
24
|
-
|
25
|
-
@abstractmethod
|
26
|
-
def warning(self, message: str) -> None:
|
27
|
-
"""Logs a warning message."""
|
28
|
-
pass
|
29
|
-
|
30
|
-
@abstractmethod
|
31
|
-
def debug(self, message: str) -> None:
|
32
|
-
"""Logs a debug message."""
|
33
|
-
pass
|
@@ -1,84 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
from typing import Any, Dict, Optional
|
3
|
-
|
4
|
-
class ICLIPipeline(ABC):
|
5
|
-
"""
|
6
|
-
Interface for CLIPipeline, defining the structure for handling CLI command retrieval,
|
7
|
-
argument parsing, and execution.
|
8
|
-
|
9
|
-
Methods
|
10
|
-
-------
|
11
|
-
getCommand(signature: str) -> "ICLIPipeline"
|
12
|
-
Retrieves a command from the cache based on its signature.
|
13
|
-
|
14
|
-
parseArguments(vars: Optional[Dict[str, Any]] = None, *args, **kwargs) -> "ICLIPipeline"
|
15
|
-
Parses command-line arguments using the framework's argument parser.
|
16
|
-
|
17
|
-
execute() -> Any
|
18
|
-
Executes the retrieved command using parsed arguments.
|
19
|
-
"""
|
20
|
-
|
21
|
-
@abstractmethod
|
22
|
-
def getCommand(self, signature: str) -> "ICLIPipeline":
|
23
|
-
"""
|
24
|
-
Retrieves a command from the cache based on its signature.
|
25
|
-
|
26
|
-
Parameters
|
27
|
-
----------
|
28
|
-
signature : str
|
29
|
-
The unique identifier of the command.
|
30
|
-
|
31
|
-
Returns
|
32
|
-
-------
|
33
|
-
ICLIPipeline
|
34
|
-
The current instance of the pipeline for method chaining.
|
35
|
-
|
36
|
-
Raises
|
37
|
-
------
|
38
|
-
ValueError
|
39
|
-
If the command signature is not found in the cache.
|
40
|
-
"""
|
41
|
-
pass
|
42
|
-
|
43
|
-
@abstractmethod
|
44
|
-
def parseArguments(self, vars: Optional[Dict[str, Any]] = None, *args, **kwargs) -> "ICLIPipeline":
|
45
|
-
"""
|
46
|
-
Parses command-line arguments using the framework's argument parser.
|
47
|
-
|
48
|
-
Parameters
|
49
|
-
----------
|
50
|
-
vars : dict, optional
|
51
|
-
A dictionary of predefined variables to be included in parsing.
|
52
|
-
*args
|
53
|
-
Positional arguments for the parser.
|
54
|
-
**kwargs
|
55
|
-
Keyword arguments for the parser.
|
56
|
-
|
57
|
-
Returns
|
58
|
-
-------
|
59
|
-
ICLIPipeline
|
60
|
-
The current instance of the pipeline for method chaining.
|
61
|
-
|
62
|
-
Raises
|
63
|
-
------
|
64
|
-
ValueError
|
65
|
-
If an error occurs during argument parsing.
|
66
|
-
"""
|
67
|
-
pass
|
68
|
-
|
69
|
-
@abstractmethod
|
70
|
-
def execute(self) -> Any:
|
71
|
-
"""
|
72
|
-
Executes the retrieved command using parsed arguments.
|
73
|
-
|
74
|
-
Returns
|
75
|
-
-------
|
76
|
-
Any
|
77
|
-
The output of the command execution.
|
78
|
-
|
79
|
-
Raises
|
80
|
-
------
|
81
|
-
ValueError
|
82
|
-
If the command instance is invalid.
|
83
|
-
"""
|
84
|
-
pass
|
@@ -1,36 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class IPypiPublisher(ABC):
|
4
|
-
"""
|
5
|
-
Interface for managing the publishing process of a package to PyPI
|
6
|
-
and handling repository operations.
|
7
|
-
"""
|
8
|
-
|
9
|
-
@abstractmethod
|
10
|
-
def gitPush(self):
|
11
|
-
"""
|
12
|
-
Commits and pushes changes to the Git repository if modifications are detected.
|
13
|
-
"""
|
14
|
-
pass
|
15
|
-
|
16
|
-
@abstractmethod
|
17
|
-
def publish(self):
|
18
|
-
"""
|
19
|
-
Uploads the package to PyPI using Twine.
|
20
|
-
|
21
|
-
The PyPI token should be retrieved from the environment variable or
|
22
|
-
passed during initialization.
|
23
|
-
"""
|
24
|
-
pass
|
25
|
-
|
26
|
-
@abstractmethod
|
27
|
-
def clearRepository(self):
|
28
|
-
"""
|
29
|
-
Deletes temporary directories created during the publishing process.
|
30
|
-
|
31
|
-
The following directories should be removed:
|
32
|
-
- build
|
33
|
-
- dist
|
34
|
-
- orionis.egg-info
|
35
|
-
"""
|
36
|
-
pass
|
@@ -1,51 +0,0 @@
|
|
1
|
-
from abc import ABC, abstractmethod
|
2
|
-
|
3
|
-
class IUnitTest(ABC):
|
4
|
-
"""
|
5
|
-
A testing framework for discovering and running unit tests in a structured way.
|
6
|
-
|
7
|
-
Attributes
|
8
|
-
----------
|
9
|
-
loader : unittest.TestLoader
|
10
|
-
A test loader instance used to discover tests.
|
11
|
-
suite : unittest.TestSuite
|
12
|
-
A test suite that holds all discovered tests.
|
13
|
-
|
14
|
-
Methods
|
15
|
-
-------
|
16
|
-
add_folder_tests(folder_path: str, pattern: str = 'test_*.py') -> None
|
17
|
-
Adds test cases from a specified folder to the test suite.
|
18
|
-
run_tests() -> None
|
19
|
-
Executes all tests in the test suite and raises an exception if any fail.
|
20
|
-
"""
|
21
|
-
|
22
|
-
@abstractmethod
|
23
|
-
def addFolderTests(self, folder_path: str, pattern: str = "test_*.py") -> None:
|
24
|
-
"""
|
25
|
-
Adds all test cases from a specified folder to the test suite.
|
26
|
-
|
27
|
-
Parameters
|
28
|
-
----------
|
29
|
-
folder_path : str
|
30
|
-
The relative path to the folder containing test files.
|
31
|
-
pattern : str, optional
|
32
|
-
A pattern to match test files (default is 'test_*.py').
|
33
|
-
|
34
|
-
Raises
|
35
|
-
------
|
36
|
-
ValueError
|
37
|
-
If the folder path is invalid or no tests are found.
|
38
|
-
"""
|
39
|
-
pass
|
40
|
-
|
41
|
-
@abstractmethod
|
42
|
-
def run(self) -> None:
|
43
|
-
"""
|
44
|
-
Runs all tests added to the test suite.
|
45
|
-
|
46
|
-
Raises
|
47
|
-
------
|
48
|
-
OrionisTestFailureException
|
49
|
-
If one or more tests fail.
|
50
|
-
"""
|
51
|
-
pass
|
orionis/luminate/facades/log.py
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
import logging
|
2
|
-
from typing import Optional
|
3
|
-
from orionis.luminate.log.logger import Logguer
|
4
|
-
from orionis.luminate.contracts.log.logger_interface import ILogger
|
5
|
-
from orionis.luminate.contracts.facades.log_interface import ILogFacade
|
6
|
-
|
7
|
-
class Log(ILogFacade):
|
8
|
-
"""
|
9
|
-
Facade for accessing the Logguer instance.
|
10
|
-
|
11
|
-
Provides a simplified interface for logging messages.
|
12
|
-
"""
|
13
|
-
|
14
|
-
@staticmethod
|
15
|
-
def info(message: str) -> None:
|
16
|
-
"""Logs an informational message."""
|
17
|
-
Logguer().info(message)
|
18
|
-
|
19
|
-
@staticmethod
|
20
|
-
def error(message: str) -> None:
|
21
|
-
"""Logs an error message."""
|
22
|
-
Logguer().error(message)
|
23
|
-
|
24
|
-
@staticmethod
|
25
|
-
def success(message: str) -> None:
|
26
|
-
"""Logs a success message (treated as info)."""
|
27
|
-
Logguer().success(message)
|
28
|
-
|
29
|
-
@staticmethod
|
30
|
-
def warning(message: str) -> None:
|
31
|
-
"""Logs a warning message."""
|
32
|
-
Logguer().warning(message)
|
33
|
-
|
34
|
-
@staticmethod
|
35
|
-
def debug(message: str) -> None:
|
36
|
-
"""Logs a debug message."""
|
37
|
-
Logguer().debug(message)
|
38
|
-
|
39
|
-
@staticmethod
|
40
|
-
def configure(path: Optional[str] = None, level: int = logging.INFO) -> ILogger:
|
41
|
-
"""
|
42
|
-
Configures and returns the Logguer instance.
|
43
|
-
|
44
|
-
Parameters
|
45
|
-
----------
|
46
|
-
path : str, optional
|
47
|
-
The file path where logs will be stored. If None, a default path is used.
|
48
|
-
level : int, optional
|
49
|
-
The logging level (default is logging.INFO).
|
50
|
-
|
51
|
-
Returns
|
52
|
-
-------
|
53
|
-
ILogger
|
54
|
-
Configured logger instance.
|
55
|
-
"""
|
56
|
-
return Logguer(path, level)
|
orionis/luminate/files/paths.py
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
from pathlib import Path as SysPath
|
3
|
-
from orionis.luminate.contracts.files.paths_interface import ISkeletonPath
|
4
|
-
|
5
|
-
class SkeletonPath(ISkeletonPath):
|
6
|
-
"""
|
7
|
-
Resolves the absolute path for a given relative directory based on the script's execution directory.
|
8
|
-
Ensures that the requested path is a valid directory.
|
9
|
-
|
10
|
-
Attributes
|
11
|
-
----------
|
12
|
-
route : str
|
13
|
-
The resolved absolute path to the directory.
|
14
|
-
|
15
|
-
Methods
|
16
|
-
-------
|
17
|
-
__str__():
|
18
|
-
Returns the absolute path as a string.
|
19
|
-
"""
|
20
|
-
|
21
|
-
def __init__(self, route: str):
|
22
|
-
"""
|
23
|
-
Initializes the Path class, resolving the absolute path for a given relative directory.
|
24
|
-
|
25
|
-
The path is resolved relative to the script's execution directory.
|
26
|
-
|
27
|
-
Parameters
|
28
|
-
----------
|
29
|
-
route : str
|
30
|
-
The relative directory path to be resolved.
|
31
|
-
|
32
|
-
Raises
|
33
|
-
------
|
34
|
-
ValueError
|
35
|
-
If the path does not exist or is not a directory.
|
36
|
-
"""
|
37
|
-
# Get the absolute path based on the script's execution directory
|
38
|
-
base_path = SysPath(os.getcwd()) # Get the directory where the script is executed
|
39
|
-
real_path = (base_path / route).resolve() # Combine base path with the relative route
|
40
|
-
|
41
|
-
# Validate that the path exists and is a directory or file
|
42
|
-
if real_path.is_dir() or real_path.is_file():
|
43
|
-
self.route = str(real_path)
|
44
|
-
else:
|
45
|
-
raise ValueError(f"The requested directory does not exist or is not a directory: {real_path}")
|
46
|
-
|
47
|
-
def resolve(self) -> str:
|
48
|
-
"""
|
49
|
-
Returns the absolute path as a string.
|
50
|
-
|
51
|
-
Returns
|
52
|
-
-------
|
53
|
-
str
|
54
|
-
The absolute directory path.
|
55
|
-
"""
|
56
|
-
return self.route
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import sys
|
2
|
-
import subprocess
|
3
|
-
from orionis.luminate.installer.output import Output
|
4
|
-
from orionis.luminate.contracts.installer.upgrade_interface import IUpgrade
|
5
|
-
|
6
|
-
class Upgrade(IUpgrade):
|
7
|
-
"""
|
8
|
-
A class responsible for handling the upgrade process of Orionis.
|
9
|
-
|
10
|
-
Methods
|
11
|
-
-------
|
12
|
-
execute() : None
|
13
|
-
Executes the upgrade process to install the latest version of Orionis.
|
14
|
-
"""
|
15
|
-
|
16
|
-
@staticmethod
|
17
|
-
def execute():
|
18
|
-
"""
|
19
|
-
Handle the --upgrade command to update Orionis to the latest version.
|
20
|
-
|
21
|
-
This method attempts to upgrade Orionis using the pip package manager.
|
22
|
-
It executes a command that installs the latest version of Orionis, ensuring
|
23
|
-
the application is up-to-date.
|
24
|
-
|
25
|
-
Raises
|
26
|
-
------
|
27
|
-
ValueError
|
28
|
-
If the upgrade process fails or encounters any error during execution.
|
29
|
-
|
30
|
-
Notes
|
31
|
-
-----
|
32
|
-
The upgrade process uses `pip` via the command:
|
33
|
-
`python -m pip install --upgrade orionis`.
|
34
|
-
"""
|
35
|
-
output = Output()
|
36
|
-
try:
|
37
|
-
output.info("Starting the upgrade process...")
|
38
|
-
subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "orionis"])
|
39
|
-
except subprocess.CalledProcessError as e:
|
40
|
-
output.error(message=f"Upgrade failed: {e}")
|
41
|
-
except Exception as e:
|
42
|
-
output.error(message=e)
|
orionis/luminate/log/logger.py
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import logging
|
3
|
-
import threading
|
4
|
-
from pathlib import Path
|
5
|
-
from typing import Optional
|
6
|
-
from orionis.luminate.contracts.log.logger_interface import ILogger
|
7
|
-
|
8
|
-
class Logguer(ILogger):
|
9
|
-
"""
|
10
|
-
A thread-safe singleton logger class for logging messages.
|
11
|
-
|
12
|
-
Attributes
|
13
|
-
----------
|
14
|
-
logger : logging.Logger
|
15
|
-
The logger instance used for logging messages.
|
16
|
-
|
17
|
-
Methods
|
18
|
-
-------
|
19
|
-
info(message: str)
|
20
|
-
Logs an informational message.
|
21
|
-
error(message: str)
|
22
|
-
Logs an error message.
|
23
|
-
success(message: str)
|
24
|
-
Logs a success message (treated as info).
|
25
|
-
warning(message: str)
|
26
|
-
Logs a warning message.
|
27
|
-
debug(message: str)
|
28
|
-
Logs a debug message.
|
29
|
-
"""
|
30
|
-
|
31
|
-
# Singleton instance
|
32
|
-
_instance = None
|
33
|
-
|
34
|
-
# Thread-safe instance creation
|
35
|
-
_lock = threading.Lock()
|
36
|
-
|
37
|
-
def __new__(cls, path: Optional[str] = None, level: int = logging.INFO, filename: Optional[str] = 'orionis.log'):
|
38
|
-
"""
|
39
|
-
Creates or returns the singleton instance of the Logguer class.
|
40
|
-
|
41
|
-
Parameters
|
42
|
-
----------
|
43
|
-
path : str, optional
|
44
|
-
The file path where logs will be stored. If None, a default path is used.
|
45
|
-
level : int, optional
|
46
|
-
The logging level (default is logging.INFO).
|
47
|
-
|
48
|
-
Returns
|
49
|
-
-------
|
50
|
-
Logguer
|
51
|
-
The singleton instance of the logger.
|
52
|
-
"""
|
53
|
-
with cls._lock:
|
54
|
-
if cls._instance is None:
|
55
|
-
cls._instance = super(Logguer, cls).__new__(cls)
|
56
|
-
cls._instance._initialize_logger(path, level, filename)
|
57
|
-
return cls._instance
|
58
|
-
|
59
|
-
def _initialize_logger(self, path: Optional[str], level: int, filename: Optional[str] = 'orionis.log'):
|
60
|
-
"""
|
61
|
-
Initializes the logger with the specified log file path and logging level.
|
62
|
-
|
63
|
-
Parameters
|
64
|
-
----------
|
65
|
-
path : str, optional
|
66
|
-
The file path where logs will be stored.
|
67
|
-
level : int
|
68
|
-
The logging level.
|
69
|
-
"""
|
70
|
-
try:
|
71
|
-
|
72
|
-
if path is None:
|
73
|
-
base_path = Path(os.getcwd())
|
74
|
-
log_dir = base_path / "storage" / "logs"
|
75
|
-
|
76
|
-
# Check if the log directory exists
|
77
|
-
if log_dir.exists():
|
78
|
-
path = log_dir / filename
|
79
|
-
else:
|
80
|
-
path = base_path / filename
|
81
|
-
|
82
|
-
logging.basicConfig(
|
83
|
-
level=level,
|
84
|
-
format="%(asctime)s - %(message)s",
|
85
|
-
datefmt="%Y-%m-%d %H:%M:%S",
|
86
|
-
encoding="utf-8",
|
87
|
-
handlers=[
|
88
|
-
logging.FileHandler(path)
|
89
|
-
# logging.StreamHandler()
|
90
|
-
]
|
91
|
-
)
|
92
|
-
|
93
|
-
self.logger = logging.getLogger(__name__)
|
94
|
-
|
95
|
-
except Exception as e:
|
96
|
-
raise RuntimeError(f"Failed to initialize logger: {e}")
|
97
|
-
|
98
|
-
def info(self, message: str) -> None:
|
99
|
-
"""Logs an informational message."""
|
100
|
-
self.logger.info(f"[INFO] - {message}")
|
101
|
-
|
102
|
-
def error(self, message: str) -> None:
|
103
|
-
"""Logs an error message."""
|
104
|
-
self.logger.error(f"[ERROR] - {message}")
|
105
|
-
|
106
|
-
def success(self, message: str) -> None:
|
107
|
-
"""Logs a success message (treated as info)."""
|
108
|
-
self.logger.info(f"[SUCCESS] - {message}")
|
109
|
-
|
110
|
-
def warning(self, message: str) -> None:
|
111
|
-
"""Logs a warning message."""
|
112
|
-
self.logger.warning(f"[WARNING] - {message}")
|
113
|
-
|
114
|
-
def debug(self, message: str) -> None:
|
115
|
-
"""Logs a debug message."""
|
116
|
-
self.logger.debug(f"[DEBUG] - {message}")
|