progress-table 3.0.1__tar.gz → 3.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: progress-table
3
- Version: 3.0.1
3
+ Version: 3.0.2
4
4
  Summary: Display progress as a pretty table in the command line.
5
5
  Project-URL: Home, https://github.com/gahaalt/progress-table
6
6
  Project-URL: Documentation, https://github.com/sjmikler/progress-table/blob/main/docs
@@ -45,11 +45,11 @@ Lightweight utility to display the progress of your process as a pretty table in
45
45
 
46
46
  ### Change this:
47
47
 
48
- ![example](images/progress-before3.gif)
48
+ ![example](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/progress-before3.gif)
49
49
 
50
50
  ### Into this:
51
51
 
52
- ![example](images/progress-after4.gif)
52
+ ![example](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/progress-after4.gif)
53
53
 
54
54
  ## Examples
55
55
 
@@ -57,19 +57,19 @@ From `examples/` directory:
57
57
 
58
58
  * Neural network training
59
59
 
60
- ![example-training](images/examples-training.gif)
60
+ ![example-training](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-training.gif)
61
61
 
62
62
  * Progress of multi-threaded downloads
63
63
 
64
- ![example-download](images/examples-download.gif)
64
+ ![example-download](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-download.gif)
65
65
 
66
66
  * Simulation and interactive display of Brownian motion
67
67
 
68
- ![example-brown2d](images/examples-brown2d.gif)
68
+ ![example-brown2d](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-brown2d.gif)
69
69
 
70
70
  * Display of a game board
71
71
 
72
- ![example-tictactoe](images/examples-tictactoe.gif)
72
+ ![example-tictactoe](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-tictactoe.gif)
73
73
 
74
74
  ## Quick start code
75
75
 
@@ -110,12 +110,12 @@ table.close()
110
110
 
111
111
  ```
112
112
 
113
- > Go to [integrations](docs/integrations.md)
113
+ > Go to [integrations](https://github.com/sjmikler/progress-table/blob/main/docs//integrations.md)
114
114
  > page to see examples of integration with deep learning libraries.
115
115
 
116
116
  ## Advanced usage
117
117
 
118
- Go to [advanced usage](docs/advanced-usage.md) page for more information.
118
+ Go to [advanced usage](https://github.com/sjmikler/progress-table/blob/main/docs//advanced-usage.md) page for more information.
119
119
 
120
120
  ## Troubleshooting
121
121
 
@@ -0,0 +1,132 @@
1
+ > Version 2.x.x introduces new features and new interactive modes.
2
+ >
3
+ > Version 3.x.x improves compatibility and stability.
4
+ >
5
+ > New features allow for previously impossible applications, see examples below.
6
+
7
+ # Progress Table
8
+
9
+ [![PyPi version](https://img.shields.io/badge/dynamic/json?label=latest&query=info.version&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fprogress-table%2Fjson)](https://pypi.org/project/progress-table)
10
+ [![PyPI license](https://img.shields.io/badge/dynamic/json?label=license&query=info.license&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fprogress-table%2Fjson)](https://pypi.org/project/progress-table)
11
+
12
+ Lightweight utility to display the progress of your process as a pretty table in the command line.
13
+
14
+ * Alternative to TQDM whenever you want to track metrics produced by your process
15
+ * Designed to monitor ML experiments, but works for any metrics-producing process
16
+ * Allows you to see at a glance what's going on with your process
17
+ * Increases readability and simplifies your command line logging
18
+
19
+ ### Change this:
20
+
21
+ ![example](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/progress-before3.gif)
22
+
23
+ ### Into this:
24
+
25
+ ![example](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/progress-after4.gif)
26
+
27
+ ## Examples
28
+
29
+ From `examples/` directory:
30
+
31
+ * Neural network training
32
+
33
+ ![example-training](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-training.gif)
34
+
35
+ * Progress of multi-threaded downloads
36
+
37
+ ![example-download](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-download.gif)
38
+
39
+ * Simulation and interactive display of Brownian motion
40
+
41
+ ![example-brown2d](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-brown2d.gif)
42
+
43
+ * Display of a game board
44
+
45
+ ![example-tictactoe](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-tictactoe.gif)
46
+
47
+ ## Quick start code
48
+
49
+ ```python
50
+ import random
51
+ import time
52
+
53
+ from progress_table import ProgressTable
54
+
55
+ # Create table object:
56
+ table = ProgressTable(num_decimal_places=1)
57
+
58
+ # You can (optionally) define the columns at the beginning
59
+ table.add_column("x", color="bold red")
60
+
61
+ for step in range(10):
62
+ x = random.randint(0, 200)
63
+
64
+ # You can add entries in a compact way
65
+ table["x"] = x
66
+
67
+ # Or you can use the update method
68
+ table.update("x", value=x, weight=1.0)
69
+
70
+ # Display the progress bar by wrapping an iterator or an integer
71
+ for _ in table(10): # -> Equivalent to `table(range(10))`
72
+ # Set and get values from the table
73
+ table["y"] = random.randint(0, 200)
74
+ table["x-y"] = table["x"] - table["y"]
75
+ table.update("average x-y", value=table["x-y"], weight=1.0, aggregate="mean")
76
+ time.sleep(0.1)
77
+
78
+ # Go to the next row when you're ready
79
+ table.next_row()
80
+
81
+ # Close the table when it's finished
82
+ table.close()
83
+
84
+ ```
85
+
86
+ > Go to [integrations](https://github.com/sjmikler/progress-table/blob/main/docs//integrations.md)
87
+ > page to see examples of integration with deep learning libraries.
88
+
89
+ ## Advanced usage
90
+
91
+ Go to [advanced usage](https://github.com/sjmikler/progress-table/blob/main/docs//advanced-usage.md) page for more information.
92
+
93
+ ## Troubleshooting
94
+
95
+ ### Exceesive output
96
+
97
+ Progress Table works correctly in most consoles, but there are some exceptions:
98
+
99
+ * Some cloud logging consoles (e.g. kubernetes) don't support `\r` properly. You can still use ProgressTable, but with `interactive=0` option. This mode will not display progress bars.
100
+
101
+ * Some consoles like 'PyCharm Python Console' or 'IDLE' don't support cursor movement. You can still use ProgressTable, but with `interactive=1` option. In this mode, you can display only a single progress bar.
102
+
103
+ > By default `interactive=2`. You can change the default 'interactive' with an argument when creating the table object or by setting 'PTABLE_INTERACTIVE' environment variable, e.g. `PTABLE_INTERACTIVE=1`.
104
+
105
+ ### Other problems
106
+
107
+ If you encounter different messy outputs or other unexpected behavior: please create an issue!
108
+
109
+ ## Installation
110
+
111
+ Install Progress Table easily with pip:
112
+
113
+ ```
114
+ pip install progress-table
115
+ ```
116
+
117
+ ## Links
118
+
119
+ * [See on GitHub](https://github.com/gahaalt/progress-table)
120
+ * [See on PyPI](https://pypi.org/project/progress-table)
121
+
122
+ ## Alternatives
123
+
124
+ * Progress bars: great for tracking progress, but they don't provide ways to display data in clear and compact way
125
+ * `tqdm`
126
+ * `rich.progress`
127
+ * `keras.utils.Progbar`
128
+
129
+ * Libraries displaying data: great for presenting tabular data, but they lack the progress tracking aspect
130
+ * `rich.table`
131
+ * `tabulate`
132
+ * `texttable`
@@ -10,7 +10,7 @@ Supported features:
10
10
  """
11
11
 
12
12
  __license__ = "MIT"
13
- __version__ = "3.0.1"
13
+ __version__ = "3.0.2"
14
14
  __author__ = "Szymon Mikler"
15
15
 
16
16
  from progress_table.progress_table import ProgressTable, styles
@@ -41,9 +41,10 @@ include = ["progress_table", "README.md"]
41
41
  [tool.hatch.build.targets.wheel]
42
42
  packages = ["progress_table"]
43
43
 
44
- [tool.hatch.build.hooks.custom]
44
+ [tool.hatch.metadata.hooks.custom]
45
45
  path = "hooks.py"
46
46
 
47
+
47
48
  # %%
48
49
 
49
50
  [tool.pyright]
File without changes