logger-36 2025.11__py3-none-any.whl → 2025.12__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.
- logger_36/__init__.py +5 -2
- logger_36/{storage.py → api/exception.py} +4 -1
- logger_36/api/handler.py +58 -0
- logger_36/api/storage.py +1 -0
- logger_36/api/{logger.py → type.py} +1 -0
- logger_36/task/format/message.py +16 -8
- logger_36/type/logger.py +32 -2
- logger_36/version.py +1 -1
- {logger_36-2025.11.dist-info → logger_36-2025.12.dist-info}/METADATA +1 -1
- {logger_36-2025.11.dist-info → logger_36-2025.12.dist-info}/RECORD +19 -18
- {logger_36-2025.11.dist-info → logger_36-2025.12.dist-info}/WHEEL +1 -1
- /logger_36/{content.py → api/content.py} +0 -0
- /logger_36/{gpu.py → api/gpu.py} +0 -0
- /logger_36/{memory.py → api/memory.py} +0 -0
- /logger_36/{system.py → api/system.py} +0 -0
- /logger_36/{time.py → api/time.py} +0 -0
- /logger_36/{exception.py → extension/exception.py} +0 -0
- /logger_36/{handler.py → task/handling.py} +0 -0
- {logger_36-2025.11.dist-info → logger_36-2025.12.dist-info}/top_level.txt +0 -0
logger_36/__init__.py
CHANGED
@@ -12,9 +12,12 @@ else:
|
|
12
12
|
import site
|
13
13
|
from pathlib import Path as path_t
|
14
14
|
|
15
|
-
paths = site.getsitepackages() + [site.getusersitepackages()]
|
16
15
|
folder = path_t(__file__).parent
|
17
|
-
|
16
|
+
paths = site.getsitepackages() + [site.getusersitepackages()]
|
17
|
+
for path in paths:
|
18
|
+
if folder.is_relative_to(path):
|
19
|
+
break
|
20
|
+
else:
|
18
21
|
beartype_this_package()
|
19
22
|
|
20
23
|
from logger_36.instance.logger import L
|
@@ -4,7 +4,10 @@ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
|
4
4
|
SEE COPYRIGHT NOTICE BELOW
|
5
5
|
"""
|
6
6
|
|
7
|
-
from logger_36.
|
7
|
+
from logger_36.extension.exception import ( # noqa
|
8
|
+
OverrideExceptionFormat,
|
9
|
+
ResetExceptionFormat,
|
10
|
+
)
|
8
11
|
|
9
12
|
"""
|
10
13
|
COPYRIGHT NOTICE
|
logger_36/api/handler.py
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
"""
|
2
|
+
Copyright CNRS/Inria/UniCA
|
3
|
+
Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
4
|
+
SEE COPYRIGHT NOTICE BELOW
|
5
|
+
"""
|
6
|
+
|
7
|
+
from logger_36.task.handling import ( # noqa
|
8
|
+
AddConsoleHandler,
|
9
|
+
AddFileHandler,
|
10
|
+
AddGenericHandler,
|
11
|
+
AddRichConsoleHandler,
|
12
|
+
)
|
13
|
+
|
14
|
+
"""
|
15
|
+
COPYRIGHT NOTICE
|
16
|
+
|
17
|
+
This software is governed by the CeCILL license under French law and
|
18
|
+
abiding by the rules of distribution of free software. You can use,
|
19
|
+
modify and/ or redistribute the software under the terms of the CeCILL
|
20
|
+
license as circulated by CEA, CNRS and INRIA at the following URL
|
21
|
+
"http://www.cecill.info".
|
22
|
+
|
23
|
+
As a counterpart to the access to the source code and rights to copy,
|
24
|
+
modify and redistribute granted by the license, users are provided only
|
25
|
+
with a limited warranty and the software's author, the holder of the
|
26
|
+
economic rights, and the successive licensors have only limited
|
27
|
+
liability.
|
28
|
+
|
29
|
+
In this respect, the user's attention is drawn to the risks associated
|
30
|
+
with loading, using, modifying and/or developing or reproducing the
|
31
|
+
software by the user in light of its specific status of free software,
|
32
|
+
that may mean that it is complicated to manipulate, and that also
|
33
|
+
therefore means that it is reserved for developers and experienced
|
34
|
+
professionals having in-depth computer knowledge. Users are therefore
|
35
|
+
encouraged to load and test the software's suitability as regards their
|
36
|
+
requirements in conditions enabling the security of their systems and/or
|
37
|
+
data to be ensured and, more generally, to use and operate it in the
|
38
|
+
same conditions as regards security.
|
39
|
+
|
40
|
+
The fact that you are presently reading this means that you have had
|
41
|
+
knowledge of the CeCILL license and that you accept its terms.
|
42
|
+
|
43
|
+
SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
|
44
|
+
|
45
|
+
This software is being developed by Eric Debreuve, a CNRS employee and
|
46
|
+
member of team Morpheme.
|
47
|
+
Team Morpheme is a joint team between Inria, CNRS, and UniCA.
|
48
|
+
It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
|
49
|
+
I3S, and Laboratory iBV.
|
50
|
+
|
51
|
+
CNRS: https://www.cnrs.fr/index.php/en
|
52
|
+
Inria: https://www.inria.fr/en/
|
53
|
+
UniCA: https://univ-cotedazur.eu/
|
54
|
+
Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
|
55
|
+
I3S: https://www.i3s.unice.fr/en/
|
56
|
+
iBV: http://ibv.unice.fr/
|
57
|
+
Team Morpheme: https://team.inria.fr/morpheme/
|
58
|
+
"""
|
logger_36/api/storage.py
CHANGED
logger_36/task/format/message.py
CHANGED
@@ -39,7 +39,12 @@ def MessageWithActualExpected(
|
|
39
39
|
else:
|
40
40
|
dot = ""
|
41
41
|
|
42
|
-
|
42
|
+
if isinstance(actual, type):
|
43
|
+
actual = actual.__name__
|
44
|
+
else:
|
45
|
+
actual = f"{actual}:{type(actual).__name__}"
|
46
|
+
|
47
|
+
return f"{message}: Actual={actual}; {expected}{dot}"
|
43
48
|
|
44
49
|
|
45
50
|
def _FormattedExpected(
|
@@ -54,14 +59,17 @@ def _FormattedExpected(
|
|
54
59
|
else:
|
55
60
|
expected = ", ".join(map(str, expected))
|
56
61
|
return f"Valid values: {expected}"
|
62
|
+
|
63
|
+
if isinstance(expected, type):
|
64
|
+
return f"Expected{operator}{expected.__name__}"
|
65
|
+
|
66
|
+
if operator == "=":
|
67
|
+
stripe = f":{type(expected).__name__}"
|
57
68
|
else:
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
if operator == ":":
|
63
|
-
operator = ": "
|
64
|
-
return f"Expected{operator}{expected}{stripe}"
|
69
|
+
stripe = ""
|
70
|
+
if operator == ":":
|
71
|
+
operator = ": "
|
72
|
+
return f"Expected{operator}{expected}{stripe}"
|
65
73
|
|
66
74
|
|
67
75
|
"""
|
logger_36/type/logger.py
CHANGED
@@ -40,10 +40,14 @@ from logger_36.constant.record import (
|
|
40
40
|
SHOW_W_RULE_ATTR,
|
41
41
|
STORE_MEMORY_ATTR,
|
42
42
|
)
|
43
|
-
from logger_36.exception import OverrideExceptionFormat
|
44
|
-
from logger_36.handler import AddConsoleHandler, AddFileHandler, AddRichConsoleHandler
|
43
|
+
from logger_36.extension.exception import OverrideExceptionFormat
|
45
44
|
from logger_36.task.format.message import MessageWithActualExpected
|
46
45
|
from logger_36.task.format.rule import RuleAsText
|
46
|
+
from logger_36.task.handling import (
|
47
|
+
AddConsoleHandler,
|
48
|
+
AddFileHandler,
|
49
|
+
AddRichConsoleHandler,
|
50
|
+
)
|
47
51
|
from logger_36.task.measure.chronos import ElapsedTime
|
48
52
|
from logger_36.task.measure.memory import CurrentUsage as CurrentMemoryUsage
|
49
53
|
from logger_36.type.issue import NewIssue, issue_t
|
@@ -111,6 +115,11 @@ class logger_t(base_t):
|
|
111
115
|
""""""
|
112
116
|
return self.staged_issues.__len__() > 0
|
113
117
|
|
118
|
+
@property
|
119
|
+
def n_staged_issues(self) -> int:
|
120
|
+
""""""
|
121
|
+
return self.staged_issues.__len__()
|
122
|
+
|
114
123
|
@property
|
115
124
|
def past_logs_as_HTML(self) -> str | None:
|
116
125
|
"""
|
@@ -497,6 +506,27 @@ class logger_t(base_t):
|
|
497
506
|
)
|
498
507
|
self.staged_issues.append(issue)
|
499
508
|
|
509
|
+
def PopIssues(self, /, *, should_remove_context: bool = False) -> list[str]:
|
510
|
+
""""""
|
511
|
+
if not self.has_staged_issues:
|
512
|
+
return []
|
513
|
+
|
514
|
+
output = []
|
515
|
+
|
516
|
+
if should_remove_context:
|
517
|
+
separator = ISSUE_CONTEXT_END
|
518
|
+
else:
|
519
|
+
separator = ISSUE_LEVEL_SEPARATOR
|
520
|
+
separator_length = separator.__len__()
|
521
|
+
for issue in self.staged_issues:
|
522
|
+
start_idx = issue.find(separator)
|
523
|
+
issue = issue[(start_idx + separator_length) :]
|
524
|
+
output.append(issue)
|
525
|
+
|
526
|
+
self.staged_issues.clear()
|
527
|
+
|
528
|
+
return output
|
529
|
+
|
500
530
|
def CommitIssues(
|
501
531
|
self,
|
502
532
|
/,
|
logger_36/version.py
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
logger_36/__init__.py,sha256=
|
2
|
-
logger_36/
|
3
|
-
logger_36/
|
4
|
-
logger_36/
|
5
|
-
logger_36/
|
6
|
-
logger_36/
|
7
|
-
logger_36/
|
8
|
-
logger_36/
|
9
|
-
logger_36/
|
10
|
-
logger_36/
|
11
|
-
logger_36/api/
|
12
|
-
logger_36/api/storage.py,sha256=v1iywLEItJCz18F_nJ20OnlpCpLdA-7EhlvqdLu42js,2243
|
1
|
+
logger_36/__init__.py,sha256=UhKxuQLS1Pfgt5H0K_7BaDAPejOUR8byD5BYRCnHQMQ,2655
|
2
|
+
logger_36/version.py,sha256=otEn_aRbss3NWUVceeYkCGHBJ2PQSQsj0GdECeVsuLo,2206
|
3
|
+
logger_36/api/content.py,sha256=clHYYUKa8n4qef6PVlUV4mFHRRf6fnm9wEd2fu9oagA,2381
|
4
|
+
logger_36/api/exception.py,sha256=QKIkNJA0N6FvVHLTApiH3ymhVQoSYU08t2RkyufQPIw,2291
|
5
|
+
logger_36/api/gpu.py,sha256=BOumedCAPWvCo7J-KJ3XE-jr5S0KSmgcFv_S4QKRPO8,2252
|
6
|
+
logger_36/api/handler.py,sha256=cM9bn4LDj4rtHKjzfBsTvsp-HYJMRd8Y7HSVNvVgudU,2323
|
7
|
+
logger_36/api/memory.py,sha256=szJVk4UTXsbYv3B-W9LFttf1F3j86GXHsKgEUOsXKl4,2743
|
8
|
+
logger_36/api/storage.py,sha256=t83D7Ge0ka7FCHUM8xchLsO_TMu0Bcc2IcBzw_gjkSA,2300
|
9
|
+
logger_36/api/system.py,sha256=cgOMF_OneYeIJDMbIbIDx96EZss2uAdkk8QofOC7O1U,2251
|
10
|
+
logger_36/api/time.py,sha256=Uw1jQtY1njsRuIPRAXX44v4nPOo84MSBu_WK_YCRzQs,2324
|
11
|
+
logger_36/api/type.py,sha256=4m5fZGI6LOQvFakEStFv6HTP4FY9nyFpNNlK34rCfQw,2286
|
13
12
|
logger_36/catalog/config/console_rich.py,sha256=lAa5Ev5BhXvmQzfIt1FNihMNUQJFlXaIzNanAMdgtd0,2861
|
14
13
|
logger_36/catalog/config/optional.py,sha256=HaN6mbx7gHBBppNvUw1ckhYTOrlYqb-b_r0mzPcHPjM,2398
|
15
14
|
logger_36/catalog/handler/console.py,sha256=13ygxLmsywdGlr9hV9guw7FuRD-dxlZX20d1Mn-pWKs,4206
|
@@ -34,21 +33,23 @@ logger_36/constant/message.py,sha256=Ys_CAyhENlT8Z3rr-AxO4hjdl1jLsKzVSPQ8wqLOCPQ
|
|
34
33
|
logger_36/constant/path.py,sha256=fKJn2vGj012BU5DFRetDFus_tKMty2q_WL0J2KrXdCo,2731
|
35
34
|
logger_36/constant/record.py,sha256=9Q28lVH_s0og4v74delgwIPAJ9G28I5rBM-brXcoY80,2308
|
36
35
|
logger_36/constant/system.py,sha256=G2mzBTxRXoJMxb53TnmBaceMJC_q3WonoCG7y6nC_R8,2430
|
36
|
+
logger_36/extension/exception.py,sha256=cKY5-AyaiRXqY6ZMyvRk8ZyvBJbNPn8ZoovSOZS2eQY,5383
|
37
37
|
logger_36/extension/html_.py,sha256=J9EX8-Rotq9i8bZ9U-dIpXv5gKLLnLmWqdDy4XayT1Q,3868
|
38
38
|
logger_36/instance/logger.py,sha256=oTw5svRzKRJKvGrrZUtutJIOjp5UISft3fl0Ze7DOBE,2241
|
39
39
|
logger_36/instance/loggers.py,sha256=RCWpC1NPAf6vXnFc9NqsSALv-x-FEzcH6k_OlxTxeQk,2251
|
40
|
+
logger_36/task/handling.py,sha256=fYc9L0RkMnlwKH_dSwOEeOV61D-L3zd-hxbPkzEvKbY,6303
|
40
41
|
logger_36/task/inspection.py,sha256=KZzmQyREQ6VmBWCLyNIYIOOISW9C_fC9TWTSX90zGDk,5019
|
41
42
|
logger_36/task/storage.py,sha256=T96JZT5Tmrt_-Kqf_WKweTvJYPX6lmPZZkJzCqyVPcI,3502
|
42
43
|
logger_36/task/format/memory.py,sha256=jpQS8tAdxy7GM_FzqEIJUU3m-6O9iX-jiyO7gx5YwR8,4266
|
43
|
-
logger_36/task/format/message.py,sha256=
|
44
|
+
logger_36/task/format/message.py,sha256=siQ3crsaw0846-lEKEC1bc29Exmxw7qMBdBF91fncpc,4028
|
44
45
|
logger_36/task/format/rule.py,sha256=vkf-HivFb4VqV2GeOPVqMAp99krtziI-kXhox3UVnzw,2873
|
45
46
|
logger_36/task/measure/chronos.py,sha256=1kVhu6jZlNAtNWQQh8ZVuRwZIAC9gGz3_ul1tn0t4Yw,3055
|
46
47
|
logger_36/task/measure/memory.py,sha256=OjU5EYFH8SnzlCQKAoiXvauUlwQYOrH34jFXTVYF0jE,2517
|
47
48
|
logger_36/type/handler.py,sha256=5g5KdmKk6cdsUSV0JoFfjpAXdQIzSRcW81STyLqqWq8,6824
|
48
49
|
logger_36/type/issue.py,sha256=2rGsFqaQJCbeml9xN08mN_nK79L8qscaS_0ws36Y0bI,3214
|
49
|
-
logger_36/type/logger.py,sha256=
|
50
|
+
logger_36/type/logger.py,sha256=0r2D6idyZJeH19MnCkTNQs2UQJpDOqYhkNulkWSzA4w,23549
|
50
51
|
logger_36/type/loggers.py,sha256=znqxWBnfQxvkg3VUfbTUvt3S6Kq0DAzWWepxQDt9suI,2871
|
51
|
-
logger_36-2025.
|
52
|
-
logger_36-2025.
|
53
|
-
logger_36-2025.
|
54
|
-
logger_36-2025.
|
52
|
+
logger_36-2025.12.dist-info/METADATA,sha256=C76uDmBqS_RO-DVr8d-lBkazvKtAe-2sHt2yg4viSx0,6506
|
53
|
+
logger_36-2025.12.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
54
|
+
logger_36-2025.12.dist-info/top_level.txt,sha256=sM95BTMWmslEEgR_1pzwZsOeSp8C_QBiu8ImbFr0XLc,10
|
55
|
+
logger_36-2025.12.dist-info/RECORD,,
|
File without changes
|
/logger_36/{gpu.py → api/gpu.py}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|