orionis 0.709.0__py3-none-any.whl → 0.710.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.
@@ -6,7 +6,7 @@
6
6
  NAME = "orionis"
7
7
 
8
8
  # Current version of the framework
9
- VERSION = "0.709.0"
9
+ VERSION = "0.710.0"
10
10
 
11
11
  # Full name of the author or maintainer of the project
12
12
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,23 +1,13 @@
1
1
  class OrionisTestConfigException(Exception):
2
-
3
- def __init__(self, msg: str):
4
- """
5
- Initialize the OrionisTestConfigException.
6
-
7
- Parameters
8
- ----------
9
- msg : str
10
- The error message describing the cause of the exception.
11
- """
12
- super().__init__(msg)
13
-
14
- def __str__(self) -> str:
15
- """
16
- Return the exception message as a string.
17
-
18
- Returns
19
- -------
20
- str
21
- The error message provided during initialization.
22
- """
23
- return str(self.args[0])
2
+ """
3
+ Exception raised for errors encountered in the Orionis test configuration.
4
+
5
+ This exception signals issues related to the configuration process or invalid
6
+ configuration values during testing within the Orionis framework.
7
+
8
+ Returns
9
+ -------
10
+ None
11
+ This exception does not return a value.
12
+ """
13
+ pass # This class serves as a custom exception for test configuration errors.
@@ -1,23 +1,15 @@
1
1
  class OrionisTestPersistenceError(Exception):
2
+ """
3
+ Exception raised for errors encountered during persistence operations in Orionis tests.
2
4
 
3
- def __init__(self, msg: str):
4
- """
5
- Initialize the OrionisTestPersistenceError with an error message.
5
+ This exception is intended to signal issues related to saving, loading, or managing
6
+ persistent data within the Orionis testing framework.
6
7
 
7
- Parameters
8
- ----------
9
- msg : str
10
- The error message describing the cause of the exception.
11
- """
12
- super().__init__(msg)
8
+ Returns
9
+ -------
10
+ None
11
+ This exception does not return a value.
12
+ """
13
13
 
14
- def __str__(self) -> str:
15
- """
16
- Return the string representation of the exception message.
17
-
18
- Returns
19
- -------
20
- str
21
- The error message associated with the exception.
22
- """
23
- return str(self.args[0])
14
+ # No additional implementation required; inherits from Exception.
15
+ pass
@@ -1,23 +1,19 @@
1
1
  class OrionisTestRuntimeError(Exception):
2
+ """
3
+ Exception raised for errors encountered during the runtime of Orionis tests.
2
4
 
3
- def __init__(self, msg: str):
4
- """
5
- Initialize the OrionisTestRuntimeError with a specific error message.
5
+ This exception signals unexpected issues that arise while executing test cases
6
+ within the Orionis framework.
6
7
 
7
- Parameters
8
- ----------
9
- msg : str
10
- The error message describing the cause of the exception.
11
- """
12
- super().__init__(msg)
8
+ Attributes
9
+ ----------
10
+ None
13
11
 
14
- def __str__(self) -> str:
15
- """
16
- Return the string representation of the exception.
12
+ Returns
13
+ -------
14
+ None
15
+ This class does not return a value; it is used for exception handling.
16
+ """
17
17
 
18
- Returns
19
- -------
20
- str
21
- The error message provided during initialization.
22
- """
23
- return str(self.args[0])
18
+ # No additional implementation; inherits from Exception.
19
+ pass
@@ -1,23 +1,15 @@
1
1
  class OrionisTestValueError(Exception):
2
+ """
3
+ Exception raised for invalid values encountered in Orionis tests.
2
4
 
3
- def __init__(self, msg: str):
4
- """
5
- Initialize the OrionisTestValueError exception.
5
+ This exception indicates that a value used during testing does not satisfy
6
+ the required criteria or constraints.
6
7
 
7
- Parameters
8
- ----------
9
- msg : str
10
- The error message describing the cause of the exception.
11
- """
12
- super().__init__(msg)
8
+ Returns
9
+ -------
10
+ None
11
+ This exception does not return a value.
12
+ """
13
13
 
14
- def __str__(self) -> str:
15
- """
16
- Return the string representation of the exception.
17
-
18
- Returns
19
- -------
20
- str
21
- The error message associated with this exception.
22
- """
23
- return str(self.args[0])
14
+ # Inherits from the base Exception class to define a custom error type for test value issues.
15
+ pass
@@ -329,11 +329,11 @@ class TestLogs(ITestLogs):
329
329
  )
330
330
 
331
331
  # Validate 'first' parameter if provided
332
- if first is not None and not isinstance(first, int) or first <= 0:
332
+ if first is not None and (not isinstance(first, int) or first <= 0):
333
333
  raise OrionisTestValueError("'first' must be a positive integer greater than zero.")
334
334
 
335
335
  # Validate 'last' parameter if provided
336
- if last is not None and not isinstance(last, int) or last <= 0:
336
+ if last is not None and (not isinstance(last, int) or last <= 0):
337
337
  raise OrionisTestValueError("'last' must be a positive integer greater than zero.")
338
338
 
339
339
  # Determine the order and quantity of records to retrieve
@@ -7,6 +7,8 @@ from .name_pattern import ValidNamePattern
7
7
  from .pattern import ValidPattern
8
8
  from .persistent_driver import ValidPersistentDriver
9
9
  from .persistent import ValidPersistent
10
+ from .print_result import ValidPrintResult
11
+ from .tags import ValidTags
10
12
  from .throw_exception import ValidThrowException
11
13
  from .verbosity import ValidVerbosity
12
14
  from .web_report import ValidWebReport
@@ -22,6 +24,8 @@ __all__ = [
22
24
  'ValidPattern',
23
25
  'ValidPersistentDriver',
24
26
  'ValidPersistent',
27
+ 'ValidPrintResult',
28
+ 'ValidTags',
25
29
  'ValidThrowException',
26
30
  'ValidVerbosity',
27
31
  'ValidWebReport',
@@ -24,15 +24,16 @@ class __ValidBasePath:
24
24
  """
25
25
 
26
26
  if isinstance(base_path, str):
27
- base_path = base_path.strip()
28
- if not base_path:
27
+ stripped_path = base_path.strip()
28
+ if not stripped_path:
29
29
  raise OrionisTestValueError(
30
30
  "Invalid base_path: Expected a non-empty string or Path."
31
31
  )
32
- return Path(base_path)
32
+ return Path(stripped_path)
33
33
 
34
34
  elif isinstance(base_path, Path):
35
- if not str(base_path).strip():
35
+ path_str = str(base_path).strip()
36
+ if not path_str or path_str == ".":
36
37
  raise OrionisTestValueError(
37
38
  "Invalid base_path: Path cannot be empty."
38
39
  )
@@ -21,7 +21,7 @@ class __ValidModuleName:
21
21
  OrionisTestValueError
22
22
  If `module_name` is not a non-empty string.
23
23
  """
24
- if not module_name or not isinstance(module_name, str):
24
+ if not isinstance(module_name, str) or not module_name.strip():
25
25
  raise OrionisTestValueError(
26
26
  f"Invalid module_name: Expected a non-empty string, got '{module_name}' ({type(module_name).__name__})."
27
27
  )
@@ -0,0 +1,32 @@
1
+ from orionis.test.exceptions import OrionisTestValueError
2
+
3
+ class __ValidPrintResult:
4
+
5
+ def __call__(self, print_result) -> bool:
6
+ """
7
+ Validates that the input is a boolean value.
8
+
9
+ Parameters
10
+ ----------
11
+ print_result : Any
12
+ The value to be validated as a boolean.
13
+
14
+ Returns
15
+ -------
16
+ bool
17
+ The validated boolean value.
18
+
19
+ Raises
20
+ ------
21
+ OrionisTestValueError
22
+ If `print_result` is not of type `bool`.
23
+ """
24
+ if not isinstance(print_result, bool):
25
+ raise OrionisTestValueError(
26
+ f"Invalid print_result: Expected a boolean, got '{print_result}' ({type(print_result).__name__})."
27
+ )
28
+
29
+ return print_result
30
+
31
+ # Exported singleton instance
32
+ ValidPrintResult = __ValidPrintResult()
@@ -0,0 +1,56 @@
1
+ from orionis.test.exceptions import OrionisTestValueError
2
+
3
+ class __ValidTags:
4
+
5
+ def __call__(self, tags) -> list | None:
6
+ """
7
+ Validates that the input is either None or a list of non-empty string tags.
8
+
9
+ Parameters
10
+ ----------
11
+ tags : list or None
12
+ The list of tags to validate. Must be None or a list of non-empty strings.
13
+
14
+ Returns
15
+ -------
16
+ list or None
17
+ The validated list of normalized tag strings, or None if input is None.
18
+
19
+ Raises
20
+ ------
21
+ OrionisTestValueError
22
+ If `tags` is not None or a list, if the list is empty, or if any tag
23
+ is not a non-empty string.
24
+ """
25
+ if tags is None:
26
+ return None
27
+
28
+ if not isinstance(tags, list):
29
+ raise OrionisTestValueError(
30
+ f"Invalid tags: Expected a list or None, got '{tags}' ({type(tags).__name__})."
31
+ )
32
+
33
+ if not tags:
34
+ raise OrionisTestValueError(
35
+ "Invalid tags: Expected a non-empty list or None."
36
+ )
37
+
38
+ normalized_tags = []
39
+ for tag in tags:
40
+ if not isinstance(tag, str):
41
+ raise OrionisTestValueError(
42
+ f"Invalid tag: Expected a string, got '{tag}' ({type(tag).__name__})."
43
+ )
44
+
45
+ normalized_tag = tag.strip()
46
+ if not normalized_tag:
47
+ raise OrionisTestValueError(
48
+ "Invalid tag: Expected a non-empty string."
49
+ )
50
+
51
+ normalized_tags.append(normalized_tag)
52
+
53
+ return normalized_tags
54
+
55
+ # Exported singleton instance
56
+ ValidTags = __ValidTags()
@@ -1,4 +1,4 @@
1
- from orionis.services.system.workers import Workers
1
+ from orionis.support.facades.workers import Workers
2
2
  from orionis.test.exceptions import OrionisTestValueError
3
3
 
4
4
  class __ValidWorkers:
@@ -25,7 +25,7 @@ class __ValidWorkers:
25
25
  OrionisTestValueError
26
26
  If `max_workers` is not a positive integer within the allowed range.
27
27
  """
28
- max_allowed = Workers().calculate()
28
+ max_allowed = Workers.calculate()
29
29
  if not isinstance(max_workers, int) or max_workers < 1 or max_workers > max_allowed:
30
30
  raise OrionisTestValueError(
31
31
  f"Invalid max_workers: Expected a positive integer between 1 and {max_allowed}, got '{max_workers}' ({type(max_workers).__name__})."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.709.0
3
+ Version: 0.710.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
@@ -207,7 +207,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
207
207
  orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
208
208
  orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
209
209
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
210
- orionis/metadata/framework.py,sha256=684u8AFoYkTrBh_Jwn9VQsz41kldOL9Fcq-nGEW2lUc,4570
210
+ orionis/metadata/framework.py,sha256=cYeDyi8GcnquSc5ovbhabjEmaFlYplKP8xm8HN1DI-k,4570
211
211
  orionis/metadata/package.py,sha256=s1JeGJPwdVh4jO3IOfmpwMuJ_oX6Vf9NL7jgPEQNf5Y,16050
212
212
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
213
213
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -367,35 +367,37 @@ orionis/test/entities/result.py,sha256=eZ6UIqGmFW8FZ9x8PB_MZbLAc-SAuUyi4FUcMYIZz
367
367
  orionis/test/enums/__init__.py,sha256=M3imAgMvKFTKg55FbtVoY3zxj7QRY9AfaUWxiSZVvn4,66
368
368
  orionis/test/enums/status.py,sha256=5SXvDQEFOT4Jkzdndw6hV8Tc2k4gm9XGjyZp0Qa55Zk,757
369
369
  orionis/test/exceptions/__init__.py,sha256=HcFudBMqi86hzgxEyNhh29hNMOle4KZmKosJRqX5ayc,424
370
- orionis/test/exceptions/config.py,sha256=tzwTyfxuriALzH39VRtNcpO9iA64OuZTXPCJEbEG1C4,579
370
+ orionis/test/exceptions/config.py,sha256=POzRCoKXqp8EzLtqR_e7E_VlAiN_GJqu7M92g9cH66E,469
371
371
  orionis/test/exceptions/failure.py,sha256=IlaH45y1D0kypu6uaNbi4iCzYrhZUxxO5hQ9DtGv0Gg,2020
372
- orionis/test/exceptions/persistence.py,sha256=8Oakaey35DpByLoGnfbwHxFKntxgWaGl496hlyeosxU,619
373
- orionis/test/exceptions/runtime.py,sha256=h9gQ0pS8tJTmuXNG-GHky8tTqpdz-cNqkntOOlRXZJg,612
374
- orionis/test/exceptions/value.py,sha256=CoqYOkViU_RaKCMNpB82tgEsR3XhI1pw6YQ8sH8CJh4,588
372
+ orionis/test/exceptions/persistence.py,sha256=bIuhO2IZVdKuDJKHPF2BDdRxr6uzQnvEFm6cintzbcg,476
373
+ orionis/test/exceptions/runtime.py,sha256=BfLGfA8eeCbOlFbH_CyI33rPc-4imTYwcCgVan_KK2Y,498
374
+ orionis/test/exceptions/value.py,sha256=BeSR0bheS40IqVdXRDrmYPnXkezhyNanG4DQneEhj68,451
375
375
  orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
376
376
  orionis/test/output/dumper.py,sha256=m68kaIuTs3G7H1B2ZthN_H52XeRHeO95cvNNDwzby0w,6030
377
377
  orionis/test/output/printer.py,sha256=5BF8elV_CUhz2Gzc5zFZ8_Kq-cMTmYFLhDsEUX7o3kg,29643
378
378
  orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
379
- orionis/test/records/logs.py,sha256=_kq3VLUCCuQzUYFUOoMXD5riPYQ3GdLHQR5TxwmylxE,21996
380
- orionis/test/validators/__init__.py,sha256=mhzMkpLPTyI8GMXYevIibRf1PnRDvSJLLDwjGhnvxes,875
381
- orionis/test/validators/base_path.py,sha256=wAn5_HG0vQ5GH7wDKriO33Ijl1L1F3882BH67oraJnQ,1477
379
+ orionis/test/records/logs.py,sha256=Vein9TE4-C64m9tcYhT9kMvUESI4OGUd-05QDwOMbpo,22000
380
+ orionis/test/validators/__init__.py,sha256=RpuZFsrmxzLjRERyJ2fcZIQ27xuq2DedDlao2zmFE_U,991
381
+ orionis/test/validators/base_path.py,sha256=5sEnBqC--q7AvXkMRQOLT4sLCV1Gus_eSfXdHlClvac,1541
382
382
  orionis/test/validators/execution_mode.py,sha256=YnrQlnIaoPtM0xjW7jJ2170m1aHwAPPIZBjSVe9g2QM,1693
383
383
  orionis/test/validators/fail_fast.py,sha256=Z54GSQ2KxYeLy2gZwo51sYYMXH-6mj1w09okhI1MWOQ,850
384
384
  orionis/test/validators/folder_path.py,sha256=Pfy65fANR6eY-8665exTOhzzzEUvblYSOFGEuJMiGxA,953
385
- orionis/test/validators/module_name.py,sha256=A5Ng8LW2pPfgPKm0Vs_Y0oiP8Pe8Nfz8kV1zv_y7fbo,928
385
+ orionis/test/validators/module_name.py,sha256=Eo-4dE0Ms_yp4As1Rvu1UjVsUQvbx7M76-qeRSysnZE,936
386
386
  orionis/test/validators/name_pattern.py,sha256=I0DRZ7Nhtlzw33urmlr3EoGH6eJ8TdeFnpeRmqliThg,1139
387
387
  orionis/test/validators/pattern.py,sha256=NYc_qsjd0Y1J0tmioW7nmlBVowbzkhGA17e4AdxfcA8,881
388
388
  orionis/test/validators/persistent.py,sha256=8y6rkseAG4yobbw9AFvVjKlMl2HL_w5i6rH9LNNYZAU,851
389
389
  orionis/test/validators/persistent_driver.py,sha256=9t832vIZyBAdIyKn-nZ-_nKs0Oxf2uvmR7K9ncWdRpw,1545
390
+ orionis/test/validators/print_result.py,sha256=qLb0oJVtQUgFcOUQI8WKqGVCQDo_1oLLlXpVuzv873o,875
391
+ orionis/test/validators/tags.py,sha256=LrF2eCiEhC4eukW_ABzx-nTiaUn-lUFvmVDT98fkZVM,1762
390
392
  orionis/test/validators/throw_exception.py,sha256=PLtM94BArQf11VJhxfBHJSHARZSia-Q8ePixctU2JwQ,893
391
393
  orionis/test/validators/verbosity.py,sha256=rADzM82cPcJ2_6crszpobJuwb5WihWNQf6i4M_yrCpw,1785
392
394
  orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNusHqc02R8,853
393
- orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
395
+ orionis/test/validators/workers.py,sha256=HcZ3cnrk6u7cvM1xZpn_lsglHAq69_jx9RcTSvLrdb0,1204
394
396
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
395
397
  orionis/test/view/render.py,sha256=arysoswhkV2vUd2aVMZRPpmH317jaWbgjDpQ_AWQ5AE,5663
396
398
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
397
- orionis-0.709.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
398
- orionis-0.709.0.dist-info/METADATA,sha256=Cmb0ANzrtQ2npYC4UREZKZ3g1j-IXrGxgvUSKGhIB00,4772
399
- orionis-0.709.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
400
- orionis-0.709.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
401
- orionis-0.709.0.dist-info/RECORD,,
399
+ orionis-0.710.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
400
+ orionis-0.710.0.dist-info/METADATA,sha256=COcX7OIV0MkmYS11DG4P6UnoY18Amb2BaWgNiVoHyyk,4772
401
+ orionis-0.710.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
402
+ orionis-0.710.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
403
+ orionis-0.710.0.dist-info/RECORD,,