stouputils 1.0.17__tar.gz → 1.15.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 (166) hide show
  1. stouputils-1.15.0/PKG-INFO +178 -0
  2. stouputils-1.15.0/README.md +136 -0
  3. stouputils-1.15.0/pyproject.toml +102 -0
  4. stouputils-1.15.0/stouputils/__init__.py +40 -0
  5. stouputils-1.0.17/src/stouputils/__init__.py → stouputils-1.15.0/stouputils/__init__.pyi +11 -11
  6. stouputils-1.15.0/stouputils/__main__.py +86 -0
  7. stouputils-1.15.0/stouputils/_deprecated.py +37 -0
  8. stouputils-1.15.0/stouputils/_deprecated.pyi +12 -0
  9. stouputils-1.15.0/stouputils/all_doctests.py +160 -0
  10. stouputils-1.15.0/stouputils/all_doctests.pyi +46 -0
  11. stouputils-1.15.0/stouputils/applications/__init__.py +22 -0
  12. stouputils-1.15.0/stouputils/applications/__init__.pyi +2 -0
  13. stouputils-1.15.0/stouputils/applications/automatic_docs.py +637 -0
  14. stouputils-1.15.0/stouputils/applications/automatic_docs.pyi +106 -0
  15. stouputils-1.15.0/stouputils/applications/upscaler/__init__.py +39 -0
  16. stouputils-1.15.0/stouputils/applications/upscaler/__init__.pyi +3 -0
  17. stouputils-1.15.0/stouputils/applications/upscaler/config.py +128 -0
  18. stouputils-1.15.0/stouputils/applications/upscaler/config.pyi +18 -0
  19. stouputils-1.15.0/stouputils/applications/upscaler/image.py +247 -0
  20. stouputils-1.15.0/stouputils/applications/upscaler/image.pyi +109 -0
  21. stouputils-1.15.0/stouputils/applications/upscaler/video.py +287 -0
  22. stouputils-1.15.0/stouputils/applications/upscaler/video.pyi +60 -0
  23. stouputils-1.15.0/stouputils/archive.py +344 -0
  24. stouputils-1.15.0/stouputils/archive.pyi +67 -0
  25. stouputils-1.15.0/stouputils/backup.py +488 -0
  26. stouputils-1.15.0/stouputils/backup.pyi +109 -0
  27. stouputils-1.15.0/stouputils/collections.py +244 -0
  28. stouputils-1.15.0/stouputils/collections.pyi +86 -0
  29. stouputils-1.15.0/stouputils/continuous_delivery/__init__.py +27 -0
  30. stouputils-1.15.0/stouputils/continuous_delivery/__init__.pyi +5 -0
  31. stouputils-1.15.0/stouputils/continuous_delivery/cd_utils.py +243 -0
  32. stouputils-1.15.0/stouputils/continuous_delivery/cd_utils.pyi +129 -0
  33. {stouputils-1.0.17/src → stouputils-1.15.0}/stouputils/continuous_delivery/github.py +522 -432
  34. stouputils-1.15.0/stouputils/continuous_delivery/github.pyi +162 -0
  35. stouputils-1.15.0/stouputils/continuous_delivery/pypi.py +130 -0
  36. stouputils-1.15.0/stouputils/continuous_delivery/pypi.pyi +53 -0
  37. stouputils-1.15.0/stouputils/continuous_delivery/pyproject.py +147 -0
  38. stouputils-1.15.0/stouputils/continuous_delivery/pyproject.pyi +67 -0
  39. stouputils-1.15.0/stouputils/continuous_delivery/stubs.py +86 -0
  40. stouputils-1.15.0/stouputils/continuous_delivery/stubs.pyi +39 -0
  41. stouputils-1.15.0/stouputils/ctx.py +408 -0
  42. stouputils-1.15.0/stouputils/ctx.pyi +211 -0
  43. stouputils-1.15.0/stouputils/data_science/config/get.py +51 -0
  44. stouputils-1.15.0/stouputils/data_science/config/set.py +125 -0
  45. stouputils-1.15.0/stouputils/data_science/data_processing/image/__init__.py +66 -0
  46. stouputils-1.15.0/stouputils/data_science/data_processing/image/auto_contrast.py +79 -0
  47. stouputils-1.15.0/stouputils/data_science/data_processing/image/axis_flip.py +58 -0
  48. stouputils-1.15.0/stouputils/data_science/data_processing/image/bias_field_correction.py +74 -0
  49. stouputils-1.15.0/stouputils/data_science/data_processing/image/binary_threshold.py +73 -0
  50. stouputils-1.15.0/stouputils/data_science/data_processing/image/blur.py +59 -0
  51. stouputils-1.15.0/stouputils/data_science/data_processing/image/brightness.py +54 -0
  52. stouputils-1.15.0/stouputils/data_science/data_processing/image/canny.py +110 -0
  53. stouputils-1.15.0/stouputils/data_science/data_processing/image/clahe.py +92 -0
  54. stouputils-1.15.0/stouputils/data_science/data_processing/image/common.py +30 -0
  55. stouputils-1.15.0/stouputils/data_science/data_processing/image/contrast.py +53 -0
  56. stouputils-1.15.0/stouputils/data_science/data_processing/image/curvature_flow_filter.py +74 -0
  57. stouputils-1.15.0/stouputils/data_science/data_processing/image/denoise.py +378 -0
  58. stouputils-1.15.0/stouputils/data_science/data_processing/image/histogram_equalization.py +123 -0
  59. stouputils-1.15.0/stouputils/data_science/data_processing/image/invert.py +64 -0
  60. stouputils-1.15.0/stouputils/data_science/data_processing/image/laplacian.py +60 -0
  61. stouputils-1.15.0/stouputils/data_science/data_processing/image/median_blur.py +52 -0
  62. stouputils-1.15.0/stouputils/data_science/data_processing/image/noise.py +59 -0
  63. stouputils-1.15.0/stouputils/data_science/data_processing/image/normalize.py +65 -0
  64. stouputils-1.15.0/stouputils/data_science/data_processing/image/random_erase.py +66 -0
  65. stouputils-1.15.0/stouputils/data_science/data_processing/image/resize.py +69 -0
  66. stouputils-1.15.0/stouputils/data_science/data_processing/image/rotation.py +80 -0
  67. stouputils-1.15.0/stouputils/data_science/data_processing/image/salt_pepper.py +68 -0
  68. stouputils-1.15.0/stouputils/data_science/data_processing/image/sharpening.py +55 -0
  69. stouputils-1.15.0/stouputils/data_science/data_processing/image/shearing.py +64 -0
  70. stouputils-1.15.0/stouputils/data_science/data_processing/image/threshold.py +64 -0
  71. stouputils-1.15.0/stouputils/data_science/data_processing/image/translation.py +71 -0
  72. stouputils-1.15.0/stouputils/data_science/data_processing/image/zoom.py +83 -0
  73. stouputils-1.15.0/stouputils/data_science/data_processing/image_augmentation.py +118 -0
  74. stouputils-1.15.0/stouputils/data_science/data_processing/image_preprocess.py +183 -0
  75. stouputils-1.15.0/stouputils/data_science/data_processing/prosthesis_detection.py +359 -0
  76. stouputils-1.15.0/stouputils/data_science/data_processing/technique.py +481 -0
  77. stouputils-1.15.0/stouputils/data_science/dataset/__init__.py +45 -0
  78. stouputils-1.15.0/stouputils/data_science/dataset/dataset.py +292 -0
  79. stouputils-1.15.0/stouputils/data_science/dataset/dataset_loader.py +135 -0
  80. stouputils-1.15.0/stouputils/data_science/dataset/grouping_strategy.py +296 -0
  81. stouputils-1.15.0/stouputils/data_science/dataset/image_loader.py +100 -0
  82. stouputils-1.15.0/stouputils/data_science/dataset/xy_tuple.py +696 -0
  83. stouputils-1.15.0/stouputils/data_science/metric_dictionnary.py +106 -0
  84. stouputils-1.15.0/stouputils/data_science/metric_utils.py +847 -0
  85. stouputils-1.15.0/stouputils/data_science/mlflow_utils.py +206 -0
  86. stouputils-1.15.0/stouputils/data_science/models/abstract_model.py +149 -0
  87. stouputils-1.15.0/stouputils/data_science/models/all.py +85 -0
  88. stouputils-1.15.0/stouputils/data_science/models/base_keras.py +765 -0
  89. stouputils-1.15.0/stouputils/data_science/models/keras/all.py +38 -0
  90. stouputils-1.15.0/stouputils/data_science/models/keras/convnext.py +62 -0
  91. stouputils-1.15.0/stouputils/data_science/models/keras/densenet.py +50 -0
  92. stouputils-1.15.0/stouputils/data_science/models/keras/efficientnet.py +60 -0
  93. stouputils-1.15.0/stouputils/data_science/models/keras/mobilenet.py +56 -0
  94. stouputils-1.15.0/stouputils/data_science/models/keras/resnet.py +52 -0
  95. stouputils-1.15.0/stouputils/data_science/models/keras/squeezenet.py +233 -0
  96. stouputils-1.15.0/stouputils/data_science/models/keras/vgg.py +42 -0
  97. stouputils-1.15.0/stouputils/data_science/models/keras/xception.py +38 -0
  98. stouputils-1.15.0/stouputils/data_science/models/keras_utils/callbacks/__init__.py +20 -0
  99. stouputils-1.15.0/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +219 -0
  100. stouputils-1.15.0/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +148 -0
  101. stouputils-1.15.0/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +31 -0
  102. stouputils-1.15.0/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +249 -0
  103. stouputils-1.15.0/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +66 -0
  104. stouputils-1.15.0/stouputils/data_science/models/keras_utils/losses/__init__.py +12 -0
  105. stouputils-1.15.0/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +56 -0
  106. stouputils-1.15.0/stouputils/data_science/models/keras_utils/visualizations.py +416 -0
  107. stouputils-1.15.0/stouputils/data_science/models/model_interface.py +939 -0
  108. stouputils-1.15.0/stouputils/data_science/models/sandbox.py +116 -0
  109. stouputils-1.15.0/stouputils/data_science/range_tuple.py +234 -0
  110. stouputils-1.15.0/stouputils/data_science/scripts/augment_dataset.py +77 -0
  111. stouputils-1.15.0/stouputils/data_science/scripts/exhaustive_process.py +133 -0
  112. stouputils-1.15.0/stouputils/data_science/scripts/preprocess_dataset.py +70 -0
  113. stouputils-1.15.0/stouputils/data_science/scripts/routine.py +168 -0
  114. stouputils-1.15.0/stouputils/data_science/utils.py +285 -0
  115. stouputils-1.15.0/stouputils/decorators.py +619 -0
  116. stouputils-1.15.0/stouputils/decorators.pyi +252 -0
  117. stouputils-1.15.0/stouputils/image.py +441 -0
  118. stouputils-1.15.0/stouputils/image.pyi +172 -0
  119. stouputils-1.15.0/stouputils/installer/__init__.py +18 -0
  120. stouputils-1.15.0/stouputils/installer/__init__.pyi +5 -0
  121. stouputils-1.15.0/stouputils/installer/common.py +67 -0
  122. stouputils-1.15.0/stouputils/installer/common.pyi +39 -0
  123. stouputils-1.15.0/stouputils/installer/downloader.py +101 -0
  124. stouputils-1.15.0/stouputils/installer/downloader.pyi +24 -0
  125. stouputils-1.15.0/stouputils/installer/linux.py +144 -0
  126. stouputils-1.15.0/stouputils/installer/linux.pyi +39 -0
  127. stouputils-1.15.0/stouputils/installer/main.py +223 -0
  128. stouputils-1.15.0/stouputils/installer/main.pyi +57 -0
  129. stouputils-1.15.0/stouputils/installer/windows.py +136 -0
  130. stouputils-1.15.0/stouputils/installer/windows.pyi +31 -0
  131. stouputils-1.15.0/stouputils/io.py +493 -0
  132. stouputils-1.15.0/stouputils/io.pyi +213 -0
  133. stouputils-1.15.0/stouputils/parallel.py +485 -0
  134. stouputils-1.15.0/stouputils/parallel.pyi +216 -0
  135. stouputils-1.15.0/stouputils/print.py +709 -0
  136. stouputils-1.15.0/stouputils/print.pyi +225 -0
  137. {stouputils-1.0.17/src → stouputils-1.15.0}/stouputils/py.typed +1 -1
  138. stouputils-1.15.0/stouputils/version_pkg.py +189 -0
  139. stouputils-1.15.0/stouputils/version_pkg.pyi +15 -0
  140. stouputils-1.0.17/.gitignore +0 -8
  141. stouputils-1.0.17/1_upgrades.py +0 -4
  142. stouputils-1.0.17/2_build.py +0 -4
  143. stouputils-1.0.17/3_upload.py +0 -10
  144. stouputils-1.0.17/LICENSE +0 -21
  145. stouputils-1.0.17/PKG-INFO +0 -58
  146. stouputils-1.0.17/README.md +0 -41
  147. stouputils-1.0.17/all_in_one.py +0 -13
  148. stouputils-1.0.17/build_all_in_one.py +0 -14
  149. stouputils-1.0.17/copy_in_local.py +0 -12
  150. stouputils-1.0.17/doctests.py +0 -17
  151. stouputils-1.0.17/examples/delta_backup.py +0 -7
  152. stouputils-1.0.17/github_release.py +0 -26
  153. stouputils-1.0.17/pyproject.toml +0 -32
  154. stouputils-1.0.17/src/stouputils/all_doctests.py +0 -79
  155. stouputils-1.0.17/src/stouputils/archive.py +0 -96
  156. stouputils-1.0.17/src/stouputils/backup.py +0 -293
  157. stouputils-1.0.17/src/stouputils/collections.py +0 -56
  158. stouputils-1.0.17/src/stouputils/continuous_delivery/__init__.py +0 -5
  159. stouputils-1.0.17/src/stouputils/continuous_delivery/cd_utils.py +0 -66
  160. stouputils-1.0.17/src/stouputils/ctx.py +0 -99
  161. stouputils-1.0.17/src/stouputils/decorators.py +0 -308
  162. stouputils-1.0.17/src/stouputils/dont_look/zip_file_override.py +0 -115
  163. stouputils-1.0.17/src/stouputils/io.py +0 -179
  164. stouputils-1.0.17/src/stouputils/parallel.py +0 -143
  165. stouputils-1.0.17/src/stouputils/print.py +0 -240
  166. stouputils-1.0.17/upgrade.py +0 -58
@@ -0,0 +1,178 @@
1
+ Metadata-Version: 2.3
2
+ Name: stouputils
3
+ Version: 1.15.0
4
+ Summary: Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.
5
+ Keywords: utilities,tools,helpers,development,python
6
+ Author: Stoupy51
7
+ Author-email: Stoupy51 <stoupy51@gmail.com>
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Dist: tqdm>=4.0.0
15
+ Requires-Dist: requests>=2.20.0
16
+ Requires-Dist: msgspec[toml,yaml]>=0.20.0
17
+ Requires-Dist: pillow>=12.0.0
18
+ Requires-Dist: python-box>=7.0.0
19
+ Requires-Dist: argcomplete>=3.0.0
20
+ Requires-Dist: numpy
21
+ Requires-Dist: opencv-python ; extra == 'data-science'
22
+ Requires-Dist: scikit-image ; extra == 'data-science'
23
+ Requires-Dist: simpleitk ; extra == 'data-science'
24
+ Requires-Dist: mlflow ; extra == 'data-science'
25
+ Requires-Dist: tensorflow ; extra == 'data-science'
26
+ Requires-Dist: scikit-learn ; extra == 'data-science'
27
+ Requires-Dist: pywavelets ; extra == 'data-science'
28
+ Requires-Dist: m2r2 ; extra == 'docs'
29
+ Requires-Dist: myst-parser ; extra == 'docs'
30
+ Requires-Dist: sphinx-copybutton ; extra == 'docs'
31
+ Requires-Dist: sphinx-design ; extra == 'docs'
32
+ Requires-Dist: sphinx-treeview ; extra == 'docs'
33
+ Requires-Dist: sphinx-breeze-theme ; extra == 'docs'
34
+ Requires-Dist: pydata-sphinx-theme ; extra == 'docs'
35
+ Requires-Python: >=3.12
36
+ Project-URL: Homepage, https://stoupy51.github.io/stouputils
37
+ Project-URL: Issues, https://github.com/Stoupy51/stouputils/issues
38
+ Project-URL: Source, https://github.com/Stoupy51/stouputils
39
+ Provides-Extra: data-science
40
+ Provides-Extra: docs
41
+ Description-Content-Type: text/markdown
42
+
43
+
44
+ ## 🛠️ Project Badges
45
+ [![GitHub](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=github&label=GitHub)](https://github.com/Stoupy51/stouputils/releases/latest)
46
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/stouputils?logo=python&label=PyPI%20downloads)](https://pypi.org/project/stouputils/)
47
+ [![Documentation](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=sphinx&label=Documentation&color=purple)](https://stoupy51.github.io/stouputils/latest/)
48
+
49
+ ## 📚 Project Overview
50
+ Stouputils is a collection of utility modules designed to simplify and enhance the development process.<br>
51
+ It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers.<br>
52
+ Start now by installing the package: `pip install stouputils`.<br>
53
+
54
+ <a href="https://colab.research.google.com/drive/1mJ-KL-zXzIk1oKDxO6FC1SFfm-BVKG-P?usp=sharing" target="_blank" rel="noopener noreferrer" style="text-decoration: none;"><div class="admonition">
55
+ 📖 <b>Want to see examples?</b> Check out our <u>Google Colab notebook</u> with practical usage examples!
56
+ </div></a>
57
+
58
+ ## 🚀 Project File Tree
59
+ <html>
60
+ <details style="display: none;">
61
+ <summary></summary>
62
+ <style>
63
+ .code-tree {
64
+ border-radius: 6px;
65
+ padding: 16px;
66
+ font-family: monospace;
67
+ line-height: 1.45;
68
+ overflow: auto;
69
+ white-space: pre;
70
+ background-color:rgb(43, 43, 43);
71
+ color: #d4d4d4;
72
+ }
73
+ .code-tree a {
74
+ color: #569cd6;
75
+ text-decoration: none;
76
+ }
77
+ .code-tree a:hover {
78
+ text-decoration: underline;
79
+ }
80
+ .code-tree .comment {
81
+ color:rgb(231, 213, 48);
82
+ }
83
+ .code-tree .paren {
84
+ color: orange;
85
+ }
86
+ </style>
87
+ </details>
88
+
89
+ <pre class="code-tree">stouputils/
90
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.print.html">print.py</a> <span class="comment"># 🖨️ Utility functions for printing <span class="paren">(info, debug, warning, error, whatisit, breakpoint, colored_for_loop, ...)</span></span>
91
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.decorators.html">decorators.py</a> <span class="comment"># 🎯 Decorators <span class="paren">(measure_time, handle_error, timeout, retry, simple_cache, abstract, deprecated, silent)</span></span>
92
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.ctx.html">ctx.py</a> <span class="comment"># 🔇 Context managers <span class="paren">(LogToFile, MeasureTime, Muffle, DoNothing, SetMPStartMethod)</span></span>
93
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.io.html">io.py</a> <span class="comment"># 💾 Utilities for file management <span class="paren">(json_dump, json_load, csv_dump, csv_load, read_file, super_copy, super_open, clean_path, ...)</span></span>
94
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.parallel.html">parallel.py</a> <span class="comment"># 🔀 Utility functions for parallel processing <span class="paren">(multiprocessing, multithreading, run_in_subprocess)</span></span>
95
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.image.html">image.py</a> <span class="comment"># 🖼️ Little utilities for image processing <span class="paren">(image_resize, auto_crop, numpy_to_gif, numpy_to_obj)</span></span>
96
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.collections.html">collections.py</a> <span class="comment"># 🧰 Utilities for collection manipulation <span class="paren">(unique_list, sort_dict_keys, upsert_in_dataframe, array_to_disk)</span></span>
97
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.all_doctests.html">all_doctests.py</a> <span class="comment"># ✅ Run all doctests for all modules in a given directory <span class="paren">(launch_tests, test_module_with_progress)</span></span>
98
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.backup.html">backup.py</a> <span class="comment"># 💾 Utilities for backup management <span class="paren">(delta backup, consolidate)</span></span>
99
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.archive.html">archive.py</a> <span class="comment"># 📦 Functions for creating and managing archives</span>
100
+
101
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.html">applications/</a>
102
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.automatic_docs.html">automatic_docs.py</a> <span class="comment"># 📚 Documentation generation utilities <span class="paren">(used to create this documentation)</span></span>
103
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.upscaler.html">upscaler/</a> <span class="comment"># 🔎 Image & Video upscaler <span class="paren">(configurable)</span></span>
104
+ │ └── ...
105
+
106
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.html">continuous_delivery/</a>
107
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.cd_utils.html">cd_utils.py</a> <span class="comment"># 🔧 Utilities for continuous delivery</span>
108
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.github.html">github.py</a> <span class="comment"># 📦 Utilities for continuous delivery on GitHub <span class="paren">(upload_to_github)</span></span>
109
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pypi.html">pypi.py</a> <span class="comment"># 📦 Utilities for PyPI <span class="paren">(pypi_full_routine)</span></span>
110
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pyproject.html">pyproject.py</a> <span class="comment"># 📝 Utilities for reading, writing and managing pyproject.toml files</span>
111
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.stubs.html">stubs.py</a> <span class="comment"># 📝 Utilities for generating stub files using stubgen</span>
112
+ │ └── ...
113
+
114
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.html">data_science/</a>
115
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.config.html">config/</a> <span class="comment"># ⚙️ Configuration utilities for data science</span>
116
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.dataset.html">dataset/</a> <span class="comment"># 📊 Dataset handling <span class="paren">(dataset, dataset_loader, grouping_strategy)</span></span>
117
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.data_processing.html">data_processing/</a> <span class="comment"># 🔄 Data processing utilities <span class="paren">(image augmentation, preprocessing)</span></span>
118
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.data_processing.image.html">image/</a> <span class="comment"># 🖼️ Image processing techniques</span>
119
+ │ │ └── ...
120
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.html">models/</a> <span class="comment"># 🧠 ML/DL model interfaces and implementations</span>
121
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras.html">keras/</a> <span class="comment"># 🤖 Keras model implementations</span>
122
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras_utils.html">keras_utils/</a> <span class="comment"># 🛠️ Keras utilities <span class="paren">(callbacks, losses, visualizations)</span></span>
123
+ │ │ └── ...
124
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.scripts.html">scripts/</a> <span class="comment"># 📜 Data science scripts <span class="paren">(augment, preprocess, routine)</span></span>
125
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.metric_utils.html">metric_utils.py</a> <span class="comment"># 📏 Static methods for calculating various ML metrics</span>
126
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.mlflow_utils.html">mlflow_utils.py</a> <span class="comment"># 📊 Utility functions for working with MLflow</span>
127
+ │ └── ...
128
+
129
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.html">installer/</a>
130
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.common.html">common.py</a> <span class="comment"># 🔧 Common functions used by the Linux and Windows installers modules</span>
131
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.downloader.html">downloader.py</a> <span class="comment"># ⬇️ Functions for downloading and installing programs from URLs</span>
132
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.linux.html">linux.py</a> <span class="comment"># 🐧 Linux/macOS specific implementations for installation</span>
133
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.main.html">main.py</a> <span class="comment"># 🚀 Core installation functions for installing programs from zip files or URLs</span>
134
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.windows.html">windows.py</a> <span class="comment"># 💻 Windows specific implementations for installation</span>
135
+ │ └── ...
136
+ └── ...
137
+ </pre>
138
+ </html>
139
+
140
+ ## 🔧 Installation
141
+
142
+ ```bash
143
+ pip install stouputils
144
+ ```
145
+
146
+ ### ✨ Enable Tab Completion on Linux (Optional)
147
+
148
+ For a better CLI experience, enable bash tab completion:
149
+
150
+ ```bash
151
+ # Option 1: Using argcomplete's global activation
152
+ activate-global-python-argcomplete --user
153
+
154
+ # Option 2: Manual setup for bash
155
+ register-python-argcomplete stouputils >> ~/.bashrc
156
+ source ~/.bashrc
157
+ ```
158
+
159
+ After enabling completion, you can use `<TAB>` to autocomplete commands:
160
+ ```bash
161
+ stouputils <TAB> # Shows: --version, -v, all_doctests, backup
162
+ stouputils all_<TAB> # Completes to: all_doctests
163
+ ```
164
+
165
+ **Note:** Tab completion works best in bash, zsh, Git Bash, or WSL on Windows.
166
+
167
+ ## ⭐ Star History
168
+
169
+ <html>
170
+ <a href="https://star-history.com/#Stoupy51/stouputils&Date">
171
+ <picture>
172
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date&theme=dark" />
173
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
174
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
175
+ </picture>
176
+ </a>
177
+ </html>
178
+
@@ -0,0 +1,136 @@
1
+
2
+ ## 🛠️ Project Badges
3
+ [![GitHub](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=github&label=GitHub)](https://github.com/Stoupy51/stouputils/releases/latest)
4
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/stouputils?logo=python&label=PyPI%20downloads)](https://pypi.org/project/stouputils/)
5
+ [![Documentation](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=sphinx&label=Documentation&color=purple)](https://stoupy51.github.io/stouputils/latest/)
6
+
7
+ ## 📚 Project Overview
8
+ Stouputils is a collection of utility modules designed to simplify and enhance the development process.<br>
9
+ It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers.<br>
10
+ Start now by installing the package: `pip install stouputils`.<br>
11
+
12
+ <a href="https://colab.research.google.com/drive/1mJ-KL-zXzIk1oKDxO6FC1SFfm-BVKG-P?usp=sharing" target="_blank" rel="noopener noreferrer" style="text-decoration: none;"><div class="admonition">
13
+ 📖 <b>Want to see examples?</b> Check out our <u>Google Colab notebook</u> with practical usage examples!
14
+ </div></a>
15
+
16
+ ## 🚀 Project File Tree
17
+ <html>
18
+ <details style="display: none;">
19
+ <summary></summary>
20
+ <style>
21
+ .code-tree {
22
+ border-radius: 6px;
23
+ padding: 16px;
24
+ font-family: monospace;
25
+ line-height: 1.45;
26
+ overflow: auto;
27
+ white-space: pre;
28
+ background-color:rgb(43, 43, 43);
29
+ color: #d4d4d4;
30
+ }
31
+ .code-tree a {
32
+ color: #569cd6;
33
+ text-decoration: none;
34
+ }
35
+ .code-tree a:hover {
36
+ text-decoration: underline;
37
+ }
38
+ .code-tree .comment {
39
+ color:rgb(231, 213, 48);
40
+ }
41
+ .code-tree .paren {
42
+ color: orange;
43
+ }
44
+ </style>
45
+ </details>
46
+
47
+ <pre class="code-tree">stouputils/
48
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.print.html">print.py</a> <span class="comment"># 🖨️ Utility functions for printing <span class="paren">(info, debug, warning, error, whatisit, breakpoint, colored_for_loop, ...)</span></span>
49
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.decorators.html">decorators.py</a> <span class="comment"># 🎯 Decorators <span class="paren">(measure_time, handle_error, timeout, retry, simple_cache, abstract, deprecated, silent)</span></span>
50
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.ctx.html">ctx.py</a> <span class="comment"># 🔇 Context managers <span class="paren">(LogToFile, MeasureTime, Muffle, DoNothing, SetMPStartMethod)</span></span>
51
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.io.html">io.py</a> <span class="comment"># 💾 Utilities for file management <span class="paren">(json_dump, json_load, csv_dump, csv_load, read_file, super_copy, super_open, clean_path, ...)</span></span>
52
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.parallel.html">parallel.py</a> <span class="comment"># 🔀 Utility functions for parallel processing <span class="paren">(multiprocessing, multithreading, run_in_subprocess)</span></span>
53
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.image.html">image.py</a> <span class="comment"># 🖼️ Little utilities for image processing <span class="paren">(image_resize, auto_crop, numpy_to_gif, numpy_to_obj)</span></span>
54
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.collections.html">collections.py</a> <span class="comment"># 🧰 Utilities for collection manipulation <span class="paren">(unique_list, sort_dict_keys, upsert_in_dataframe, array_to_disk)</span></span>
55
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.all_doctests.html">all_doctests.py</a> <span class="comment"># ✅ Run all doctests for all modules in a given directory <span class="paren">(launch_tests, test_module_with_progress)</span></span>
56
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.backup.html">backup.py</a> <span class="comment"># 💾 Utilities for backup management <span class="paren">(delta backup, consolidate)</span></span>
57
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.archive.html">archive.py</a> <span class="comment"># 📦 Functions for creating and managing archives</span>
58
+
59
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.html">applications/</a>
60
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.automatic_docs.html">automatic_docs.py</a> <span class="comment"># 📚 Documentation generation utilities <span class="paren">(used to create this documentation)</span></span>
61
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.upscaler.html">upscaler/</a> <span class="comment"># 🔎 Image & Video upscaler <span class="paren">(configurable)</span></span>
62
+ │ └── ...
63
+
64
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.html">continuous_delivery/</a>
65
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.cd_utils.html">cd_utils.py</a> <span class="comment"># 🔧 Utilities for continuous delivery</span>
66
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.github.html">github.py</a> <span class="comment"># 📦 Utilities for continuous delivery on GitHub <span class="paren">(upload_to_github)</span></span>
67
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pypi.html">pypi.py</a> <span class="comment"># 📦 Utilities for PyPI <span class="paren">(pypi_full_routine)</span></span>
68
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pyproject.html">pyproject.py</a> <span class="comment"># 📝 Utilities for reading, writing and managing pyproject.toml files</span>
69
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.stubs.html">stubs.py</a> <span class="comment"># 📝 Utilities for generating stub files using stubgen</span>
70
+ │ └── ...
71
+
72
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.html">data_science/</a>
73
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.config.html">config/</a> <span class="comment"># ⚙️ Configuration utilities for data science</span>
74
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.dataset.html">dataset/</a> <span class="comment"># 📊 Dataset handling <span class="paren">(dataset, dataset_loader, grouping_strategy)</span></span>
75
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.data_processing.html">data_processing/</a> <span class="comment"># 🔄 Data processing utilities <span class="paren">(image augmentation, preprocessing)</span></span>
76
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.data_processing.image.html">image/</a> <span class="comment"># 🖼️ Image processing techniques</span>
77
+ │ │ └── ...
78
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.html">models/</a> <span class="comment"># 🧠 ML/DL model interfaces and implementations</span>
79
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras.html">keras/</a> <span class="comment"># 🤖 Keras model implementations</span>
80
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras_utils.html">keras_utils/</a> <span class="comment"># 🛠️ Keras utilities <span class="paren">(callbacks, losses, visualizations)</span></span>
81
+ │ │ └── ...
82
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.scripts.html">scripts/</a> <span class="comment"># 📜 Data science scripts <span class="paren">(augment, preprocess, routine)</span></span>
83
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.metric_utils.html">metric_utils.py</a> <span class="comment"># 📏 Static methods for calculating various ML metrics</span>
84
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.mlflow_utils.html">mlflow_utils.py</a> <span class="comment"># 📊 Utility functions for working with MLflow</span>
85
+ │ └── ...
86
+
87
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.html">installer/</a>
88
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.common.html">common.py</a> <span class="comment"># 🔧 Common functions used by the Linux and Windows installers modules</span>
89
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.downloader.html">downloader.py</a> <span class="comment"># ⬇️ Functions for downloading and installing programs from URLs</span>
90
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.linux.html">linux.py</a> <span class="comment"># 🐧 Linux/macOS specific implementations for installation</span>
91
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.main.html">main.py</a> <span class="comment"># 🚀 Core installation functions for installing programs from zip files or URLs</span>
92
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.windows.html">windows.py</a> <span class="comment"># 💻 Windows specific implementations for installation</span>
93
+ │ └── ...
94
+ └── ...
95
+ </pre>
96
+ </html>
97
+
98
+ ## 🔧 Installation
99
+
100
+ ```bash
101
+ pip install stouputils
102
+ ```
103
+
104
+ ### ✨ Enable Tab Completion on Linux (Optional)
105
+
106
+ For a better CLI experience, enable bash tab completion:
107
+
108
+ ```bash
109
+ # Option 1: Using argcomplete's global activation
110
+ activate-global-python-argcomplete --user
111
+
112
+ # Option 2: Manual setup for bash
113
+ register-python-argcomplete stouputils >> ~/.bashrc
114
+ source ~/.bashrc
115
+ ```
116
+
117
+ After enabling completion, you can use `<TAB>` to autocomplete commands:
118
+ ```bash
119
+ stouputils <TAB> # Shows: --version, -v, all_doctests, backup
120
+ stouputils all_<TAB> # Completes to: all_doctests
121
+ ```
122
+
123
+ **Note:** Tab completion works best in bash, zsh, Git Bash, or WSL on Windows.
124
+
125
+ ## ⭐ Star History
126
+
127
+ <html>
128
+ <a href="https://star-history.com/#Stoupy51/stouputils&Date">
129
+ <picture>
130
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date&theme=dark" />
131
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
132
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
133
+ </picture>
134
+ </a>
135
+ </html>
136
+
@@ -0,0 +1,102 @@
1
+
2
+ [build-system]
3
+ requires = ["uv_build"]
4
+ build-backend = "uv_build"
5
+
6
+ [tool.uv.build-backend]
7
+ module-root = ""
8
+
9
+ [project]
10
+ name = "stouputils"
11
+ version = "1.15.0"
12
+ description = "Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more."
13
+ readme = "README.md"
14
+ keywords = ["utilities", "tools", "helpers", "development", "python"]
15
+ requires-python = ">=3.12"
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ ]
24
+ dependencies = [
25
+ "tqdm>=4.0.0",
26
+ "requests>=2.20.0",
27
+ "msgspec[toml,yaml]>=0.20.0",
28
+ "pillow>=12.0.0",
29
+ "python-box>=7.0.0",
30
+ "argcomplete>=3.0.0",
31
+ "numpy",
32
+ ]
33
+ authors = [
34
+ { name = "Stoupy51", email = "stoupy51@gmail.com" },
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ docs = [
39
+ "m2r2",
40
+ "myst_parser",
41
+ "sphinx_copybutton",
42
+ "sphinx_design",
43
+ "sphinx_treeview",
44
+ "sphinx_breeze_theme",
45
+ "pydata_sphinx_theme",
46
+ ]
47
+ data_science = [
48
+ "opencv-python",
49
+ "scikit-image",
50
+ "simpleitk",
51
+ "mlflow",
52
+ "tensorflow",
53
+ "scikit-learn",
54
+ "PyWavelets",
55
+ ]
56
+
57
+ [project.urls]
58
+ Homepage = "https://stoupy51.github.io/stouputils"
59
+ Issues = "https://github.com/Stoupy51/stouputils/issues"
60
+ Source = "https://github.com/Stoupy51/stouputils"
61
+
62
+ [project.scripts]
63
+ stouputils = "stouputils.__main__:main"
64
+
65
+ [tool.pyright]
66
+ typeCheckingMode = "strict"
67
+
68
+ [tool.ruff]
69
+ exclude = [
70
+ ".git",
71
+ ".ruff_cache",
72
+ ".venv",
73
+ ".vscode",
74
+ ".cursor",
75
+ "build",
76
+ "dist",
77
+ "*.pyi",
78
+ ]
79
+ line-length = 200
80
+
81
+ [tool.ruff.lint]
82
+ select = [
83
+ "E",
84
+ "W",
85
+ "F",
86
+ "I",
87
+ "N",
88
+ "UP",
89
+ "B",
90
+ "C4",
91
+ "T20",
92
+ "RUF",
93
+ ]
94
+ ignore = [
95
+ "T201",
96
+ "W191",
97
+ "N803",
98
+ "N806",
99
+ "F403",
100
+ "F405",
101
+ ]
102
+
@@ -0,0 +1,40 @@
1
+ """ A collection of utility modules designed to simplify and enhance the development process.
2
+
3
+ This package provides various tools and utilities for common development tasks including:
4
+
5
+ Key Features:
6
+ - Continuous delivery utilities (GitHub, PyPI)
7
+ - Display and logging utilities (print)
8
+ - File and I/O management (io)
9
+ - Decorators for common patterns
10
+ - Context managers
11
+ - Archive and backup tools
12
+ - Parallel processing helpers
13
+ - Collection utilities
14
+ - Doctests utilities
15
+
16
+ """
17
+ # Version (handle case where the package is not installed)
18
+ from importlib.metadata import PackageNotFoundError
19
+ from importlib.metadata import version as importlib_version
20
+
21
+ # Imports
22
+ from ._deprecated import *
23
+ from .all_doctests import *
24
+ from .archive import *
25
+ from .backup import *
26
+ from .collections import *
27
+ from .continuous_delivery import *
28
+ from .ctx import *
29
+ from .decorators import *
30
+ from .image import *
31
+ from .io import *
32
+ from .parallel import *
33
+ from .print import *
34
+ from .version_pkg import *
35
+
36
+ try:
37
+ __version__: str = importlib_version("stouputils")
38
+ except PackageNotFoundError:
39
+ __version__: str = "0.0.0-dev"
40
+
@@ -1,15 +1,15 @@
1
-
2
- # Imports
3
- from .print import *
4
- from .archive import *
5
- from .io import *
6
- from .decorators import *
7
- from .ctx import *
8
- from .parallel import *
1
+ from ._deprecated import *
9
2
  from .all_doctests import *
10
- from .collections import *
3
+ from .archive import *
11
4
  from .backup import *
12
-
13
- # Folders
5
+ from .collections import *
14
6
  from .continuous_delivery import *
7
+ from .ctx import *
8
+ from .decorators import *
9
+ from .image import *
10
+ from .io import *
11
+ from .parallel import *
12
+ from .print import *
13
+ from .version_pkg import *
15
14
 
15
+ __version__: str
@@ -0,0 +1,86 @@
1
+
2
+
3
+ # PYTHON_ARGCOMPLETE_OK
4
+ # Imports
5
+ import argparse
6
+ import sys
7
+
8
+ import argcomplete
9
+
10
+ from .all_doctests import launch_tests
11
+ from .archive import archive_cli
12
+ from .backup import backup_cli
13
+ from .decorators import handle_error
14
+ from .print import CYAN, GREEN, RESET
15
+ from .version_pkg import show_version_cli
16
+
17
+ # Argument Parser Setup for Auto-Completion
18
+ parser = argparse.ArgumentParser(prog="stouputils", add_help=False)
19
+ parser.add_argument("command", nargs="?", choices=[
20
+ "--version", "-v", "version", "show_version", "all_doctests", "archive", "backup", "build"
21
+ ])
22
+ parser.add_argument("args", nargs="*")
23
+ argcomplete.autocomplete(parser)
24
+
25
+
26
+ @handle_error(message="Error while running 'stouputils'")
27
+ def main() -> None:
28
+ second_arg: str = sys.argv[1].lower() if len(sys.argv) >= 2 else ""
29
+
30
+ # Print the version of stouputils and its dependencies
31
+ if second_arg in ("--version", "-v", "version", "show_version"):
32
+ return show_version_cli()
33
+
34
+ # Handle "all_doctests" command
35
+ if second_arg == "all_doctests":
36
+ if launch_tests("." if len(sys.argv) == 2 else sys.argv[2]) > 0:
37
+ sys.exit(1)
38
+ return
39
+
40
+ # Handle "archive" command
41
+ if second_arg == "archive":
42
+ sys.argv.pop(1) # Remove "archive" from argv so archive_cli gets clean arguments
43
+ return archive_cli()
44
+
45
+ # Handle "backup" command
46
+ if second_arg == "backup":
47
+ sys.argv.pop(1) # Remove "backup" from argv so backup_cli gets clean arguments
48
+ return backup_cli()
49
+
50
+ # Handle "build" command
51
+ if second_arg == "build":
52
+ from .continuous_delivery.pypi import pypi_full_routine_using_uv
53
+ return pypi_full_routine_using_uv()
54
+
55
+ # Check if the command is any package name
56
+ if second_arg in (): # type: ignore
57
+ return
58
+
59
+ # Get version
60
+ from importlib.metadata import version
61
+ try:
62
+ pkg_version = version("stouputils")
63
+ except Exception:
64
+ pkg_version = "unknown"
65
+
66
+ # Print help with nice formatting
67
+ separator: str = "─" * 60
68
+ print(f"""
69
+ {CYAN}{separator}{RESET}
70
+ {CYAN}stouputils {GREEN}CLI {CYAN}v{pkg_version}{RESET}
71
+ {CYAN}{separator}{RESET}
72
+ {CYAN}Usage:{RESET} stouputils <command> [options]
73
+
74
+ {CYAN}Available commands:{RESET}
75
+ {GREEN}--version, -v{RESET} [pkg] [-t <depth>] Show version information (optionally for a specific package)
76
+ {GREEN}all_doctests{RESET} [dir] Run all doctests in the specified directory
77
+ {GREEN}archive{RESET} --help Archive utilities (make, repair)
78
+ {GREEN}backup{RESET} --help Backup utilities (delta, consolidate, limit)
79
+ {GREEN}build{RESET} [--no_stubs] [<minor|major>] Build and publish package to PyPI using 'uv' tool (complete routine)
80
+ {CYAN}{separator}{RESET}
81
+ """.strip())
82
+ return
83
+
84
+ if __name__ == "__main__":
85
+ main()
86
+
@@ -0,0 +1,37 @@
1
+ """ Deprecated functions and classes.
2
+
3
+ This module contains deprecated functions that have been replaced by new implementations
4
+ These functions are retained for backward compatibility and will log deprecation warnings when used.
5
+ """
6
+
7
+ # Imports
8
+ from typing import Any
9
+
10
+ from .decorators import LogLevels, deprecated
11
+ from .io import csv_dump, csv_load, json_dump, json_load
12
+
13
+
14
+ # Deprecated functions
15
+ @deprecated(message="super_csv_dump has been renamed to csv_dump.", version="v1.8.0", error_log=LogLevels.WARNING)
16
+ def super_csv_dump(*args: Any, **kwargs: Any) -> Any:
17
+ """ Deprecated function, use "csv_dump" instead. """
18
+ return csv_dump(*args, **kwargs)
19
+
20
+
21
+ @deprecated(message="super_csv_load has been renamed to csv_load.", version="v1.8.0", error_log=LogLevels.WARNING)
22
+ def super_csv_load(*args: Any, **kwargs: Any) -> Any:
23
+ """ Deprecated function, use "csv_load" instead. """
24
+ return csv_load(*args, **kwargs)
25
+
26
+
27
+ @deprecated(message="super_json_dump has been renamed to json_dump.", version="v1.8.0", error_log=LogLevels.WARNING)
28
+ def super_json_dump(*args: Any, **kwargs: Any) -> Any:
29
+ """ Deprecated function, use "json_dump" instead. """
30
+ return json_dump(*args, **kwargs)
31
+
32
+
33
+ @deprecated(message="super_json_load has been renamed to json_load.", version="v1.8.0", error_log=LogLevels.WARNING)
34
+ def super_json_load(*args: Any, **kwargs: Any) -> Any:
35
+ """ Deprecated function, use "json_load" instead. """
36
+ return json_load(*args, **kwargs)
37
+
@@ -0,0 +1,12 @@
1
+ from .decorators import LogLevels as LogLevels, deprecated as deprecated
2
+ from .io import csv_dump as csv_dump, csv_load as csv_load, json_dump as json_dump, json_load as json_load
3
+ from typing import Any
4
+
5
+ def super_csv_dump(*args: Any, **kwargs: Any) -> Any:
6
+ ''' Deprecated function, use "csv_dump" instead. '''
7
+ def super_csv_load(*args: Any, **kwargs: Any) -> Any:
8
+ ''' Deprecated function, use "csv_load" instead. '''
9
+ def super_json_dump(*args: Any, **kwargs: Any) -> Any:
10
+ ''' Deprecated function, use "json_dump" instead. '''
11
+ def super_json_load(*args: Any, **kwargs: Any) -> Any:
12
+ ''' Deprecated function, use "json_load" instead. '''