orionis 0.582.0__py3-none-any.whl → 0.583.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.
@@ -248,12 +248,12 @@ class Paths(BaseEntity):
248
248
 
249
249
  def __post_init__(self) -> None:
250
250
  """
251
- Post-initialization hook to validate path attributes.
251
+ Post-initialization hook to validate and normalize path attributes.
252
252
 
253
253
  This method is called automatically after the dataclass is initialized.
254
- It ensures that all attributes representing paths are of type `str`.
255
- If any attribute is not a string, an `OrionisIntegrityException` is raised
256
- to prevent invalid configuration.
254
+ It ensures that all path-related attributes of the class are stored as strings.
255
+ If any attribute is a `pathlib.Path`, it is converted to a string. If any attribute
256
+ cannot be converted to a string, an `OrionisIntegrityException` is raised.
257
257
 
258
258
  Parameters
259
259
  ----------
@@ -263,21 +263,26 @@ class Paths(BaseEntity):
263
263
  Returns
264
264
  -------
265
265
  None
266
- This method does not return any value.
266
+ This method does not return any value. It modifies the instance in place if necessary.
267
267
 
268
268
  Raises
269
269
  ------
270
270
  OrionisIntegrityException
271
- If any attribute is not of type `str`.
271
+ If any attribute is not a string after conversion.
272
272
  """
273
- super().__post_init__() # Call the parent class's post-init if defined
274
273
 
275
- # Iterate over all dataclass fields to validate their types
274
+ # Call the parent class's __post_init__ if it exists
275
+ super().__post_init__()
276
+
277
+ # Iterate over all dataclass fields to validate and normalize their values
276
278
  for field_ in fields(self):
277
279
  value = getattr(self, field_.name)
278
- # Check if the field value is not a string
280
+ # Convert Path objects to strings
281
+ if isinstance(value, Path):
282
+ object.__setattr__(self, field_.name, str(value))
283
+ value = str(value)
284
+ # Raise an exception if the value is not a string
279
285
  if not isinstance(value, str):
280
- # Raise an exception if the type is invalid
281
286
  raise OrionisIntegrityException(
282
287
  f"Invalid type for '{field_.name}': expected str, got {type(value).__name__}"
283
- )
288
+ )
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.582.0"
8
+ VERSION = "0.583.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.582.0
3
+ Version: 0.583.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
@@ -182,7 +182,7 @@ orionis/foundation/config/queue/entities/queue.py,sha256=YiWPeEg5e0fd_DJM2ogska6
182
182
  orionis/foundation/config/queue/enums/__init__.py,sha256=oWY8GWwr5mex7szs_bLVqAS1jbyuIAvKl7XFGSlU9A0,64
183
183
  orionis/foundation/config/queue/enums/strategy.py,sha256=S_kw7KZtoCk5FTOkbuXepdy_fOl9Eav4uT2K0OyzBa0,602
184
184
  orionis/foundation/config/roots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
185
- orionis/foundation/config/roots/paths.py,sha256=7XeVzorqEgqlLT9X1XIPj46uisSx-9MU-zCOlv4Re8k,10806
185
+ orionis/foundation/config/roots/paths.py,sha256=1uLXk-ipZuPCBKw_3yiBDhRX_M_WxBtpZZPQJzCaLJY,11105
186
186
  orionis/foundation/config/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
187
187
  orionis/foundation/config/session/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
188
188
  orionis/foundation/config/session/entities/session.py,sha256=YGhXwzXm5BvDUG7zwlEYrZuVssqeS4J3B-afsR_SDYo,6086
@@ -218,7 +218,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=irwkjMiq-HpsbJxAOnhjji
218
218
  orionis/foundation/providers/testing_provider.py,sha256=2akFnabtH_cV_7z_2cCL7u8cPCGvCJAmlhMcnlCrc4c,3742
219
219
  orionis/foundation/providers/workers_provider.py,sha256=P_YtJuPNrdJAQJkAqI11KI0c6GSB9NqIuuCKpRytE0g,3937
220
220
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
221
- orionis/metadata/framework.py,sha256=dAQ4PToHrUsHwMh7uMnRhl-OKR__HLP8tAtDO8UmhNg,4109
221
+ orionis/metadata/framework.py,sha256=lbpHbI8zoPuPN4XdStbSfOPtZguNKDetAVVuMqZ-xwY,4109
222
222
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
223
223
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
224
224
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -408,8 +408,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
408
408
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
409
409
  orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
410
410
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
411
- orionis-0.582.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
412
- orionis-0.582.0.dist-info/METADATA,sha256=lAaedXDa1kRMP3W_9ij1pa3dym2AH1qek1lDI9X-8R4,4801
413
- orionis-0.582.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
414
- orionis-0.582.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
415
- orionis-0.582.0.dist-info/RECORD,,
411
+ orionis-0.583.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
412
+ orionis-0.583.0.dist-info/METADATA,sha256=ORfacWA6Q0kGmFwsKRPKT021oKzlReCJconwJBnZbls,4801
413
+ orionis-0.583.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
414
+ orionis-0.583.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
415
+ orionis-0.583.0.dist-info/RECORD,,