orionis 0.277.0__py3-none-any.whl → 0.279.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/application.py +14 -5
- orionis/framework.py +1 -1
- orionis/framework_api.py +187 -0
- orionis/test/suites/test_unit.py +0 -1
- orionis/unittesting.py +9 -0
- {orionis-0.277.0.dist-info → orionis-0.279.0.dist-info}/METADATA +1 -1
- {orionis-0.277.0.dist-info → orionis-0.279.0.dist-info}/RECORD +11 -11
- orionis/app.py +0 -19
- {orionis-0.277.0.dist-info → orionis-0.279.0.dist-info}/WHEEL +0 -0
- {orionis-0.277.0.dist-info → orionis-0.279.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.277.0.dist-info → orionis-0.279.0.dist-info}/top_level.txt +0 -0
- {orionis-0.277.0.dist-info → orionis-0.279.0.dist-info}/zip-safe +0 -0
orionis/application.py
CHANGED
@@ -1,6 +1,15 @@
|
|
1
|
-
from orionis.
|
1
|
+
from orionis.foundation.config.startup import Configuration
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
class Orionis:
|
4
|
+
|
5
|
+
def __init__(
|
6
|
+
self,
|
7
|
+
config: Configuration = None
|
8
|
+
):
|
9
|
+
"""
|
10
|
+
Initializes the Orionis instance with optional configuration objects.
|
11
|
+
|
12
|
+
Args:
|
13
|
+
config (Configuration, optional): Custom application configuration.
|
14
|
+
"""
|
15
|
+
self.__config = config or Configuration()
|
orionis/framework.py
CHANGED
orionis/framework_api.py
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
import requests
|
2
|
+
from orionis.framework import API
|
3
|
+
|
4
|
+
class OrionisFrameworkApi:
|
5
|
+
"""
|
6
|
+
OrionisFrameworkApi provides an interface to fetch and access metadata about the Orionis package from PyPI.
|
7
|
+
This class initializes by retrieving package information from the PyPI JSON API for the 'orionis' package.
|
8
|
+
It exposes various methods to access metadata such as the package name, version, author, description, license,
|
9
|
+
classifiers, required Python version, keywords, and project URLs.
|
10
|
+
Attributes:
|
11
|
+
_baseUrl (str): The URL to the PyPI JSON API for the Orionis package.
|
12
|
+
_info (dict): A dictionary containing the package metadata fetched from PyPI.
|
13
|
+
Methods:
|
14
|
+
getAllData():
|
15
|
+
Fetches and updates the internal information dictionary with the latest data from PyPI.
|
16
|
+
getName():
|
17
|
+
Returns the CLI name by appending '-cli' to the package name.
|
18
|
+
getVersion():
|
19
|
+
Returns the version string of the framework.
|
20
|
+
getAuthor():
|
21
|
+
Returns the author's name.
|
22
|
+
getAuthorEmail():
|
23
|
+
Returns the author's email address.
|
24
|
+
getDescription():
|
25
|
+
Returns the summary description of the framework.
|
26
|
+
getUrl():
|
27
|
+
Returns the homepage URL of the project.
|
28
|
+
getLongDescription():
|
29
|
+
getDescriptionContentType():
|
30
|
+
Returns the content type of the long description.
|
31
|
+
getLicense():
|
32
|
+
Returns the license type, defaulting to "MIT" if not specified.
|
33
|
+
getClassifiers():
|
34
|
+
Returns a list of PyPI classifiers for the package.
|
35
|
+
getPythonVersion():
|
36
|
+
Returns the required Python version specification.
|
37
|
+
getKeywords():
|
38
|
+
Returns a list of keywords associated with the package.
|
39
|
+
"""
|
40
|
+
|
41
|
+
def __init__(self):
|
42
|
+
"""
|
43
|
+
Initializes the class by setting the base URL for the Orionis PyPI package,
|
44
|
+
initializing the information dictionary, and retrieving all package data.
|
45
|
+
"""
|
46
|
+
self._baseUrl = API
|
47
|
+
self._info = {}
|
48
|
+
self.getAllData()
|
49
|
+
|
50
|
+
def getAllData(self):
|
51
|
+
"""
|
52
|
+
Fetches all data from the base URL and updates the internal info attribute.
|
53
|
+
|
54
|
+
Sends a GET request to the specified base URL. If the request is successful (status code 200),
|
55
|
+
parses the JSON response and updates the `_info` attribute with the value associated with the "info" key.
|
56
|
+
Raises an exception if the request fails.
|
57
|
+
|
58
|
+
Raises:
|
59
|
+
Exception: If the request to the base URL fails or returns a non-200 status code.
|
60
|
+
"""
|
61
|
+
try:
|
62
|
+
response = requests.get(self._baseUrl, timeout=10)
|
63
|
+
response.raise_for_status()
|
64
|
+
data:dict = response.json()
|
65
|
+
self._info = data.get("info", {})
|
66
|
+
if not self._info:
|
67
|
+
raise ValueError("No 'info' key found in PyPI response.")
|
68
|
+
return self._info
|
69
|
+
except requests.RequestException as e:
|
70
|
+
raise Exception(
|
71
|
+
f"Error fetching data from PyPI: {e}. "
|
72
|
+
"Please check your internet connection or try again later."
|
73
|
+
)
|
74
|
+
except ValueError as ve:
|
75
|
+
raise Exception(
|
76
|
+
f"Invalid response structure from PyPI: {ve}"
|
77
|
+
)
|
78
|
+
|
79
|
+
def getName(self):
|
80
|
+
"""
|
81
|
+
Returns the CLI name by appending '-cli' to the value of the 'name' key in the _info dictionary.
|
82
|
+
|
83
|
+
Returns:
|
84
|
+
str: The CLI name in the format '<name>-cli'.
|
85
|
+
"""
|
86
|
+
return f"{self._info['name']}-cli"
|
87
|
+
|
88
|
+
def getVersion(self):
|
89
|
+
"""
|
90
|
+
Returns the version information of the framework.
|
91
|
+
|
92
|
+
Returns:
|
93
|
+
str: The version string from the framework's information dictionary.
|
94
|
+
"""
|
95
|
+
return self._info['version']
|
96
|
+
|
97
|
+
def getAuthor(self):
|
98
|
+
"""
|
99
|
+
Returns the author of the framework.
|
100
|
+
|
101
|
+
Returns:
|
102
|
+
str: The author's name as specified in the framework information.
|
103
|
+
"""
|
104
|
+
return self._info['author']
|
105
|
+
|
106
|
+
def getAuthorEmail(self):
|
107
|
+
"""
|
108
|
+
Retrieve the author's email address from the internal information dictionary.
|
109
|
+
|
110
|
+
Returns:
|
111
|
+
str: The email address of the author.
|
112
|
+
"""
|
113
|
+
return self._info['author_email']
|
114
|
+
|
115
|
+
def getDescription(self):
|
116
|
+
"""
|
117
|
+
Returns the summary description from the internal information dictionary.
|
118
|
+
|
119
|
+
Returns:
|
120
|
+
str: The summary description stored in the '_info' dictionary under the 'summary' key.
|
121
|
+
"""
|
122
|
+
return self._info['summary']
|
123
|
+
|
124
|
+
def getUrl(self):
|
125
|
+
"""
|
126
|
+
Retrieves the homepage URL from the project's information.
|
127
|
+
|
128
|
+
Returns:
|
129
|
+
str: The homepage URL specified in the project's 'project_urls' under 'Homepage'.
|
130
|
+
"""
|
131
|
+
return self._info['project_urls']['Homepage']
|
132
|
+
|
133
|
+
def getLongDescription(self):
|
134
|
+
"""
|
135
|
+
Returns the long description of the framework.
|
136
|
+
|
137
|
+
Returns:
|
138
|
+
str: The description text from the framework's information dictionary.
|
139
|
+
"""
|
140
|
+
return self._info['description']
|
141
|
+
|
142
|
+
def getDescriptionContentType(self):
|
143
|
+
"""
|
144
|
+
Returns the content type of the description from the internal information dictionary.
|
145
|
+
|
146
|
+
Returns:
|
147
|
+
str: The content type of the description (e.g., 'text/markdown', 'text/plain').
|
148
|
+
"""
|
149
|
+
return self._info['description_content_type']
|
150
|
+
|
151
|
+
def getLicense(self):
|
152
|
+
"""
|
153
|
+
Returns the license type specified in the framework information.
|
154
|
+
|
155
|
+
If the license information is not set, defaults to "MIT".
|
156
|
+
|
157
|
+
Returns:
|
158
|
+
str: The license type.
|
159
|
+
"""
|
160
|
+
return self._info['license'] or "MIT"
|
161
|
+
|
162
|
+
def getClassifiers(self):
|
163
|
+
"""
|
164
|
+
Returns the list of classifiers from the internal _info dictionary.
|
165
|
+
|
166
|
+
Returns:
|
167
|
+
list: A list of classifier strings.
|
168
|
+
"""
|
169
|
+
return self._info['classifiers']
|
170
|
+
|
171
|
+
def getPythonVersion(self):
|
172
|
+
"""
|
173
|
+
Retrieves the required Python version for the framework.
|
174
|
+
|
175
|
+
Returns:
|
176
|
+
str: The Python version specification required by the framework, as defined in the '_info' dictionary.
|
177
|
+
"""
|
178
|
+
return self._info['requires_python']
|
179
|
+
|
180
|
+
def getKeywords(self):
|
181
|
+
"""
|
182
|
+
Retrieve the list of keywords associated with the current object.
|
183
|
+
|
184
|
+
Returns:
|
185
|
+
list: A list of keywords from the object's information dictionary.
|
186
|
+
"""
|
187
|
+
return self._info['keywords']
|
orionis/test/suites/test_unit.py
CHANGED
orionis/unittesting.py
CHANGED
@@ -1,28 +1,37 @@
|
|
1
|
+
# Import custom test case classes from the orionis.test.cases module
|
1
2
|
from orionis.test.cases.test_case import TestCase
|
2
3
|
from orionis.test.cases.test_sync import SyncTestCase
|
3
4
|
from orionis.test.cases.test_async import AsyncTestCase
|
4
5
|
|
6
|
+
# Import the custom TestResult entity
|
5
7
|
from orionis.test.entities.test_result import TestResult
|
6
8
|
|
9
|
+
# Import enums for execution mode and test status
|
7
10
|
from orionis.test.enums.test_mode import ExecutionMode
|
8
11
|
from orionis.test.enums.test_status import TestStatus
|
9
12
|
|
13
|
+
# Import custom exception for test failures
|
10
14
|
from orionis.test.exceptions.test_failure_exception import OrionisTestFailureException
|
11
15
|
|
16
|
+
# Import configuration and suite classes for organizing tests
|
12
17
|
from orionis.test.suites.test_suite import Configuration, TestSuite
|
13
18
|
from orionis.test.suites.test_unit import UnitTest
|
14
19
|
|
20
|
+
# Import standard unittest components for compatibility
|
15
21
|
from unittest import (
|
16
22
|
TestLoader as UnittestTestLoader,
|
17
23
|
TestSuite as UnittestTestSuite,
|
18
24
|
TestResult as UnittestTestResult,
|
19
25
|
)
|
26
|
+
|
27
|
+
# Import mock classes for creating test doubles
|
20
28
|
from unittest.mock import (
|
21
29
|
Mock as UnittestMock,
|
22
30
|
MagicMock as UnittestMagicMock,
|
23
31
|
patch as unittest_mock_patch,
|
24
32
|
)
|
25
33
|
|
34
|
+
# Define the public API of this module
|
26
35
|
__all__ = [
|
27
36
|
"TestCase",
|
28
37
|
"SyncTestCase",
|
@@ -1,9 +1,9 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/_application.py,sha256=dMjJ0nFcIIOBGb5zr-tHNzcgTOZ1vJ7iMdFAlqSQph0,9405
|
3
|
-
orionis/
|
4
|
-
orionis/
|
5
|
-
orionis/
|
6
|
-
orionis/unittesting.py,sha256=
|
3
|
+
orionis/application.py,sha256=KrIj21LSoQCrpkkc8O_UeHrEMEJvSGVJuMGx-srrOXE,413
|
4
|
+
orionis/framework.py,sha256=uetO5CMPalBt4DJqUCYeWB7NMDXFuggQZXGQXFbUj1k,4960
|
5
|
+
orionis/framework_api.py,sha256=sbTUPVKHUYnlDYWyad6ncB5iU2t7slA2gSJoKaiBse8,6705
|
6
|
+
orionis/unittesting.py,sha256=VzNyVcLWTFP5dAWLQ_A1Zfzwv_Oeb9LbvNYNSbTEFbs,1626
|
7
7
|
orionis/_container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
orionis/_container/container.py,sha256=0AOqTNwpN_OtWbq9mBI99qfJ7LMkN71y0lP0JWKzut0,18289
|
9
9
|
orionis/_container/container_integrity.py,sha256=vrqZrkJaP6ghbiAzr-nEul9f_lEWVa2nMUSugQXDfWk,10095
|
@@ -317,11 +317,11 @@ orionis/test/output/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
317
317
|
orionis/test/output/contracts/dumper.py,sha256=ZpzlSJixGNbjFUVl53mCg_5djC-xwiit4ozQlzUps4g,1161
|
318
318
|
orionis/test/suites/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
319
319
|
orionis/test/suites/test_suite.py,sha256=H7prpaZJUMcMUBWvBatejxAJh3lToNHYwYSAHISlTuc,4827
|
320
|
-
orionis/test/suites/test_unit.py,sha256=
|
320
|
+
orionis/test/suites/test_unit.py,sha256=u2sWLLyh0I41kanRjkNOt9p-do_Qh5IW5bHSx9N-x2g,41671
|
321
321
|
orionis/test/suites/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
322
322
|
orionis/test/suites/contracts/test_suite.py,sha256=arJSxWGjOHTVGiJrmqdqDrb9Ymt3SitDPZKVMBsWCf8,888
|
323
323
|
orionis/test/suites/contracts/test_unit.py,sha256=5gaGXqCx07aDlAQJi8J-GF83kVj3uIx_fdPF1HYMKcg,5596
|
324
|
-
orionis-0.
|
324
|
+
orionis-0.279.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
325
325
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
326
326
|
tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
327
327
|
tests/example/test_example.py,sha256=DUZU6lWVFsyHtBEXx0cBxMrSCpOtAOL3PUoi9-tXAas,583
|
@@ -419,8 +419,8 @@ tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py,sha256=
|
|
419
419
|
tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
420
420
|
tests/testing/test_testing_result.py,sha256=54QDn6_v9feIcDcA6LPXcvYhlt_X8JqLGTYWS9XjKXM,3029
|
421
421
|
tests/testing/test_testing_unit.py,sha256=MeVL4gc4cGRPXdVOOKJx6JPKducrZ8cN7F52Iiciixg,5443
|
422
|
-
orionis-0.
|
423
|
-
orionis-0.
|
424
|
-
orionis-0.
|
425
|
-
orionis-0.
|
426
|
-
orionis-0.
|
422
|
+
orionis-0.279.0.dist-info/METADATA,sha256=PaUj6JJLKN53oxPz9npQkfdw8MCYwdM0IiESE03goyk,4772
|
423
|
+
orionis-0.279.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
424
|
+
orionis-0.279.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
425
|
+
orionis-0.279.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
426
|
+
orionis-0.279.0.dist-info/RECORD,,
|
orionis/app.py
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
from orionis.foundation.config.startup import Configuration
|
2
|
-
from orionis.foundation.skeletom.startup import SkeletomConfiguration
|
3
|
-
|
4
|
-
class Orionis:
|
5
|
-
|
6
|
-
def __init__(
|
7
|
-
self,
|
8
|
-
skeletom: SkeletomConfiguration = None,
|
9
|
-
config: Configuration = None
|
10
|
-
):
|
11
|
-
"""
|
12
|
-
Initializes the Orionis instance with optional configuration objects.
|
13
|
-
|
14
|
-
Args:
|
15
|
-
skeletom (SkeletomConfiguration, optional): Custom Skeletom configuration.
|
16
|
-
config (Configuration, optional): Custom application configuration.
|
17
|
-
"""
|
18
|
-
self.__skeletom = skeletom or SkeletomConfiguration()
|
19
|
-
self.__config = config or Configuration()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|