orionis 0.645.0__py3-none-any.whl → 0.647.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/console/contracts/dumper.py +14 -2
- orionis/console/debug/dumper.py +8 -2
- orionis/console/output/console.py +34 -15
- orionis/metadata/framework.py +1 -1
- orionis/support/facades/dumper.py +2 -2
- orionis/support/facades/dumper.pyi +2 -2
- orionis/test/output/dumper.py +3 -3
- {orionis-0.645.0.dist-info → orionis-0.647.0.dist-info}/METADATA +1 -1
- {orionis-0.645.0.dist-info → orionis-0.647.0.dist-info}/RECORD +12 -12
- {orionis-0.645.0.dist-info → orionis-0.647.0.dist-info}/WHEEL +0 -0
- {orionis-0.645.0.dist-info → orionis-0.647.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.645.0.dist-info → orionis-0.647.0.dist-info}/top_level.txt +0 -0
|
@@ -12,7 +12,9 @@ class IDumper(ABC):
|
|
|
12
12
|
expand_all: bool = True,
|
|
13
13
|
max_depth: int | None = None,
|
|
14
14
|
module_path: str = None,
|
|
15
|
-
line_number: int = None
|
|
15
|
+
line_number: int = None,
|
|
16
|
+
redirect_output: int = False,
|
|
17
|
+
insert_line: bool = False
|
|
16
18
|
) -> None:
|
|
17
19
|
"""
|
|
18
20
|
Dump the provided variables to the console and terminate execution.
|
|
@@ -39,6 +41,10 @@ class IDumper(ABC):
|
|
|
39
41
|
The path of the module from which the method is called (default is None).
|
|
40
42
|
line_number : int or None, optional
|
|
41
43
|
The line number in the source code where the method is called (default is None).
|
|
44
|
+
redirect_output : int, optional
|
|
45
|
+
Whether to redirect the output (default is False).
|
|
46
|
+
insert_line : bool, optional
|
|
47
|
+
Whether to insert a separating line before the dump output (default is False).
|
|
42
48
|
|
|
43
49
|
Returns
|
|
44
50
|
-------
|
|
@@ -56,7 +62,9 @@ class IDumper(ABC):
|
|
|
56
62
|
expand_all: bool = True,
|
|
57
63
|
max_depth: int | None = None,
|
|
58
64
|
module_path: str = None,
|
|
59
|
-
line_number: int = None
|
|
65
|
+
line_number: int = None,
|
|
66
|
+
redirect_output: int = False,
|
|
67
|
+
insert_line: bool = False
|
|
60
68
|
) -> None:
|
|
61
69
|
"""
|
|
62
70
|
Dump the provided variables to the console for debugging purposes.
|
|
@@ -83,6 +91,10 @@ class IDumper(ABC):
|
|
|
83
91
|
The path of the module from which the dump is called (default is None).
|
|
84
92
|
line_number : int or None, optional
|
|
85
93
|
The line number in the source code where the dump is called (default is None).
|
|
94
|
+
redirect_output : int, optional
|
|
95
|
+
Whether to redirect the output (default is False).
|
|
96
|
+
insert_line : bool, optional
|
|
97
|
+
Whether to insert a separating line before the dump output (default is False).
|
|
86
98
|
|
|
87
99
|
Returns
|
|
88
100
|
-------
|
orionis/console/debug/dumper.py
CHANGED
|
@@ -35,6 +35,7 @@ class Dumper(IDumper):
|
|
|
35
35
|
max_depth: int | None = None,
|
|
36
36
|
module_path: str = None,
|
|
37
37
|
line_number: int = None,
|
|
38
|
+
redirect_output: int = False,
|
|
38
39
|
insert_line: bool = False
|
|
39
40
|
) -> None:
|
|
40
41
|
"""
|
|
@@ -62,6 +63,8 @@ class Dumper(IDumper):
|
|
|
62
63
|
The path of the module from which the method is called (default is None).
|
|
63
64
|
line_number : int or None, optional
|
|
64
65
|
The line number in the source code where the method is called (default is None).
|
|
66
|
+
redirect_output : int, optional
|
|
67
|
+
Whether to redirect the output (default is False).
|
|
65
68
|
insert_line : bool, optional
|
|
66
69
|
Whether to insert a separating line before the dump output (default is False).
|
|
67
70
|
|
|
@@ -83,7 +86,7 @@ class Dumper(IDumper):
|
|
|
83
86
|
module_path=module_path,
|
|
84
87
|
line_number=line_number,
|
|
85
88
|
force_exit=True,
|
|
86
|
-
redirect_output=
|
|
89
|
+
redirect_output=redirect_output,
|
|
87
90
|
insert_line=insert_line
|
|
88
91
|
)
|
|
89
92
|
|
|
@@ -96,6 +99,7 @@ class Dumper(IDumper):
|
|
|
96
99
|
max_depth: int | None = None,
|
|
97
100
|
module_path: str = None,
|
|
98
101
|
line_number: int = None,
|
|
102
|
+
redirect_output: int = False,
|
|
99
103
|
insert_line: bool = False
|
|
100
104
|
) -> None:
|
|
101
105
|
"""
|
|
@@ -123,6 +127,8 @@ class Dumper(IDumper):
|
|
|
123
127
|
The path of the module from which the dump is called (default is None).
|
|
124
128
|
line_number : int or None, optional
|
|
125
129
|
The line number in the source code where the dump is called (default is None).
|
|
130
|
+
redirect_output : int, optional
|
|
131
|
+
Whether to redirect the output (default is False).
|
|
126
132
|
insert_line : bool, optional
|
|
127
133
|
Whether to insert a separating line before the dump output (default is False).
|
|
128
134
|
|
|
@@ -144,6 +150,6 @@ class Dumper(IDumper):
|
|
|
144
150
|
module_path=module_path,
|
|
145
151
|
line_number=line_number,
|
|
146
152
|
force_exit=False,
|
|
147
|
-
redirect_output=
|
|
153
|
+
redirect_output=redirect_output,
|
|
148
154
|
insert_line=insert_line
|
|
149
155
|
)
|
|
@@ -615,25 +615,44 @@ class Console(IConsole):
|
|
|
615
615
|
print()
|
|
616
616
|
|
|
617
617
|
# Create a custom Rich theme for styling the dump output
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
618
|
+
console = RichConsole(
|
|
619
|
+
theme=Theme({
|
|
620
|
+
"dump.index": "bold bright_blue",
|
|
621
|
+
"dump.type": "bold green",
|
|
622
|
+
"dump.rule": "bright_black",
|
|
623
|
+
}),
|
|
624
|
+
record=True
|
|
625
|
+
)
|
|
624
626
|
width = console.size.width
|
|
625
627
|
|
|
626
|
-
#
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
628
|
+
# If no module_path or line_number provided, get from caller
|
|
629
|
+
if not module_path or not line_number:
|
|
630
|
+
|
|
631
|
+
# Use inspect to get the caller's frame information
|
|
632
|
+
caller_frame = inspect.currentframe()
|
|
633
|
+
|
|
634
|
+
# If the frame is available, navigate back to the caller's frame
|
|
635
|
+
if caller_frame is not None:
|
|
636
|
+
|
|
637
|
+
# Go back two frames to get the caller of the dump method
|
|
638
|
+
caller_frame = caller_frame.f_back.f_back
|
|
639
|
+
|
|
640
|
+
# If caller_frame is still valid, extract module and line number
|
|
641
|
+
if caller_frame is not None:
|
|
642
|
+
|
|
643
|
+
# If module_path or line_number not provided, get from caller
|
|
644
|
+
if not module_path:
|
|
645
|
+
module_path = caller_frame.f_globals.get("__name__", "unknown")
|
|
646
|
+
if not line_number:
|
|
647
|
+
line_number = caller_frame.f_lineno
|
|
648
|
+
else:
|
|
649
|
+
|
|
650
|
+
#fallback if frame info is unavailable
|
|
651
|
+
module_path = "unknown"
|
|
652
|
+
line_number = '?'
|
|
634
653
|
|
|
635
654
|
# Print header with module and line information
|
|
636
|
-
header = f"🐞 [white]Module([/white][bold blue]{
|
|
655
|
+
header = f"🐞 [white]Module([/white][bold blue]{module_path}[/bold blue][white]) [/white][grey70]#{line_number}[/grey70]"
|
|
637
656
|
console.print(header)
|
|
638
657
|
|
|
639
658
|
# Iterate over each argument and display it in a styled panel
|
orionis/metadata/framework.py
CHANGED
|
@@ -14,9 +14,9 @@ class Dumper(Facade):
|
|
|
14
14
|
Returns
|
|
15
15
|
-------
|
|
16
16
|
str
|
|
17
|
-
The string "x-orionis.console.contracts.
|
|
17
|
+
The string "x-orionis.console.contracts.dumper.IDumper", which is the binding key
|
|
18
18
|
used to identify and resolve the dumper service from the service container.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
# Return the unique binding key for the dumper service in the container
|
|
22
|
-
return "x-orionis.console.contracts.
|
|
22
|
+
return "x-orionis.console.contracts.dumper.IDumper"
|
orionis/test/output/dumper.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import sys
|
|
2
|
-
from orionis.
|
|
2
|
+
from orionis.support.facades.console import Console
|
|
3
3
|
from orionis.test.contracts.dumper import ITestDumper
|
|
4
4
|
|
|
5
5
|
class TestDumper(ITestDumper):
|
|
@@ -127,7 +127,7 @@ class TestDumper(ITestDumper):
|
|
|
127
127
|
module, line = self.__tracebackInfo()
|
|
128
128
|
|
|
129
129
|
# Filter out test case instances from the arguments
|
|
130
|
-
Console
|
|
130
|
+
Console.dump(
|
|
131
131
|
*self.__valuesToDump(args),
|
|
132
132
|
module_path=module,
|
|
133
133
|
line_number=line,
|
|
@@ -161,7 +161,7 @@ class TestDumper(ITestDumper):
|
|
|
161
161
|
module, line = self.__tracebackInfo()
|
|
162
162
|
|
|
163
163
|
# Filter out test case instances from the arguments and output the rest
|
|
164
|
-
Console
|
|
164
|
+
Console.dump(
|
|
165
165
|
*self.__valuesToDump(args),
|
|
166
166
|
module_path=module,
|
|
167
167
|
line_number=line,
|
|
@@ -24,7 +24,7 @@ orionis/console/contracts/base_scheduler.py,sha256=RSxEW57MoMU3pXfliIrQw9WuMk95p
|
|
|
24
24
|
orionis/console/contracts/cli_request.py,sha256=qIV8ig8PG39LYp1acnUD8GYsNRSHncxIxGjO3B3YsUo,6755
|
|
25
25
|
orionis/console/contracts/command.py,sha256=Wvm62hw2gDIPNmoEUFyhKUERjZ6wnAbI-UDY_5gJE24,3626
|
|
26
26
|
orionis/console/contracts/console.py,sha256=TuoyCLInhp5ztlyJ82rBsw_1Ki3_fOnF_gtaWUxSW1M,14253
|
|
27
|
-
orionis/console/contracts/dumper.py,sha256=
|
|
27
|
+
orionis/console/contracts/dumper.py,sha256=h8ScHF31Q3oOdEe5_EyozOD8OGcLvkMG4KkJwa3ANX8,4538
|
|
28
28
|
orionis/console/contracts/event.py,sha256=KQESAycPzBE3xoDTnbYLz_XXg-7dwrybYKbaJjgkCMY,119842
|
|
29
29
|
orionis/console/contracts/executor.py,sha256=JAzK64_5HfIGm3_BwsUv7-ZeC2Y-3mpxOByHaXwuy9A,4278
|
|
30
30
|
orionis/console/contracts/kernel.py,sha256=mh4LlhEYHh3FuGZZQ0GBhD6ZLa5YQvaNj2r01IIHI5Y,826
|
|
@@ -35,7 +35,7 @@ orionis/console/contracts/schedule_event_listener.py,sha256=h06qsBxuEMD3KLSyu0JX
|
|
|
35
35
|
orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
orionis/console/core/reactor.py,sha256=x_bRFLBq5MiKZdlMG1gZR1GCZgFkUDnG5l_nh2YKiR8,44044
|
|
37
37
|
orionis/console/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
-
orionis/console/debug/dumper.py,sha256=
|
|
38
|
+
orionis/console/debug/dumper.py,sha256=vbmP_GlrzBj0KDjiQl4iDudPRe6V0W5r5UA8i3h9_c4,6555
|
|
39
39
|
orionis/console/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
orionis/console/dynamic/progress_bar.py,sha256=58wne7E_QZb_uN9jjqQ_V28Ci19SVNhCQQ4zzXCiOu0,2872
|
|
41
41
|
orionis/console/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -58,7 +58,7 @@ orionis/console/fluent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
58
58
|
orionis/console/fluent/command.py,sha256=0jyhB45LIjDS7nkjNhkkvEXEzdOBmT49qKIooYY_DbI,8261
|
|
59
59
|
orionis/console/fluent/event.py,sha256=RM6Aaz-2MYQg4RWxYdr6oBNaAjNVp9DE_tI5iwl2mAk,166672
|
|
60
60
|
orionis/console/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
-
orionis/console/output/console.py,sha256=
|
|
61
|
+
orionis/console/output/console.py,sha256=8gxl0gfYyxAKt9rdkMjJU71CdTn84yvzOWbtIF3u0EE,24215
|
|
62
62
|
orionis/console/output/executor.py,sha256=uQjFPOlyZLFj9pcyYPugCqxwJog0AJgK1OcmQH2ELbw,7314
|
|
63
63
|
orionis/console/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
orionis/console/request/cli_request.py,sha256=lO7088xlVK1VP-NhCIgAo7qXGzCW3nXVOJag43fUv20,13207
|
|
@@ -217,7 +217,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
|
|
|
217
217
|
orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
|
|
218
218
|
orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
|
|
219
219
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
220
|
-
orionis/metadata/framework.py,sha256=
|
|
220
|
+
orionis/metadata/framework.py,sha256=Y2FHOlAa7q84YeCOkVZmD4uHdEJx5TDeokgqxWvki5w,4089
|
|
221
221
|
orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
|
|
222
222
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
223
223
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -317,8 +317,8 @@ orionis/support/facades/console.py,sha256=s0HBZ3F0KCK6D4W6EZNdDVCikTWXlhrIMQquj_
|
|
|
317
317
|
orionis/support/facades/console.pyi,sha256=nWrYF-N5BIHbOSU7lAICb5KKrpzMX0QC7go3e54bLUA,1275
|
|
318
318
|
orionis/support/facades/directory.py,sha256=85ho4t9APMULBtJ58MPl-rRit9ub48XpYWPzEjLU3_8,946
|
|
319
319
|
orionis/support/facades/directory.pyi,sha256=3WnIpvLMunTgzR5un49XzAkqOKkOtkrVko34SNJVcAY,592
|
|
320
|
-
orionis/support/facades/dumper.py,sha256=
|
|
321
|
-
orionis/support/facades/dumper.pyi,sha256=
|
|
320
|
+
orionis/support/facades/dumper.py,sha256=Rv1O8UONZ4qoPNPh4j-9pBaLmnJxt0pardzZpYapXy4,904
|
|
321
|
+
orionis/support/facades/dumper.pyi,sha256=4yQmFu3lPwRqXdSWZ_IP8GyCihrPBKPTqA988PXmQ3Q,511
|
|
322
322
|
orionis/support/facades/executor.py,sha256=276MKqXsvrW947SvSzEcl8wleAtsjxhVq_r8FcySGH4,1061
|
|
323
323
|
orionis/support/facades/executor.pyi,sha256=JS0h8ddYD62o79yXL5UzeZmPWOXNasyMgXKL8ZCOkBE,547
|
|
324
324
|
orionis/support/facades/inspire.py,sha256=oGPMP_mNEmQRbPx7W-TwvW_xwbn4c04rHzu_ivgVKdw,964
|
|
@@ -383,7 +383,7 @@ orionis/test/exceptions/persistence.py,sha256=8Oakaey35DpByLoGnfbwHxFKntxgWaGl49
|
|
|
383
383
|
orionis/test/exceptions/runtime.py,sha256=h9gQ0pS8tJTmuXNG-GHky8tTqpdz-cNqkntOOlRXZJg,612
|
|
384
384
|
orionis/test/exceptions/value.py,sha256=CoqYOkViU_RaKCMNpB82tgEsR3XhI1pw6YQ8sH8CJh4,588
|
|
385
385
|
orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
386
|
-
orionis/test/output/dumper.py,sha256=
|
|
386
|
+
orionis/test/output/dumper.py,sha256=BZlK3WZsfDiJnQupRSVkcy2linfIxGUycz4zWt3pQ_w,6035
|
|
387
387
|
orionis/test/output/printer.py,sha256=3nevE9nyhMn0n8UpE-Nwsy4d1l3GE0wnBf4fAGPQxf4,29623
|
|
388
388
|
orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
389
389
|
orionis/test/records/logs.py,sha256=Dtu5HaWa2meblgTUXVAcOFaxkSJ3YxfDRaFoc_nhMCU,22043
|
|
@@ -404,8 +404,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
|
|
|
404
404
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
405
405
|
orionis/test/view/render.py,sha256=R55ykeRs0wDKcdTf4O1YZ8GDHTFmJ0IK6VQkbJkYUvo,5571
|
|
406
406
|
orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
|
|
407
|
-
orionis-0.
|
|
408
|
-
orionis-0.
|
|
409
|
-
orionis-0.
|
|
410
|
-
orionis-0.
|
|
411
|
-
orionis-0.
|
|
407
|
+
orionis-0.647.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
|
408
|
+
orionis-0.647.0.dist-info/METADATA,sha256=V01955yQNPUAnQixBrnJVIjCjwXdafI2TwYRFONU3nY,4772
|
|
409
|
+
orionis-0.647.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
410
|
+
orionis-0.647.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
|
|
411
|
+
orionis-0.647.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|