progress-table 2.3.2__tar.gz → 3.0.1__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-3.0.1/.gitignore +10 -0
  2. {progress_table-2.3.2 → progress_table-3.0.1}/PKG-INFO +31 -33
  3. {progress_table-2.3.2 → progress_table-3.0.1}/README.md +9 -7
  4. progress_table-3.0.1/progress_table/__init__.py +18 -0
  5. {progress_table-2.3.2/progress_table/v1 → progress_table-3.0.1/progress_table}/common.py +8 -4
  6. {progress_table-2.3.2/progress_table/v1 → progress_table-3.0.1/progress_table}/progress_table.py +542 -352
  7. progress_table-3.0.1/progress_table/styles.py +567 -0
  8. progress_table-3.0.1/pyproject.toml +59 -0
  9. progress_table-2.3.2/progress_table/__init__.py +0 -11
  10. progress_table-2.3.2/progress_table/v0/__init__.py +0 -1
  11. progress_table-2.3.2/progress_table/v0/progress_table.py +0 -596
  12. progress_table-2.3.2/progress_table/v0/symbols.py +0 -162
  13. progress_table-2.3.2/progress_table/v1/__init__.py +0 -1
  14. progress_table-2.3.2/progress_table/v1/styles.py +0 -333
  15. progress_table-2.3.2/progress_table.egg-info/PKG-INFO +0 -161
  16. progress_table-2.3.2/progress_table.egg-info/PKG-INFO.sync-conflict-20240314-015933-NXTV2IO +0 -151
  17. progress_table-2.3.2/progress_table.egg-info/SOURCES.txt +0 -21
  18. progress_table-2.3.2/progress_table.egg-info/dependency_links.txt +0 -1
  19. progress_table-2.3.2/progress_table.egg-info/requires.txt +0 -1
  20. progress_table-2.3.2/progress_table.egg-info/top_level.txt +0 -1
  21. progress_table-2.3.2/pyproject.toml +0 -13
  22. progress_table-2.3.2/setup.cfg +0 -9
  23. progress_table-2.3.2/setup.py +0 -57
  24. progress_table-2.3.2/tests/test_docs_automated.py +0 -62
  25. progress_table-2.3.2/tests/test_examples_automated.py +0 -62
  26. {progress_table-2.3.2 → progress_table-3.0.1}/LICENSE.txt +0 -0
@@ -0,0 +1,10 @@
1
+ .idea
2
+ .ipynb_checkpoints
3
+ *.ipynb
4
+ __pycache__
5
+ *.egg-info
6
+
7
+ devel/
8
+ dist
9
+ build
10
+ *.sh
@@ -1,11 +1,12 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: progress-table
3
- Version: 2.3.2
3
+ Version: 3.0.1
4
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
5
+ Project-URL: Home, https://github.com/gahaalt/progress-table
6
+ Project-URL: Documentation, https://github.com/sjmikler/progress-table/blob/main/docs
7
+ Author-email: Szymon Mikler <sjmikler@gmail.com>
8
8
  License: MIT
9
+ License-File: LICENSE.txt
9
10
  Classifier: License :: OSI Approved :: MIT License
10
11
  Classifier: Programming Language :: Python :: 3
11
12
  Classifier: Programming Language :: Python :: 3.7
@@ -14,22 +15,19 @@ Classifier: Programming Language :: Python :: 3.9
14
15
  Classifier: Programming Language :: Python :: 3.10
15
16
  Classifier: Programming Language :: Python :: 3.11
16
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
17
19
  Requires-Python: >=3.7
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE.txt
20
20
  Requires-Dist: colorama
21
- Dynamic: author
22
- Dynamic: author-email
23
- Dynamic: classifier
24
- Dynamic: description
25
- Dynamic: description-content-type
26
- Dynamic: home-page
27
- Dynamic: license
28
- Dynamic: requires-dist
29
- Dynamic: requires-python
30
- Dynamic: summary
31
-
32
- > Version 2.X introduces new features and new interactive modes.
21
+ Provides-Extra: dev
22
+ Requires-Dist: black; extra == 'dev'
23
+ Requires-Dist: build; extra == 'dev'
24
+ Requires-Dist: isort; extra == 'dev'
25
+ Requires-Dist: twine; extra == 'dev'
26
+ Description-Content-Type: text/markdown
27
+
28
+ > Version 2.x.x introduces new features and new interactive modes.
29
+ >
30
+ > Version 3.x.x improves compatibility and stability.
33
31
  >
34
32
  > New features allow for previously impossible applications, see examples below.
35
33
 
@@ -47,29 +45,31 @@ Lightweight utility to display the progress of your process as a pretty table in
47
45
 
48
46
  ### Change this:
49
47
 
50
- ![example](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/progress-before3.gif)
48
+ ![example](images/progress-before3.gif)
51
49
 
52
50
  ### Into this:
53
51
 
54
- ![example](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/progress-after4.gif)
52
+ ![example](images/progress-after4.gif)
55
53
 
56
54
  ## Examples
57
55
 
56
+ From `examples/` directory:
57
+
58
58
  * Neural network training
59
59
 
60
- ![example-training](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-training.gif)
60
+ ![example-training](images/examples-training.gif)
61
61
 
62
62
  * Progress of multi-threaded downloads
63
63
 
64
- ![example-download](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-download.gif)
64
+ ![example-download](images/examples-download.gif)
65
65
 
66
66
  * Simulation and interactive display of Brownian motion
67
67
 
68
- ![example-brown2d](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-brown2d.gif)
68
+ ![example-brown2d](images/examples-brown2d.gif)
69
69
 
70
70
  * Display of a game board
71
71
 
72
- ![example-tictactoe](https://raw.githubusercontent.com/sjmikler/progress-table/main/images/examples-tictactoe.gif)
72
+ ![example-tictactoe](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](https://github.com/sjmikler/progress-table/blob/main/docs//integrations.md)
113
+ > Go to [integrations](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](https://github.com/sjmikler/progress-table/blob/main/docs//advanced-usage.md) page for more information.
118
+ Go to [advanced usage](docs/advanced-usage.md) page for more information.
119
119
 
120
120
  ## Troubleshooting
121
121
 
@@ -123,13 +123,11 @@ Go to [advanced usage](https://github.com/sjmikler/progress-table/blob/main/docs
123
123
 
124
124
  Progress Table works correctly in most consoles, but there are some exceptions:
125
125
 
126
- * Some cloud logging consoles (e.g. kubernetes) don't support `\r` properly.
127
- You can still use ProgressTable, but with `interactive=0` option. This mode will not display progress bars.
128
- * Some consoles like `PyCharm Python Console` or `IDLE` don't support cursor movement.
129
- You can still use ProgressTable, but with `interactive=1` option. This mode displays only 1 progress bar at once.
126
+ * 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.
127
+
128
+ * 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.
130
129
 
131
- > By default `interactive=2`. You can change the default `interactive` with an argument when creating the table object
132
- > or by setting `PTABLE_INTERACTIVE` environment variable, e.g. `PTABLE_INTERACTIVE=1`.
130
+ > 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`.
133
131
 
134
132
  ### Other problems
135
133
 
@@ -1,4 +1,6 @@
1
- > Version 2.X introduces new features and new interactive modes.
1
+ > Version 2.x.x introduces new features and new interactive modes.
2
+ >
3
+ > Version 3.x.x improves compatibility and stability.
2
4
  >
3
5
  > New features allow for previously impossible applications, see examples below.
4
6
 
@@ -24,6 +26,8 @@ Lightweight utility to display the progress of your process as a pretty table in
24
26
 
25
27
  ## Examples
26
28
 
29
+ From `examples/` directory:
30
+
27
31
  * Neural network training
28
32
 
29
33
  ![example-training](images/examples-training.gif)
@@ -92,13 +96,11 @@ Go to [advanced usage](docs/advanced-usage.md) page for more information.
92
96
 
93
97
  Progress Table works correctly in most consoles, but there are some exceptions:
94
98
 
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
+ * 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.
99
102
 
100
- > By default `interactive=2`. You can change the default `interactive` with an argument when creating the table object
101
- > or by setting `PTABLE_INTERACTIVE` environment variable, e.g. `PTABLE_INTERACTIVE=1`.
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`.
102
104
 
103
105
  ### Other problems
104
106
 
@@ -0,0 +1,18 @@
1
+ # Copyright (c) 2022-2025 Szymon Mikler
2
+ # Licensed under the MIT License
3
+
4
+ """Progress Table provides an easy and pretty way to track your process.
5
+
6
+ Supported features:
7
+ - Styling and coloring
8
+ - Modifying existing cells
9
+ - Progress bars integrated into the table
10
+ """
11
+
12
+ __license__ = "MIT"
13
+ __version__ = "3.0.1"
14
+ __author__ = "Szymon Mikler"
15
+
16
+ from progress_table.progress_table import ProgressTable, styles
17
+
18
+ __all__ = ["ProgressTable", "styles"]
@@ -1,6 +1,7 @@
1
- # Copyright (c) 2022-2024 Szymon Mikler
1
+ # Copyright (c) 2022-2025 Szymon Mikler
2
+ # Licensed under the MIT License
2
3
 
3
- from __future__ import annotations
4
+ """Common utilities for progress_table."""
4
5
 
5
6
  from typing import Union
6
7
 
@@ -20,12 +21,11 @@ COLORAMA_TRANSLATE = {
20
21
  NoneType = type(None)
21
22
  ColorFormat = Union[str, tuple, list, NoneType]
22
23
  ColorFormatTuple = (str, tuple, list, NoneType)
23
-
24
24
  CURSOR_UP = "\033[A"
25
25
 
26
26
 
27
27
  def maybe_convert_to_colorama_str(color: str) -> str:
28
- # Translation layer to fix unintuitive colorama names
28
+ """Convert color from string to colorama string."""
29
29
  color = COLORAMA_TRANSLATE.get(color.lower(), color)
30
30
 
31
31
  if isinstance(color, str):
@@ -39,6 +39,10 @@ def maybe_convert_to_colorama_str(color: str) -> str:
39
39
 
40
40
 
41
41
  def maybe_convert_to_colorama(color: ColorFormat) -> str:
42
+ """Fix unintuitive colorama names.
43
+
44
+ Translation layer from user-passed to colorama-compatible names.
45
+ """
42
46
  if color is None or color == "":
43
47
  return ""
44
48
  if isinstance(color, str):