halib 0.1.49__tar.gz → 0.1.51__tar.gz

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.
Files changed (44) hide show
  1. halib-0.1.51/MANIFEST.in +3 -0
  2. {halib-0.1.49/halib.egg-info → halib-0.1.51}/PKG-INFO +12 -31
  3. {halib-0.1.49 → halib-0.1.51}/README.md +7 -1
  4. {halib-0.1.49 → halib-0.1.51}/halib/__init__.py +12 -1
  5. {halib-0.1.49 → halib-0.1.51}/halib/common.py +25 -5
  6. halib-0.1.51/halib/research/perftb.py +757 -0
  7. {halib-0.1.49 → halib-0.1.51/halib.egg-info}/PKG-INFO +12 -31
  8. {halib-0.1.49 → halib-0.1.51}/halib.egg-info/SOURCES.txt +3 -4
  9. {halib-0.1.49 → halib-0.1.51}/setup.py +1 -1
  10. halib-0.1.49/halib/research/benchquery.py +0 -131
  11. halib-0.1.49/test/test15.py +0 -14
  12. halib-0.1.49/test/test_df_creator.py +0 -60
  13. {halib-0.1.49 → halib-0.1.51}/.gitignore +0 -0
  14. {halib-0.1.49 → halib-0.1.51}/GDriveFolder.txt +0 -0
  15. {halib-0.1.49 → halib-0.1.51}/LICENSE.txt +0 -0
  16. {halib-0.1.49 → halib-0.1.51}/guide_publish_pip.pdf +0 -0
  17. {halib-0.1.49 → halib-0.1.51}/halib/cuda.py +0 -0
  18. {halib-0.1.49 → halib-0.1.51}/halib/filetype/__init__.py +0 -0
  19. {halib-0.1.49 → halib-0.1.51}/halib/filetype/csvfile.py +0 -0
  20. {halib-0.1.49 → halib-0.1.51}/halib/filetype/jsonfile.py +0 -0
  21. {halib-0.1.49 → halib-0.1.51}/halib/filetype/textfile.py +0 -0
  22. {halib-0.1.49 → halib-0.1.51}/halib/filetype/videofile.py +0 -0
  23. {halib-0.1.49 → halib-0.1.51}/halib/filetype/yamlfile.py +0 -0
  24. {halib-0.1.49 → halib-0.1.51}/halib/online/__init__.py +0 -0
  25. {halib-0.1.49 → halib-0.1.51}/halib/online/gdrive.py +0 -0
  26. {halib-0.1.49 → halib-0.1.51}/halib/online/gdrive_mkdir.py +0 -0
  27. {halib-0.1.49 → halib-0.1.51}/halib/online/gdrive_test.py +0 -0
  28. {halib-0.1.49 → halib-0.1.51}/halib/online/projectmake.py +0 -0
  29. {halib-0.1.49 → halib-0.1.51}/halib/research/__init__.py +0 -0
  30. {halib-0.1.49 → halib-0.1.51}/halib/research/dataset.py +0 -0
  31. {halib-0.1.49 → halib-0.1.51}/halib/research/plot.py +0 -0
  32. {halib-0.1.49 → halib-0.1.51}/halib/research/torchloader.py +0 -0
  33. {halib-0.1.49 → halib-0.1.51}/halib/research/wandb_op.py +0 -0
  34. {halib-0.1.49 → halib-0.1.51}/halib/rich_color.py +0 -0
  35. {halib-0.1.49 → halib-0.1.51}/halib/system/__init__.py +0 -0
  36. {halib-0.1.49 → halib-0.1.51}/halib/system/cmd.py +0 -0
  37. {halib-0.1.49 → halib-0.1.51}/halib/system/filesys.py +0 -0
  38. {halib-0.1.49 → halib-0.1.51}/halib/utils/__init__.py +0 -0
  39. {halib-0.1.49 → halib-0.1.51}/halib/utils/listop.py +0 -0
  40. {halib-0.1.49 → halib-0.1.51}/halib/utils/tele_noti.py +0 -0
  41. {halib-0.1.49 → halib-0.1.51}/halib.egg-info/dependency_links.txt +0 -0
  42. {halib-0.1.49 → halib-0.1.51}/halib.egg-info/requires.txt +0 -0
  43. {halib-0.1.49 → halib-0.1.51}/halib.egg-info/top_level.txt +0 -0
  44. {halib-0.1.49 → halib-0.1.51}/setup.cfg +0 -0
@@ -0,0 +1,3 @@
1
+ prune _archived
2
+ prune test
3
+ prune zout
@@ -1,48 +1,27 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: halib
3
- Version: 0.1.49
3
+ Version: 0.1.51
4
4
  Summary: Small library for common tasks
5
5
  Author: Hoang Van Ha
6
6
  Author-email: hoangvanhauit@gmail.com
7
+ License: UNKNOWN
8
+ Platform: UNKNOWN
7
9
  Classifier: Programming Language :: Python :: 3
8
10
  Classifier: License :: OSI Approved :: MIT License
9
11
  Classifier: Operating System :: OS Independent
10
12
  Requires-Python: >=3.8
11
13
  Description-Content-Type: text/markdown
12
14
  License-File: LICENSE.txt
13
- Requires-Dist: arrow
14
- Requires-Dist: click
15
- Requires-Dist: enlighten
16
- Requires-Dist: kaleido==0.1.*
17
- Requires-Dist: loguru
18
- Requires-Dist: more-itertools
19
- Requires-Dist: moviepy
20
- Requires-Dist: networkx
21
- Requires-Dist: numpy
22
- Requires-Dist: omegaconf
23
- Requires-Dist: opencv-python
24
- Requires-Dist: pandas
25
- Requires-Dist: Pillow
26
- Requires-Dist: Pyarrow
27
- Requires-Dist: pycurl
28
- Requires-Dist: python-telegram-bot
29
- Requires-Dist: requests
30
- Requires-Dist: rich
31
- Requires-Dist: scikit-learn
32
- Requires-Dist: matplotlib
33
- Requires-Dist: seaborn
34
- Requires-Dist: plotly
35
- Requires-Dist: pygwalker
36
- Requires-Dist: tabulate
37
- Requires-Dist: itables
38
- Requires-Dist: timebudget
39
- Requires-Dist: tqdm
40
- Requires-Dist: tube_dl
41
- Requires-Dist: wandb
42
15
 
43
16
  Helper package for coding and automation
44
17
 
45
- **Version 0.1.49**
18
+ **Version 0.1.51**
19
+
20
+ + add `research/perftb` module to allow creating and managing performance tables for experiments, including filtering by datasets, metrics, and experiments.
21
+
22
+ **Version 0.1.50**
23
+
24
+ + add `pprint_local_path` to print local path (file/directory) in clickable link (as file URI)
46
25
 
47
26
  + add `research` package to help with research tasks, including `benchquery` for benchmarking queries from dataframe
48
27
  + add `wandb` module to allow easy sync offline data to Weights & Biases (wandb) and batch clear wandb runs.
@@ -154,3 +133,5 @@ New Features
154
133
  New Features
155
134
 
156
135
  + add support to upload local to google drive.
136
+
137
+
@@ -1,6 +1,12 @@
1
1
  Helper package for coding and automation
2
2
 
3
- **Version 0.1.49**
3
+ **Version 0.1.51**
4
+
5
+ + add `research/perftb` module to allow creating and managing performance tables for experiments, including filtering by datasets, metrics, and experiments.
6
+
7
+ **Version 0.1.50**
8
+
9
+ + add `pprint_local_path` to print local path (file/directory) in clickable link (as file URI)
4
10
 
5
11
  + add `research` package to help with research tasks, including `benchquery` for benchmarking queries from dataframe
6
12
  + add `wandb` module to allow easy sync offline data to Weights & Biases (wandb) and batch clear wandb runs.
@@ -21,7 +21,9 @@ __all__ = [
21
21
  "plt",
22
22
  "pprint",
23
23
  "pprint_box",
24
+ "pprint_local_path",
24
25
  "px",
26
+ "pprint_local_path",
25
27
  "rcolor_all_str",
26
28
  "rcolor_palette_all",
27
29
  "rcolor_palette",
@@ -36,6 +38,7 @@ __all__ = [
36
38
  "time",
37
39
  ]
38
40
  import warnings
41
+
39
42
  warnings.filterwarnings("ignore", message="Unable to import Axes3D")
40
43
 
41
44
  # common libraries
@@ -54,7 +57,15 @@ from .system import cmd
54
57
  from .system import filesys as fs
55
58
  from .filetype import csvfile
56
59
  from .cuda import tcuda
57
- from .common import console, console_log, ConsoleLog, now_str, norm_str, pprint_box
60
+ from .common import (
61
+ console,
62
+ console_log,
63
+ ConsoleLog,
64
+ now_str,
65
+ norm_str,
66
+ pprint_box,
67
+ pprint_local_path,
68
+ )
58
69
 
59
70
  # for log
60
71
  from loguru import logger
@@ -1,13 +1,17 @@
1
- import arrow
2
1
  import re
2
+ import rich
3
+ import arrow
4
+ import pathlib
5
+ from pathlib import Path
6
+ import urllib.parse
7
+
8
+ from rich import print
9
+ from rich.panel import Panel
3
10
  from rich.console import Console
4
11
  from rich.pretty import pprint, Pretty
5
- from rich.panel import Panel
6
- import rich
7
12
 
8
13
  console = Console()
9
14
 
10
-
11
15
  def seed_everything(seed=42):
12
16
  import random
13
17
  import numpy as np
@@ -54,7 +58,6 @@ def pprint_box(obj, title="", border_style="green"):
54
58
  Panel(Pretty(obj, expand_all=True), title=title, border_style=border_style)
55
59
  )
56
60
 
57
-
58
61
  def console_rule(msg, do_norm_msg=True, is_end_tag=False):
59
62
  msg = norm_str(msg) if do_norm_msg else msg
60
63
  if is_end_tag:
@@ -86,3 +89,20 @@ class ConsoleLog:
86
89
  if exc_type is not None:
87
90
  print(f"An exception of type {exc_type} occurred.")
88
91
  print(f"Exception message: {exc_value}")
92
+
93
+
94
+ def pprint_local_path(local_path, tag=""):
95
+ # Create a file URI
96
+ file_path = Path(local_path).resolve()
97
+ is_file = file_path.is_file()
98
+ is_dir = file_path.is_dir()
99
+ type_str = "📄" if is_file else "📁" if is_dir else "❓"
100
+ file_uri = file_path.as_uri()
101
+ content_str = f"{type_str} [link={file_uri}]{file_uri}[/link]"
102
+ if isinstance(tag, str) and len(tag) > 0:
103
+ with ConsoleLog(tag):
104
+ console.print(content_str)
105
+ else:
106
+ # If tag is not provided, just print the link
107
+ console.print(f"{content_str}")
108
+ return file_uri