progress-table 2.3.1__tar.gz → 3.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 (27) hide show
  1. progress_table-3.0.0/.gitignore +10 -0
  2. progress_table-3.0.0/PKG-INFO +25 -0
  3. {progress_table-2.3.1 → progress_table-3.0.0}/README.md +9 -7
  4. progress_table-3.0.0/progress_table/__init__.py +18 -0
  5. {progress_table-2.3.1/progress_table/v1 → progress_table-3.0.0/progress_table}/common.py +8 -4
  6. {progress_table-2.3.1/progress_table/v1 → progress_table-3.0.0/progress_table}/progress_table.py +542 -352
  7. progress_table-3.0.0/progress_table/styles.py +567 -0
  8. progress_table-3.0.0/pyproject.toml +58 -0
  9. progress_table-2.3.1/PKG-INFO +0 -161
  10. progress_table-2.3.1/progress_table/__init__.py +0 -11
  11. progress_table-2.3.1/progress_table/v0/__init__.py +0 -1
  12. progress_table-2.3.1/progress_table/v0/progress_table.py +0 -596
  13. progress_table-2.3.1/progress_table/v0/symbols.py +0 -162
  14. progress_table-2.3.1/progress_table/v1/__init__.py +0 -1
  15. progress_table-2.3.1/progress_table/v1/styles.py +0 -333
  16. progress_table-2.3.1/progress_table.egg-info/PKG-INFO +0 -161
  17. progress_table-2.3.1/progress_table.egg-info/PKG-INFO.sync-conflict-20240314-015933-NXTV2IO +0 -151
  18. progress_table-2.3.1/progress_table.egg-info/SOURCES.txt +0 -21
  19. progress_table-2.3.1/progress_table.egg-info/dependency_links.txt +0 -1
  20. progress_table-2.3.1/progress_table.egg-info/requires.txt +0 -1
  21. progress_table-2.3.1/progress_table.egg-info/top_level.txt +0 -1
  22. progress_table-2.3.1/pyproject.toml +0 -13
  23. progress_table-2.3.1/setup.cfg +0 -9
  24. progress_table-2.3.1/setup.py +0 -57
  25. progress_table-2.3.1/tests/test_docs_automated.py +0 -62
  26. progress_table-2.3.1/tests/test_examples_automated.py +0 -62
  27. {progress_table-2.3.1 → progress_table-3.0.0}/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
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: progress-table
3
+ Version: 3.0.0
4
+ Summary: Display progress as a pretty table in the command line.
5
+ Project-URL: Home, https://github.com/gahaalt/progress-table.git
6
+ Project-URL: Docs, https://github.com/sjmikler/progress-table/blob/main/docs
7
+ Author-email: Szymon Mikler <sjmikler@gmail.com>
8
+ License: MIT
9
+ License-File: LICENSE.txt
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.7
20
+ Requires-Dist: colorama
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'
@@ -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.0"
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):