progress-table 1.3.2__tar.gz → 2.0.0__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 (26) hide show
  1. progress-table-2.0.0/PKG-INFO +147 -0
  2. progress-table-2.0.0/README.md +126 -0
  3. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table/__init__.py +3 -2
  4. progress-table-2.0.0/progress_table/v1/progress_table.py +1094 -0
  5. progress-table-2.0.0/progress_table/v1/styles.py +250 -0
  6. progress-table-2.0.0/progress_table.egg-info/PKG-INFO +147 -0
  7. {progress-table-1.3.2 → progress-table-2.0.0}/tests/test_examples_automated.py +11 -12
  8. progress-table-1.3.2/PKG-INFO +0 -152
  9. progress-table-1.3.2/README.md +0 -131
  10. progress-table-1.3.2/progress_table/v1/progress_table.py +0 -717
  11. progress-table-1.3.2/progress_table/v1/styles.py +0 -155
  12. progress-table-1.3.2/progress_table.egg-info/PKG-INFO +0 -152
  13. {progress-table-1.3.2 → progress-table-2.0.0}/LICENSE.txt +0 -0
  14. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table/v0/__init__.py +0 -0
  15. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table/v0/progress_table.py +0 -0
  16. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table/v0/symbols.py +0 -0
  17. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table/v1/__init__.py +0 -0
  18. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table.egg-info/PKG-INFO.sync-conflict-20240314-015933-NXTV2IO +0 -0
  19. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table.egg-info/SOURCES.txt +0 -0
  20. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table.egg-info/dependency_links.txt +0 -0
  21. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table.egg-info/requires.txt +0 -0
  22. {progress-table-1.3.2 → progress-table-2.0.0}/progress_table.egg-info/top_level.txt +0 -0
  23. {progress-table-1.3.2 → progress-table-2.0.0}/pyproject.toml +0 -0
  24. {progress-table-1.3.2 → progress-table-2.0.0}/setup.cfg +0 -0
  25. {progress-table-1.3.2 → progress-table-2.0.0}/setup.py +0 -0
  26. {progress-table-1.3.2 → progress-table-2.0.0}/tests/test_docs_automated.py +0 -0
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.1
2
+ Name: progress-table
3
+ Version: 2.0.0
4
+ Summary: Display progress as a pretty table in the command line.
5
+ Home-page: https://github.com/gahaalt/progress-table.git
6
+ Author: Szymon Mikler
7
+ Author-email: sjmikler@gmail.com
8
+ License: MIT
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.7
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE.txt
20
+ Requires-Dist: colorama
21
+
22
+ > Version 2.X introduces new features and new interactive modes.
23
+ >
24
+ > New features allow for previously impossible applications, see examples below.
25
+
26
+ # Progress Table
27
+
28
+ [![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)
29
+ [![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)
30
+
31
+ Lightweight utility to display the progress of your process as a pretty table in the command line.
32
+
33
+ * Alternative to TQDM whenever you want to track metrics produced by your process
34
+ * Designed to monitor ML experiments, but works for any metrics-producing process
35
+ * Allows you to see at a glance what's going on with your process
36
+ * Increases readability and simplifies your command line logging
37
+
38
+ ### Change this:
39
+
40
+ ![example](https://github.com/gahaalt/progress-table/blob/main/images/progress-before3.gif?raw=true)
41
+
42
+ ### Into this:
43
+
44
+ ![example](https://github.com/gahaalt/progress-table/blob/main/images/progress-after4.gif?raw=true)
45
+
46
+ ## Examples
47
+
48
+ * Neural network training
49
+
50
+ ![example-training](images/examples-training.gif)
51
+
52
+ * Progress of multi-threaded downloads
53
+
54
+ ![example-download](images/examples-download.gif)
55
+
56
+ * Simulation and interactive display of Brownian motion
57
+
58
+ ![example-brown2d](images/examples-brown2d.gif)
59
+
60
+ * Display of a game board
61
+
62
+ ![example-tictactoe](images/examples-tictactoe.gif)
63
+
64
+ ## Quick start code
65
+
66
+ ```python
67
+ import random
68
+ import time
69
+
70
+ from progress_table import ProgressTable
71
+
72
+ # Create table object:
73
+ table = ProgressTable(num_decimal_places=1)
74
+
75
+ # You can (optionally) define the columns at the beginning
76
+ table.add_column("x", color="bold red")
77
+
78
+ for step in range(10):
79
+ x = random.randint(0, 200)
80
+
81
+ # You can add entries in a compact way
82
+ table["x"] = x
83
+
84
+ # Or you can use the update method
85
+ table.update("x", value=x, weight=1.0)
86
+
87
+ # Display the progress bar by wrapping an iterator or an integer
88
+ for _ in table(10): # -> Equivalent to `table(range(10))`
89
+ # Set and get values from the table
90
+ table["y"] = random.randint(0, 200)
91
+ table["x-y"] = table["x"] - table["y"]
92
+ table.update("average x-y", value=table["x-y"], weight=1.0, aggregate="mean")
93
+ time.sleep(0.1)
94
+
95
+ # Go to the next row when you're ready
96
+ table.next_row()
97
+
98
+ # Close the table when it's finished
99
+ table.close()
100
+
101
+ ```
102
+
103
+ > Go to [integrations](https://github.com/sjmikler/progress-table/blob/main/docs/integrations.md)
104
+ > page to see examples of integration with deep learning libraries.
105
+
106
+ ## Advanced usage
107
+
108
+ Go to [advanced usage](https://github.com/sjmikler/progress-table/blob/main/docs/advanced-usage.md) page for more information.
109
+
110
+ ## Troubleshooting
111
+
112
+ ### Exceesive output
113
+
114
+ Progress Table works correctly in most consoles, but there are some exceptions:
115
+
116
+ * Some cloud logging consoles (e.g. kubernetes) don't support `\r` properly.
117
+ You can still use ProgressTable, but with `interactive=0` option. This mode will not display progress bars.
118
+ * Some consoles like `PyCharm Python Console` or `IDLE` don't support cursor movement.
119
+ You can still use ProgressTable, but with `interactive=1` option. This mode displays only 1 progress bar at once.
120
+
121
+ > By default `interactive=2`. You can change the default `interactive` by
122
+ > setting `PTABLE_INTERACTIVE` environment variable, e.g. `PTABLE_INTERACTIVE=1`.
123
+
124
+ ## Installation
125
+
126
+ Install Progress Table easily with pip:
127
+
128
+ ```
129
+ pip install progress-table
130
+ ```
131
+
132
+ ## Links
133
+
134
+ * [See on GitHub](https://github.com/gahaalt/progress-table)
135
+ * [See on PyPI](https://pypi.org/project/progress-table)
136
+
137
+ ## Alternatives
138
+
139
+ * Progress bars: great for tracking progress, but they don't provide ways to display data in clear and compact way
140
+ * `tqdm`
141
+ * `rich.progress`
142
+ * `keras.utils.Progbar`
143
+
144
+ * Libraries displaying data: great for presenting tabular data, but they lack the progress tracking aspect
145
+ * `rich.table`
146
+ * `tabulate`
147
+ * `texttable`
@@ -0,0 +1,126 @@
1
+ > Version 2.X introduces new features and new interactive modes.
2
+ >
3
+ > New features allow for previously impossible applications, see examples below.
4
+
5
+ # Progress Table
6
+
7
+ [![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)
8
+ [![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)
9
+
10
+ Lightweight utility to display the progress of your process as a pretty table in the command line.
11
+
12
+ * Alternative to TQDM whenever you want to track metrics produced by your process
13
+ * Designed to monitor ML experiments, but works for any metrics-producing process
14
+ * Allows you to see at a glance what's going on with your process
15
+ * Increases readability and simplifies your command line logging
16
+
17
+ ### Change this:
18
+
19
+ ![example](https://github.com/gahaalt/progress-table/blob/main/images/progress-before3.gif?raw=true)
20
+
21
+ ### Into this:
22
+
23
+ ![example](https://github.com/gahaalt/progress-table/blob/main/images/progress-after4.gif?raw=true)
24
+
25
+ ## Examples
26
+
27
+ * Neural network training
28
+
29
+ ![example-training](images/examples-training.gif)
30
+
31
+ * Progress of multi-threaded downloads
32
+
33
+ ![example-download](images/examples-download.gif)
34
+
35
+ * Simulation and interactive display of Brownian motion
36
+
37
+ ![example-brown2d](images/examples-brown2d.gif)
38
+
39
+ * Display of a game board
40
+
41
+ ![example-tictactoe](images/examples-tictactoe.gif)
42
+
43
+ ## Quick start code
44
+
45
+ ```python
46
+ import random
47
+ import time
48
+
49
+ from progress_table import ProgressTable
50
+
51
+ # Create table object:
52
+ table = ProgressTable(num_decimal_places=1)
53
+
54
+ # You can (optionally) define the columns at the beginning
55
+ table.add_column("x", color="bold red")
56
+
57
+ for step in range(10):
58
+ x = random.randint(0, 200)
59
+
60
+ # You can add entries in a compact way
61
+ table["x"] = x
62
+
63
+ # Or you can use the update method
64
+ table.update("x", value=x, weight=1.0)
65
+
66
+ # Display the progress bar by wrapping an iterator or an integer
67
+ for _ in table(10): # -> Equivalent to `table(range(10))`
68
+ # Set and get values from the table
69
+ table["y"] = random.randint(0, 200)
70
+ table["x-y"] = table["x"] - table["y"]
71
+ table.update("average x-y", value=table["x-y"], weight=1.0, aggregate="mean")
72
+ time.sleep(0.1)
73
+
74
+ # Go to the next row when you're ready
75
+ table.next_row()
76
+
77
+ # Close the table when it's finished
78
+ table.close()
79
+
80
+ ```
81
+
82
+ > Go to [integrations](https://github.com/sjmikler/progress-table/blob/main/docs/integrations.md)
83
+ > page to see examples of integration with deep learning libraries.
84
+
85
+ ## Advanced usage
86
+
87
+ Go to [advanced usage](https://github.com/sjmikler/progress-table/blob/main/docs/advanced-usage.md) page for more information.
88
+
89
+ ## Troubleshooting
90
+
91
+ ### Exceesive output
92
+
93
+ Progress Table works correctly in most consoles, but there are some exceptions:
94
+
95
+ * Some cloud logging consoles (e.g. kubernetes) don't support `\r` properly.
96
+ You can still use ProgressTable, but with `interactive=0` option. This mode will not display progress bars.
97
+ * Some consoles like `PyCharm Python Console` or `IDLE` don't support cursor movement.
98
+ You can still use ProgressTable, but with `interactive=1` option. This mode displays only 1 progress bar at once.
99
+
100
+ > By default `interactive=2`. You can change the default `interactive` by
101
+ > setting `PTABLE_INTERACTIVE` environment variable, e.g. `PTABLE_INTERACTIVE=1`.
102
+
103
+ ## Installation
104
+
105
+ Install Progress Table easily with pip:
106
+
107
+ ```
108
+ pip install progress-table
109
+ ```
110
+
111
+ ## Links
112
+
113
+ * [See on GitHub](https://github.com/gahaalt/progress-table)
114
+ * [See on PyPI](https://pypi.org/project/progress-table)
115
+
116
+ ## Alternatives
117
+
118
+ * Progress bars: great for tracking progress, but they don't provide ways to display data in clear and compact way
119
+ * `tqdm`
120
+ * `rich.progress`
121
+ * `keras.utils.Progbar`
122
+
123
+ * Libraries displaying data: great for presenting tabular data, but they lack the progress tracking aspect
124
+ * `rich.table`
125
+ * `tabulate`
126
+ * `texttable`
@@ -1,10 +1,11 @@
1
1
  # Copyright (c) 2022-2024 Szymon Mikler
2
2
 
3
- __version__ = "1.3.2"
3
+ __version__ = "2.0.0"
4
4
 
5
5
  from progress_table.v0.progress_table import ProgressTableV0
6
+ from progress_table.v1 import styles
6
7
  from progress_table.v1.progress_table import ProgressTableV1
7
8
 
8
9
  ProgressTable = ProgressTableV1
9
10
 
10
- __all__ = ["ProgressTable", "ProgressTableV0", "ProgressTableV1"]
11
+ __all__ = ["ProgressTable", "ProgressTableV0", "ProgressTableV1", "styles"]