orionis 0.1.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.
Files changed (133) hide show
  1. orionis/__init__.py +0 -0
  2. orionis/cli_manager.py +48 -0
  3. orionis/framework.py +45 -0
  4. orionis/luminate/__init__.py +0 -0
  5. orionis/luminate/app.py +0 -0
  6. orionis/luminate/bootstrap/__init__.py +0 -0
  7. orionis/luminate/bootstrap/parser.py +49 -0
  8. orionis/luminate/bootstrap/register.py +95 -0
  9. orionis/luminate/cache/__init__.py +0 -0
  10. orionis/luminate/cache/app/__init__.py +0 -0
  11. orionis/luminate/cache/app/config.py +96 -0
  12. orionis/luminate/cache/console/__init__.py +0 -0
  13. orionis/luminate/cache/console/commands.py +98 -0
  14. orionis/luminate/config/__init__.py +0 -0
  15. orionis/luminate/config/dataclass/__init__.py +0 -0
  16. orionis/luminate/config/dataclass/app.py +50 -0
  17. orionis/luminate/config/dataclass/auth.py +17 -0
  18. orionis/luminate/config/dataclass/cache.py +51 -0
  19. orionis/luminate/config/dataclass/cors.py +58 -0
  20. orionis/luminate/config/dataclass/database.py +203 -0
  21. orionis/luminate/config/dataclass/filesystems.py +102 -0
  22. orionis/luminate/config/dataclass/logging.py +107 -0
  23. orionis/luminate/config/dataclass/mail.py +81 -0
  24. orionis/luminate/config/dataclass/queue.py +63 -0
  25. orionis/luminate/config/dataclass/session.py +59 -0
  26. orionis/luminate/config/environment.py +110 -0
  27. orionis/luminate/config/sections.py +37 -0
  28. orionis/luminate/console/__init__.py +0 -0
  29. orionis/luminate/console/base/__init__.py +0 -0
  30. orionis/luminate/console/base/command.py +427 -0
  31. orionis/luminate/console/cache.py +132 -0
  32. orionis/luminate/console/command.py +40 -0
  33. orionis/luminate/console/command_filter.py +40 -0
  34. orionis/luminate/console/commands/__init__.py +0 -0
  35. orionis/luminate/console/commands/cache_clear.py +56 -0
  36. orionis/luminate/console/commands/help.py +59 -0
  37. orionis/luminate/console/commands/schedule_work.py +50 -0
  38. orionis/luminate/console/commands/tests.py +40 -0
  39. orionis/luminate/console/commands/version.py +39 -0
  40. orionis/luminate/console/exceptions/__init__.py +0 -0
  41. orionis/luminate/console/exceptions/cli_exception.py +125 -0
  42. orionis/luminate/console/kernel.py +32 -0
  43. orionis/luminate/console/output/__init__.py +0 -0
  44. orionis/luminate/console/output/console.py +426 -0
  45. orionis/luminate/console/output/executor.py +90 -0
  46. orionis/luminate/console/output/progress_bar.py +100 -0
  47. orionis/luminate/console/output/styles.py +95 -0
  48. orionis/luminate/console/parser.py +159 -0
  49. orionis/luminate/console/register.py +98 -0
  50. orionis/luminate/console/runner.py +126 -0
  51. orionis/luminate/console/scripts/__init__.py +0 -0
  52. orionis/luminate/console/scripts/management.py +94 -0
  53. orionis/luminate/console/tasks/__init__.py +0 -0
  54. orionis/luminate/console/tasks/scheduler.py +616 -0
  55. orionis/luminate/contracts/__init__.py +0 -0
  56. orionis/luminate/contracts/bootstrap/parser_interface.py +46 -0
  57. orionis/luminate/contracts/cache/__init__.py +0 -0
  58. orionis/luminate/contracts/cache/cache_commands_interface.py +69 -0
  59. orionis/luminate/contracts/config/__init__.py +0 -0
  60. orionis/luminate/contracts/config/config_interface.py +27 -0
  61. orionis/luminate/contracts/config/environment_interface.py +64 -0
  62. orionis/luminate/contracts/console/__init__.py +0 -0
  63. orionis/luminate/contracts/console/base_command_interface.py +448 -0
  64. orionis/luminate/contracts/console/cli_cache_interface.py +34 -0
  65. orionis/luminate/contracts/console/command_filter_interface.py +32 -0
  66. orionis/luminate/contracts/console/command_interface.py +36 -0
  67. orionis/luminate/contracts/console/console_interface.py +305 -0
  68. orionis/luminate/contracts/console/executor_interface.py +51 -0
  69. orionis/luminate/contracts/console/kernel_interface.py +32 -0
  70. orionis/luminate/contracts/console/management_interface.py +63 -0
  71. orionis/luminate/contracts/console/parser_interface.py +76 -0
  72. orionis/luminate/contracts/console/progress_bar_interface.py +66 -0
  73. orionis/luminate/contracts/console/register_interface.py +32 -0
  74. orionis/luminate/contracts/console/runner_interface.py +50 -0
  75. orionis/luminate/contracts/console/schedule_interface.py +317 -0
  76. orionis/luminate/contracts/console/task_manager_interface.py +37 -0
  77. orionis/luminate/contracts/facades/__init__.py +0 -0
  78. orionis/luminate/contracts/facades/env_interface.py +64 -0
  79. orionis/luminate/contracts/facades/log_interface.py +48 -0
  80. orionis/luminate/contracts/facades/paths_interface.py +141 -0
  81. orionis/luminate/contracts/facades/tests_interface.py +33 -0
  82. orionis/luminate/contracts/files/__init__.py +0 -0
  83. orionis/luminate/contracts/files/paths_interface.py +29 -0
  84. orionis/luminate/contracts/installer/__init__.py +0 -0
  85. orionis/luminate/contracts/installer/output_interface.py +125 -0
  86. orionis/luminate/contracts/installer/setup_interface.py +29 -0
  87. orionis/luminate/contracts/installer/upgrade_interface.py +24 -0
  88. orionis/luminate/contracts/log/__init__.py +0 -0
  89. orionis/luminate/contracts/log/logger_interface.py +33 -0
  90. orionis/luminate/contracts/pipelines/cli_pipeline_interface.py +84 -0
  91. orionis/luminate/contracts/publisher/__init__.py +0 -0
  92. orionis/luminate/contracts/publisher/pypi_publisher_interface.py +36 -0
  93. orionis/luminate/contracts/test/__init__.py +0 -0
  94. orionis/luminate/contracts/test/unit_test_interface.py +51 -0
  95. orionis/luminate/contracts/tools/__init__.py +0 -0
  96. orionis/luminate/contracts/tools/reflection_interface.py +343 -0
  97. orionis/luminate/contracts/tools/std_interface.py +56 -0
  98. orionis/luminate/facades/__init__.py +0 -0
  99. orionis/luminate/facades/environment.py +81 -0
  100. orionis/luminate/facades/log.py +56 -0
  101. orionis/luminate/facades/paths.py +268 -0
  102. orionis/luminate/facades/tests.py +48 -0
  103. orionis/luminate/files/__init__.py +0 -0
  104. orionis/luminate/files/paths.py +56 -0
  105. orionis/luminate/installer/__init__.py +0 -0
  106. orionis/luminate/installer/icon.ascii +11 -0
  107. orionis/luminate/installer/info.ascii +13 -0
  108. orionis/luminate/installer/output.py +188 -0
  109. orionis/luminate/installer/setup.py +191 -0
  110. orionis/luminate/installer/upgrade.py +42 -0
  111. orionis/luminate/log/__init__.py +0 -0
  112. orionis/luminate/log/logger.py +116 -0
  113. orionis/luminate/pipelines/__init__.py +0 -0
  114. orionis/luminate/pipelines/cli_pipeline.py +116 -0
  115. orionis/luminate/publisher/__init__.py +0 -0
  116. orionis/luminate/publisher/pypi.py +206 -0
  117. orionis/luminate/static/logos/flaskavel.png +0 -0
  118. orionis/luminate/test/__init__.py +0 -0
  119. orionis/luminate/test/exception.py +48 -0
  120. orionis/luminate/test/unit_test.py +108 -0
  121. orionis/luminate/tools/__init__.py +0 -0
  122. orionis/luminate/tools/reflection.py +390 -0
  123. orionis/luminate/tools/std.py +53 -0
  124. orionis-0.1.0.dist-info/LICENCE +21 -0
  125. orionis-0.1.0.dist-info/METADATA +27 -0
  126. orionis-0.1.0.dist-info/RECORD +133 -0
  127. orionis-0.1.0.dist-info/WHEEL +5 -0
  128. orionis-0.1.0.dist-info/entry_points.txt +2 -0
  129. orionis-0.1.0.dist-info/top_level.txt +2 -0
  130. tests/__init__.py +0 -0
  131. tests/tools/__init__.py +0 -0
  132. tests/tools/class_example.py +50 -0
  133. tests/tools/test_reflection.py +128 -0
@@ -0,0 +1,29 @@
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
File without changes
@@ -0,0 +1,125 @@
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
@@ -0,0 +1,29 @@
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
@@ -0,0 +1,24 @@
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
File without changes
@@ -0,0 +1,33 @@
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
@@ -0,0 +1,84 @@
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
File without changes
@@ -0,0 +1,36 @@
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
File without changes
@@ -0,0 +1,51 @@
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
File without changes