orionis 0.276.0__py3-none-any.whl → 0.278.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 CHANGED
@@ -1,6 +1,15 @@
1
- from orionis.app import Orionis as Application, Configuration
1
+ from orionis.foundation.config.startup import Configuration
2
2
 
3
- __all__ = [
4
- "Application",
5
- "Configuration"
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
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.276.0"
8
+ VERSION = "0.278.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -0,0 +1,186 @@
1
+ import requests
2
+
3
+ class OrionisFrameworkApi:
4
+ """
5
+ OrionisFrameworkApi provides an interface to fetch and access metadata about the Orionis package from PyPI.
6
+ This class initializes by retrieving package information from the PyPI JSON API for the 'orionis' package.
7
+ It exposes various methods to access metadata such as the package name, version, author, description, license,
8
+ classifiers, required Python version, keywords, and project URLs.
9
+ Attributes:
10
+ _baseUrl (str): The URL to the PyPI JSON API for the Orionis package.
11
+ _info (dict): A dictionary containing the package metadata fetched from PyPI.
12
+ Methods:
13
+ getAllData():
14
+ Fetches and updates the internal information dictionary with the latest data from PyPI.
15
+ getName():
16
+ Returns the CLI name by appending '-cli' to the package name.
17
+ getVersion():
18
+ Returns the version string of the framework.
19
+ getAuthor():
20
+ Returns the author's name.
21
+ getAuthorEmail():
22
+ Returns the author's email address.
23
+ getDescription():
24
+ Returns the summary description of the framework.
25
+ getUrl():
26
+ Returns the homepage URL of the project.
27
+ getLongDescription():
28
+ getDescriptionContentType():
29
+ Returns the content type of the long description.
30
+ getLicense():
31
+ Returns the license type, defaulting to "MIT" if not specified.
32
+ getClassifiers():
33
+ Returns a list of PyPI classifiers for the package.
34
+ getPythonVersion():
35
+ Returns the required Python version specification.
36
+ getKeywords():
37
+ Returns a list of keywords associated with the package.
38
+ """
39
+
40
+ def __init__(self):
41
+ """
42
+ Initializes the class by setting the base URL for the Orionis PyPI package,
43
+ initializing the information dictionary, and retrieving all package data.
44
+ """
45
+ self._baseUrl = "https://pypi.org/pypi/orionis/json"
46
+ self._info = {}
47
+ self.getAllData()
48
+
49
+ def getAllData(self):
50
+ """
51
+ Fetches all data from the base URL and updates the internal info attribute.
52
+
53
+ Sends a GET request to the specified base URL. If the request is successful (status code 200),
54
+ parses the JSON response and updates the `_info` attribute with the value associated with the "info" key.
55
+ Raises an exception if the request fails.
56
+
57
+ Raises:
58
+ Exception: If the request to the base URL fails or returns a non-200 status code.
59
+ """
60
+ try:
61
+ response = requests.get(self._baseUrl, timeout=10)
62
+ response.raise_for_status()
63
+ data = response.json()
64
+ self._info = data.get("info", {})
65
+ if not self._info:
66
+ raise ValueError("No 'info' key found in PyPI response.")
67
+ return self._info
68
+ except requests.RequestException as e:
69
+ raise Exception(
70
+ f"Error fetching data from PyPI: {e}. "
71
+ "Please check your internet connection or try again later."
72
+ )
73
+ except ValueError as ve:
74
+ raise Exception(
75
+ f"Invalid response structure from PyPI: {ve}"
76
+ )
77
+
78
+ def getName(self):
79
+ """
80
+ Returns the CLI name by appending '-cli' to the value of the 'name' key in the _info dictionary.
81
+
82
+ Returns:
83
+ str: The CLI name in the format '<name>-cli'.
84
+ """
85
+ return f"{self._info['name']}-cli"
86
+
87
+ def getVersion(self):
88
+ """
89
+ Returns the version information of the framework.
90
+
91
+ Returns:
92
+ str: The version string from the framework's information dictionary.
93
+ """
94
+ return self._info['version']
95
+
96
+ def getAuthor(self):
97
+ """
98
+ Returns the author of the framework.
99
+
100
+ Returns:
101
+ str: The author's name as specified in the framework information.
102
+ """
103
+ return self._info['author']
104
+
105
+ def getAuthorEmail(self):
106
+ """
107
+ Retrieve the author's email address from the internal information dictionary.
108
+
109
+ Returns:
110
+ str: The email address of the author.
111
+ """
112
+ return self._info['author_email']
113
+
114
+ def getDescription(self):
115
+ """
116
+ Returns the summary description from the internal information dictionary.
117
+
118
+ Returns:
119
+ str: The summary description stored in the '_info' dictionary under the 'summary' key.
120
+ """
121
+ return self._info['summary']
122
+
123
+ def getUrl(self):
124
+ """
125
+ Retrieves the homepage URL from the project's information.
126
+
127
+ Returns:
128
+ str: The homepage URL specified in the project's 'project_urls' under 'Homepage'.
129
+ """
130
+ return self._info['project_urls']['Homepage']
131
+
132
+ def getLongDescription(self):
133
+ """
134
+ Returns the long description of the framework.
135
+
136
+ Returns:
137
+ str: The description text from the framework's information dictionary.
138
+ """
139
+ return self._info['description']
140
+
141
+ def getDescriptionContentType(self):
142
+ """
143
+ Returns the content type of the description from the internal information dictionary.
144
+
145
+ Returns:
146
+ str: The content type of the description (e.g., 'text/markdown', 'text/plain').
147
+ """
148
+ return self._info['description_content_type']
149
+
150
+ def getLicense(self):
151
+ """
152
+ Returns the license type specified in the framework information.
153
+
154
+ If the license information is not set, defaults to "MIT".
155
+
156
+ Returns:
157
+ str: The license type.
158
+ """
159
+ return self._info['license'] or "MIT"
160
+
161
+ def getClassifiers(self):
162
+ """
163
+ Returns the list of classifiers from the internal _info dictionary.
164
+
165
+ Returns:
166
+ list: A list of classifier strings.
167
+ """
168
+ return self._info['classifiers']
169
+
170
+ def getPythonVersion(self):
171
+ """
172
+ Retrieves the required Python version for the framework.
173
+
174
+ Returns:
175
+ str: The Python version specification required by the framework, as defined in the '_info' dictionary.
176
+ """
177
+ return self._info['requires_python']
178
+
179
+ def getKeywords(self):
180
+ """
181
+ Retrieve the list of keywords associated with the current object.
182
+
183
+ Returns:
184
+ list: A list of keywords from the object's information dictionary.
185
+ """
186
+ return self._info['keywords']
@@ -268,7 +268,6 @@ class UnitTest(IUnitTest):
268
268
  else:
269
269
  result = self._runTestsSequentially(output_buffer, error_buffer)
270
270
 
271
-
272
271
  # Process results
273
272
  execution_time = time.time() - self.start_time
274
273
  summary = self._generateSummary(result, execution_time)
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.276.0
3
+ Version: 0.278.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
@@ -105,3 +105,19 @@ Want to be part of Orionis' evolution? Your contribution is welcome!
105
105
  ## 🌠 Join the Python Revolution
106
106
 
107
107
  Orionis is more than a framework—it's a new way to build. If you're ready to go beyond the traditional and embrace a modern ecosystem, **look to the sky... and start with Orionis.**
108
+
109
+ ---
110
+
111
+ ## 📬 Contact & Connect
112
+
113
+ Have questions, ideas, or want to get involved? Reach out and join the Orionis community!
114
+
115
+ - 📧 **Email:** [raulmauriciounate@gmail.com](mailto:raulmauriciounate@gmail.com)
116
+ - 💬 **GitHub Discussions:** [Orionis Framework Discussions](https://github.com/orgs/orionis-framework/discussions)
117
+ - 💼 **LinkedIn:** [Raul Mauricio Unate Castro](https://www.linkedin.com/in/raul-mauricio-unate-castro/)
118
+
119
+ I'm passionate about open-source and empowering developers worldwide. Explore the repositories, open issues, suggest features, or contribute code—your collaboration makes Orionis better!
120
+
121
+ [![Become a Sponsor](https://img.shields.io/badge/-Become%20a%20Sponsor-blue?style=for-the-badge&logo=github)](https://github.com/sponsors/rmunate)
122
+
123
+ Let's build the future of Python development together! 🚀
@@ -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/app.py,sha256=vz4MBGn7XoUBxTgkT4XKT2jUraFmD19kYRNEFxqTIwY,684
4
- orionis/application.py,sha256=4YD2wqb-Rh3UhIL0if4XH-wG47mIqs_xa-7zc0W_qPc,120
5
- orionis/framework.py,sha256=S2FVb0FZh_yLM76Vj99YaUCwL6m2LHLNjJ-5-3y3mAk,4960
6
- orionis/unittesting.py,sha256=nscQTTlqckX899IMAKdq11BxoR4fj7HX8_T4PT4shzc,1210
3
+ orionis/application.py,sha256=KrIj21LSoQCrpkkc8O_UeHrEMEJvSGVJuMGx-srrOXE,413
4
+ orionis/framework.py,sha256=V1oWol7QfqGLdAPOGOCLwLDiW1fkXTm660qqEH4_Rgk,4960
5
+ orionis/framework_api.py,sha256=MjbJ8AsLD5ODz0QGYe_sDxTHCaX4q6qIDhdGJFRUkLI,6698
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=q3j-U787vkt7za_DKai8RqqXAGIHHlAUa70Glk-wEDE,41673
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.276.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
324
+ orionis-0.278.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.276.0.dist-info/METADATA,sha256=IQGnsyBxYG85-YVrEzZ5K8WI_qGOEDTctDBnRWwjm5A,3923
423
- orionis-0.276.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
424
- orionis-0.276.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
425
- orionis-0.276.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
426
- orionis-0.276.0.dist-info/RECORD,,
422
+ orionis-0.278.0.dist-info/METADATA,sha256=BWJWp_ZuvHc4Nmi6pZsQl1Xd0RK1z0iE0Jyx0E4ZCiw,4772
423
+ orionis-0.278.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
424
+ orionis-0.278.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
425
+ orionis-0.278.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
426
+ orionis-0.278.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()