halib 0.1.46__py3-none-any.whl → 0.1.47__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.
- halib/__init__.py +3 -2
- halib/common.py +13 -1
- {halib-0.1.46.dist-info → halib-0.1.47.dist-info}/METADATA +4 -1
- {halib-0.1.46.dist-info → halib-0.1.47.dist-info}/RECORD +7 -7
- {halib-0.1.46.dist-info → halib-0.1.47.dist-info}/LICENSE.txt +0 -0
- {halib-0.1.46.dist-info → halib-0.1.47.dist-info}/WHEEL +0 -0
- {halib-0.1.46.dist-info → halib-0.1.47.dist-info}/top_level.txt +0 -0
halib/__init__.py
CHANGED
@@ -20,6 +20,7 @@ __all__ = [
|
|
20
20
|
"pd",
|
21
21
|
"plt",
|
22
22
|
"pprint",
|
23
|
+
"pprint_box",
|
23
24
|
"px",
|
24
25
|
"rcolor_all_str",
|
25
26
|
"rcolor_palette_all",
|
@@ -32,7 +33,7 @@ __all__ = [
|
|
32
33
|
"timebudget",
|
33
34
|
"tqdm",
|
34
35
|
"warnings",
|
35
|
-
"time"
|
36
|
+
"time",
|
36
37
|
]
|
37
38
|
import warnings
|
38
39
|
warnings.filterwarnings("ignore", message="Unable to import Axes3D")
|
@@ -53,7 +54,7 @@ from .system import cmd
|
|
53
54
|
from .system import filesys as fs
|
54
55
|
from .filetype import csvfile
|
55
56
|
from .cuda import tcuda
|
56
|
-
from .common import console, console_log, ConsoleLog, now_str, norm_str
|
57
|
+
from .common import console, console_log, ConsoleLog, now_str, norm_str, pprint_box
|
57
58
|
|
58
59
|
# for log
|
59
60
|
from loguru import logger
|
halib/common.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
import arrow
|
2
2
|
import re
|
3
3
|
from rich.console import Console
|
4
|
-
from rich.pretty import pprint
|
4
|
+
from rich.pretty import pprint, Pretty
|
5
|
+
from rich.panel import Panel
|
6
|
+
import rich
|
5
7
|
|
6
8
|
console = Console()
|
7
9
|
|
@@ -43,6 +45,16 @@ def norm_str(in_str):
|
|
43
45
|
norm_string = norm_string.strip()
|
44
46
|
return norm_string
|
45
47
|
|
48
|
+
|
49
|
+
def pprint_box(obj, title="", border_style="green"):
|
50
|
+
"""
|
51
|
+
Pretty print an object in a box.
|
52
|
+
"""
|
53
|
+
rich.print(
|
54
|
+
Panel(Pretty(obj, expand_all=True), title=title, border_style=border_style)
|
55
|
+
)
|
56
|
+
|
57
|
+
|
46
58
|
def console_rule(msg, do_norm_msg=True, is_end_tag=False):
|
47
59
|
msg = norm_str(msg) if do_norm_msg else msg
|
48
60
|
if is_end_tag:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: halib
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.47
|
4
4
|
Summary: Small library for common tasks
|
5
5
|
Author: Hoang Van Ha
|
6
6
|
Author-email: hoangvanhauit@gmail.com
|
@@ -43,6 +43,9 @@ Requires-Dist: tube-dl
|
|
43
43
|
|
44
44
|
Helper package for coding and automation
|
45
45
|
|
46
|
+
**Version 0.1.47**
|
47
|
+
+ add `pprint_box` to print object/string in a box frame (like in `inspect`)
|
48
|
+
|
46
49
|
**Version 0.1.46**
|
47
50
|
+ filter the warning message of `UserWarning: Unable to import Axes3D.`
|
48
51
|
+ auto_wrap_text for `fn_display_df` to avoid long text in the table
|
@@ -1,5 +1,5 @@
|
|
1
|
-
halib/__init__.py,sha256=
|
2
|
-
halib/common.py,sha256=
|
1
|
+
halib/__init__.py,sha256=r3xoKNX_4QxzC7MsdSXRZSge29xBI5LdMwNouzf3xv8,1543
|
2
|
+
halib/common.py,sha256=bR0MPbUmsBhLdu5LMRr-dnf6XG8iyjLEJsVxT_q-qKw,2315
|
3
3
|
halib/csvfile.py,sha256=Eoeni0NIbNG3mB5ESWAvNwhJxOjmCaPd1qqYRHImbvk,1567
|
4
4
|
halib/cuda.py,sha256=1bvtBY8QvTWdLaxalzK9wqXPl0Ft3AfhcrebupxGzEA,1010
|
5
5
|
halib/dataset.py,sha256=QU0Hr5QFb8_XlvnOMgC9QJGIpwXAZ9lDd0RdQi_QRec,6743
|
@@ -33,8 +33,8 @@ halib/sys/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
|
|
33
33
|
halib/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
34
|
halib/system/cmd.py,sha256=b2x7JPcNnFjLGheIESVYvqAb-w2UwBM1PAwYxMZ5YjA,228
|
35
35
|
halib/system/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
|
36
|
-
halib-0.1.
|
37
|
-
halib-0.1.
|
38
|
-
halib-0.1.
|
39
|
-
halib-0.1.
|
40
|
-
halib-0.1.
|
36
|
+
halib-0.1.47.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
|
37
|
+
halib-0.1.47.dist-info/METADATA,sha256=GsAawspTV3gRGBKKkxsSuTG9IlkE2cAIj3GzdlCNE68,3823
|
38
|
+
halib-0.1.47.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
39
|
+
halib-0.1.47.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
|
40
|
+
halib-0.1.47.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|