orionis 0.628.0__py3-none-any.whl → 0.632.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/foundation/application.py +7 -0
- orionis/metadata/framework.py +1 -1
- orionis/services/environment/env.py +40 -1
- orionis/test/records/logs.py +1 -2
- {orionis-0.628.0.dist-info → orionis-0.632.0.dist-info}/METADATA +1 -1
- {orionis-0.628.0.dist-info → orionis-0.632.0.dist-info}/RECORD +9 -9
- {orionis-0.628.0.dist-info → orionis-0.632.0.dist-info}/WHEEL +0 -0
- {orionis-0.628.0.dist-info → orionis-0.632.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.628.0.dist-info → orionis-0.632.0.dist-info}/top_level.txt +0 -0
|
@@ -23,6 +23,7 @@ from orionis.foundation.config.startup import Configuration
|
|
|
23
23
|
from orionis.foundation.config.testing.entities.testing import Testing
|
|
24
24
|
from orionis.foundation.contracts.application import IApplication
|
|
25
25
|
from orionis.foundation.exceptions import OrionisTypeError, OrionisRuntimeError, OrionisValueError
|
|
26
|
+
from orionis.services.environment.env import Env
|
|
26
27
|
from orionis.services.log.contracts.log_service import ILogger
|
|
27
28
|
from orionis.support.wrapper.dataclass import DataClass
|
|
28
29
|
|
|
@@ -112,6 +113,12 @@ class Application(Container, IApplication):
|
|
|
112
113
|
boot status to False until explicitly booted via the create() method.
|
|
113
114
|
"""
|
|
114
115
|
|
|
116
|
+
# Check if the virtual environment is activated.
|
|
117
|
+
if not Env.isVirtual():
|
|
118
|
+
raise RuntimeError(
|
|
119
|
+
"You must activate the virtual environment to use the Orionis Framework correctly."
|
|
120
|
+
)
|
|
121
|
+
|
|
115
122
|
# Initialize base container with application paths
|
|
116
123
|
super().__init__()
|
|
117
124
|
|
orionis/metadata/framework.py
CHANGED
|
@@ -91,4 +91,43 @@ class Env(IEnv):
|
|
|
91
91
|
dotenv = DotEnv()
|
|
92
92
|
|
|
93
93
|
# Return all environment variables as a dictionary
|
|
94
|
-
return dotenv.all()
|
|
94
|
+
return dotenv.all()
|
|
95
|
+
|
|
96
|
+
@staticmethod
|
|
97
|
+
def isVirtual() -> bool:
|
|
98
|
+
"""
|
|
99
|
+
Determine if the current Python interpreter is running inside a virtual environment.
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
-------
|
|
103
|
+
bool
|
|
104
|
+
True if running inside a virtual environment, False otherwise.
|
|
105
|
+
|
|
106
|
+
Notes
|
|
107
|
+
-----
|
|
108
|
+
This method checks for the presence of common virtual environment indicators:
|
|
109
|
+
- The 'VIRTUAL_ENV' environment variable.
|
|
110
|
+
- The presence of 'pyvenv.cfg' in the parent directories of the Python executable.
|
|
111
|
+
- Differences between sys.prefix and sys.base_prefix (for venv and virtualenv).
|
|
112
|
+
|
|
113
|
+
This approach works for most virtual environment tools, including venv and virtualenv.
|
|
114
|
+
"""
|
|
115
|
+
import sys
|
|
116
|
+
import os
|
|
117
|
+
from pathlib import Path
|
|
118
|
+
|
|
119
|
+
# Check for 'VIRTUAL_ENV' environment variable (set by virtualenv)
|
|
120
|
+
if 'VIRTUAL_ENV' in os.environ:
|
|
121
|
+
return True
|
|
122
|
+
|
|
123
|
+
# Check for 'pyvenv.cfg' in the executable's parent directories (set by venv)
|
|
124
|
+
executable = Path(sys.executable).resolve()
|
|
125
|
+
for parent in executable.parents:
|
|
126
|
+
if (parent / 'pyvenv.cfg').exists():
|
|
127
|
+
return True
|
|
128
|
+
|
|
129
|
+
# Compare sys.prefix and sys.base_prefix (works for venv and virtualenv)
|
|
130
|
+
if hasattr(sys, 'base_prefix') and sys.prefix != sys.base_prefix:
|
|
131
|
+
return True
|
|
132
|
+
|
|
133
|
+
return False
|
orionis/test/records/logs.py
CHANGED
|
@@ -103,7 +103,7 @@ orionis/failure/contracts/handler.py,sha256=AeJfkJfD3hTkOIYAtADq6GnQfq-qWgDfUc7b
|
|
|
103
103
|
orionis/failure/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
104
104
|
orionis/failure/entities/throwable.py,sha256=1zD-awcuAyEtlR-L7V7ZIfPSF4GpXkf-neL5sXul7dc,1240
|
|
105
105
|
orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
106
|
-
orionis/foundation/application.py,sha256=
|
|
106
|
+
orionis/foundation/application.py,sha256=oKhREI_LCOMBLdcPpfyBoAmYUolgO3aTVJ7umZ8xH4g,90693
|
|
107
107
|
orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
108
|
orionis/foundation/config/startup.py,sha256=btqvryeIf9lLNQ9fBff7bJMrfraEY8qrWi4y_5YAR0Q,9681
|
|
109
109
|
orionis/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -216,7 +216,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
|
|
|
216
216
|
orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
|
|
217
217
|
orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
|
|
218
218
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
219
|
-
orionis/metadata/framework.py,sha256=
|
|
219
|
+
orionis/metadata/framework.py,sha256=x-b32Zbc9KqFM4uQD5FgK2jnLSvU2tkMfJqW7YpQFKM,4089
|
|
220
220
|
orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
|
|
221
221
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
222
222
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -227,7 +227,7 @@ orionis/services/asynchrony/exceptions/__init__.py,sha256=LXjn7TFOVBaHbPFtV87hZ3
|
|
|
227
227
|
orionis/services/asynchrony/exceptions/asynchrony.py,sha256=2MbqDBA5uGtnlXSmJAs6-1Lb4b8cHDXCKrnyRyucby0,407
|
|
228
228
|
orionis/services/encrypter/encrypter.py,sha256=iOR8_rgyye_Mdlp9OY9Zs9UlnA4sfWvItiDWP_7Q4Vg,4073
|
|
229
229
|
orionis/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
230
|
-
orionis/services/environment/env.py,sha256=
|
|
230
|
+
orionis/services/environment/env.py,sha256=IfD4JJY2brBtIyqR6xtqJTOUcrvt4x0tuCC8m5DEepw,4280
|
|
231
231
|
orionis/services/environment/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
232
232
|
orionis/services/environment/contracts/caster.py,sha256=OPi82zrvnvVSoOuDfZ89JTYd7cmfW4wSJejTW1azDsc,1180
|
|
233
233
|
orionis/services/environment/contracts/env.py,sha256=ozdYs3TkOsowPUrXSPEvm6mjoxYLWskliraQWh-WW4o,2122
|
|
@@ -385,7 +385,7 @@ orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
385
385
|
orionis/test/output/dumper.py,sha256=_FPetJq96fiWJhN29gMG8Rt6MEEgiyFHC5k95ACNtKY,5906
|
|
386
386
|
orionis/test/output/printer.py,sha256=3nevE9nyhMn0n8UpE-Nwsy4d1l3GE0wnBf4fAGPQxf4,29623
|
|
387
387
|
orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
388
|
-
orionis/test/records/logs.py,sha256=
|
|
388
|
+
orionis/test/records/logs.py,sha256=Dtu5HaWa2meblgTUXVAcOFaxkSJ3YxfDRaFoc_nhMCU,22043
|
|
389
389
|
orionis/test/validators/__init__.py,sha256=mhzMkpLPTyI8GMXYevIibRf1PnRDvSJLLDwjGhnvxes,875
|
|
390
390
|
orionis/test/validators/base_path.py,sha256=wAn5_HG0vQ5GH7wDKriO33Ijl1L1F3882BH67oraJnQ,1477
|
|
391
391
|
orionis/test/validators/execution_mode.py,sha256=YnrQlnIaoPtM0xjW7jJ2170m1aHwAPPIZBjSVe9g2QM,1693
|
|
@@ -403,8 +403,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
|
|
|
403
403
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
404
404
|
orionis/test/view/render.py,sha256=R55ykeRs0wDKcdTf4O1YZ8GDHTFmJ0IK6VQkbJkYUvo,5571
|
|
405
405
|
orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
|
|
406
|
-
orionis-0.
|
|
407
|
-
orionis-0.
|
|
408
|
-
orionis-0.
|
|
409
|
-
orionis-0.
|
|
410
|
-
orionis-0.
|
|
406
|
+
orionis-0.632.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
|
407
|
+
orionis-0.632.0.dist-info/METADATA,sha256=NMYvQLC3vUpfl0JJoFEUIsBsH2nlhfEFOa9gvTWoBE8,4772
|
|
408
|
+
orionis-0.632.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
409
|
+
orionis-0.632.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
|
|
410
|
+
orionis-0.632.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|