stouputils 1.4.7__tar.gz → 1.4.8__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 (107) hide show
  1. {stouputils-1.4.7 → stouputils-1.4.8}/LICENSE +21 -21
  2. {stouputils-1.4.7 → stouputils-1.4.8}/PKG-INFO +1 -1
  3. {stouputils-1.4.7 → stouputils-1.4.8}/README.md +102 -102
  4. {stouputils-1.4.7 → stouputils-1.4.8}/pyproject.toml +1 -1
  5. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/continuous_delivery/__init__.py +25 -25
  6. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/continuous_delivery/cd_utils.py +141 -141
  7. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/continuous_delivery/pypi.py +90 -90
  8. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/continuous_delivery/pyproject.py +124 -124
  9. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/ctx.py +286 -286
  10. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/config/set.py +125 -125
  11. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/base_keras.py +765 -765
  12. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +31 -31
  13. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/decorators.py +8 -2
  14. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/installer/__init__.py +18 -18
  15. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/installer/linux.py +144 -144
  16. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/installer/main.py +223 -223
  17. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/installer/windows.py +136 -136
  18. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/io.py +13 -1
  19. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/parallel.py +1 -1
  20. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/py.typed +1 -1
  21. {stouputils-1.4.7 → stouputils-1.4.8}/.gitignore +0 -0
  22. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/__init__.py +0 -0
  23. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/__main__.py +0 -0
  24. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/all_doctests.py +0 -0
  25. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/applications/__init__.py +0 -0
  26. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/applications/automatic_docs.py +0 -0
  27. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/applications/upscaler/__init__.py +0 -0
  28. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/applications/upscaler/config.py +0 -0
  29. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/applications/upscaler/image.py +0 -0
  30. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/applications/upscaler/video.py +0 -0
  31. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/archive.py +0 -0
  32. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/backup.py +0 -0
  33. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/collections.py +0 -0
  34. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/continuous_delivery/github.py +0 -0
  35. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/config/get.py +0 -0
  36. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/__init__.py +0 -0
  37. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/auto_contrast.py +0 -0
  38. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/axis_flip.py +0 -0
  39. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/bias_field_correction.py +0 -0
  40. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/binary_threshold.py +0 -0
  41. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/blur.py +0 -0
  42. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/brightness.py +0 -0
  43. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/canny.py +0 -0
  44. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/clahe.py +0 -0
  45. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/common.py +0 -0
  46. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/contrast.py +0 -0
  47. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +0 -0
  48. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/denoise.py +0 -0
  49. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/histogram_equalization.py +0 -0
  50. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/invert.py +0 -0
  51. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/laplacian.py +0 -0
  52. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/median_blur.py +0 -0
  53. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/noise.py +0 -0
  54. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/normalize.py +0 -0
  55. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/random_erase.py +0 -0
  56. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/resize.py +0 -0
  57. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/rotation.py +0 -0
  58. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/salt_pepper.py +0 -0
  59. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/sharpening.py +0 -0
  60. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/shearing.py +0 -0
  61. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/threshold.py +0 -0
  62. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/translation.py +0 -0
  63. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image/zoom.py +0 -0
  64. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image_augmentation.py +0 -0
  65. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/image_preprocess.py +0 -0
  66. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/prosthesis_detection.py +0 -0
  67. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/data_processing/technique.py +0 -0
  68. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/dataset/__init__.py +0 -0
  69. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/dataset/dataset.py +0 -0
  70. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/dataset/dataset_loader.py +0 -0
  71. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/dataset/grouping_strategy.py +0 -0
  72. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/dataset/image_loader.py +0 -0
  73. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/dataset/xy_tuple.py +0 -0
  74. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/metric_dictionnary.py +0 -0
  75. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/metric_utils.py +0 -0
  76. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/mlflow_utils.py +0 -0
  77. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/abstract_model.py +0 -0
  78. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/all.py +0 -0
  79. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/all.py +0 -0
  80. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/convnext.py +0 -0
  81. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/densenet.py +0 -0
  82. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/efficientnet.py +0 -0
  83. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/mobilenet.py +0 -0
  84. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/resnet.py +0 -0
  85. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/squeezenet.py +0 -0
  86. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/vgg.py +0 -0
  87. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras/xception.py +0 -0
  88. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +0 -0
  89. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +0 -0
  90. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +0 -0
  91. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +0 -0
  92. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +0 -0
  93. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/losses/__init__.py +0 -0
  94. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +0 -0
  95. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/keras_utils/visualizations.py +0 -0
  96. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/model_interface.py +0 -0
  97. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/models/sandbox.py +0 -0
  98. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/range_tuple.py +0 -0
  99. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/scripts/augment_dataset.py +0 -0
  100. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/scripts/exhaustive_process.py +0 -0
  101. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
  102. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/scripts/routine.py +0 -0
  103. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/data_science/utils.py +0 -0
  104. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/image.py +0 -0
  105. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/installer/common.py +0 -0
  106. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/installer/downloader.py +0 -0
  107. {stouputils-1.4.7 → stouputils-1.4.8}/stouputils/print.py +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Alexandre Collignon
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Alexandre Collignon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stouputils
3
- Version: 1.4.7
3
+ Version: 1.4.8
4
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
5
  Project-URL: Homepage, https://github.com/Stoupy51/stouputils
6
6
  Project-URL: Issues, https://github.com/Stoupy51/stouputils/issues
@@ -1,102 +1,102 @@
1
- # 🛠️ Project Badges
2
- [![GitHub](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=github&label=GitHub)](https://github.com/Stoupy51/stouputils/releases/latest)
3
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/stouputils?logo=python&label=PyPI%20downloads)](https://pypi.org/project/stouputils/)
4
- [![Documentation](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=sphinx&label=Documentation&color=purple)](https://stoupy51.github.io/stouputils/latest/)
5
-
6
- <br>
7
-
8
- # 📚 Project Overview
9
- Stouputils is a collection of utility modules designed to simplify and enhance the development process.<br>
10
- It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers.
11
-
12
-
13
- # 🚀 Project File Tree
14
- <html>
15
- <details style="display: none;">
16
- <summary></summary>
17
- <style>
18
- .code-tree {
19
- border-radius: 6px;
20
- padding: 16px;
21
- font-family: monospace;
22
- line-height: 1.45;
23
- overflow: auto;
24
- white-space: pre;
25
- background-color:rgb(43, 43, 43);
26
- color: #d4d4d4;
27
- }
28
- .code-tree a {
29
- color: #569cd6;
30
- text-decoration: none;
31
- }
32
- .code-tree a:hover {
33
- text-decoration: underline;
34
- }
35
- .code-tree .comment {
36
- color:rgb(231, 213, 48);
37
- }
38
- </style>
39
- </details>
40
-
41
- <pre class="code-tree">stouputils/
42
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.html">applications/</a>
43
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.automatic_docs.html">automatic_docs.py</a> <span class="comment"># 📚 Documentation generation utilities (used to create this documentation)</span>
44
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.upscaler.html">upscaler/</a> <span class="comment"># 🔎 Image & Video upscaler (configurable)</span>
45
- │ └── ...
46
-
47
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.html">continuous_delivery/</a>
48
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.cd_utils.html">cd_utils.py</a> <span class="comment"># 🔧 Common utilities for continuous delivery</span>
49
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.github.html">github.py</a> <span class="comment"># 📦 GitHub utilities (upload_to_github)</span>
50
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pypi.html">pypi.py</a> <span class="comment"># 📦 PyPI utilities (pypi_full_routine)</span>
51
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pyproject.html">pyproject.py</a> <span class="comment"># 📝 Pyproject.toml utilities</span>
52
- │ └── ...
53
-
54
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.html">data_science/</a>
55
- │ ├── <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>
56
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.dataset.html">dataset/</a> <span class="comment"># 📊 Dataset handling (dataset, dataset_loader, grouping_strategy)</span>
57
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.data_processing.html">data_processing/</a> <span class="comment"># 🔄 Data processing utilities (image augmentation, preprocessing)</span>
58
- │ │ ├── <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>
59
- │ │ └── ...
60
- │ ├── <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>
61
- │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras.html">keras/</a> <span class="comment"># 🤖 Keras model implementations</span>
62
- │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras_utils.html">keras_utils/</a> <span class="comment"># 🛠️ Keras utilities (callbacks, losses, visualizations)</span>
63
- │ │ └── ...
64
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.scripts.html">scripts/</a> <span class="comment"># 📜 Data science scripts (augment, preprocess, routine)</span>
65
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.metric_utils.html">metric_utils.py</a> <span class="comment"># 📏 Metrics utilities for ML/DL models</span>
66
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.mlflow_utils.html">mlflow_utils.py</a> <span class="comment"># 📊 MLflow integration utilities</span>
67
- │ └── ...
68
-
69
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.html">installer/</a>
70
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.common.html">common.py</a> <span class="comment"># 🔧 Common installer utilities</span>
71
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.downloader.html">downloader.py</a> <span class="comment"># ⬇️ File download utilities</span>
72
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.linux.html">linux.py</a> <span class="comment"># 🐧 Linux-specific installer utilities</span>
73
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.main.html">main.py</a> <span class="comment"># 🚀 Main installer functionality</span>
74
- │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.windows.html">windows.py</a> <span class="comment"># 💻 Windows-specific installer utilities</span>
75
- │ └── ...
76
-
77
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.all_doctests.html">all_doctests.py</a> <span class="comment"># ✅ Execution of all doctests for a given path</span>
78
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.archive.html">archive.py</a> <span class="comment"># 📦 Archive utilities (zip, repair_zip)</span>
79
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.backup.html">backup.py</a> <span class="comment"># 📦 Backup utilities (delta backup, consolidate)</span>
80
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.collections.html">collections.py</a> <span class="comment"># 🧰 Collection utilities (unique_list)</span>
81
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.ctx.html">ctx.py</a> <span class="comment"># 🚫 Context managers (Muffle, LogToFile)</span>
82
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.decorators.html">decorators.py</a> <span class="comment"># 🎯 Decorators (silent, measure_time, error_handler, simple_cache)</span>
83
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.image.html">image.py</a> <span class="comment"># 🖼️ Image utilities (image_resize)</span>
84
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.io.html">io.py</a> <span class="comment"># 💻 I/O utilities (file management, json)</span>
85
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.parallel.html">parallel.py</a> <span class="comment"># 🧑‍🤝‍🧑 Parallel processing (multiprocessing, multithreading)</span>
86
- ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.print.html">print.py</a> <span class="comment"># 🖨️ Display utilities (info, debug, warning, error)</span>
87
- └── ...
88
- </pre>
89
- </html>
90
-
91
- ## ⭐ Star History
92
-
93
- <html>
94
- <a href="https://star-history.com/#Stoupy51/stouputils&Date">
95
- <picture>
96
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date&theme=dark" />
97
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
98
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
99
- </picture>
100
- </a>
101
- </html>
102
-
1
+ # 🛠️ Project Badges
2
+ [![GitHub](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=github&label=GitHub)](https://github.com/Stoupy51/stouputils/releases/latest)
3
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/stouputils?logo=python&label=PyPI%20downloads)](https://pypi.org/project/stouputils/)
4
+ [![Documentation](https://img.shields.io/github/v/release/Stoupy51/stouputils?logo=sphinx&label=Documentation&color=purple)](https://stoupy51.github.io/stouputils/latest/)
5
+
6
+ <br>
7
+
8
+ # 📚 Project Overview
9
+ Stouputils is a collection of utility modules designed to simplify and enhance the development process.<br>
10
+ It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers.
11
+
12
+
13
+ # 🚀 Project File Tree
14
+ <html>
15
+ <details style="display: none;">
16
+ <summary></summary>
17
+ <style>
18
+ .code-tree {
19
+ border-radius: 6px;
20
+ padding: 16px;
21
+ font-family: monospace;
22
+ line-height: 1.45;
23
+ overflow: auto;
24
+ white-space: pre;
25
+ background-color:rgb(43, 43, 43);
26
+ color: #d4d4d4;
27
+ }
28
+ .code-tree a {
29
+ color: #569cd6;
30
+ text-decoration: none;
31
+ }
32
+ .code-tree a:hover {
33
+ text-decoration: underline;
34
+ }
35
+ .code-tree .comment {
36
+ color:rgb(231, 213, 48);
37
+ }
38
+ </style>
39
+ </details>
40
+
41
+ <pre class="code-tree">stouputils/
42
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.html">applications/</a>
43
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.automatic_docs.html">automatic_docs.py</a> <span class="comment"># 📚 Documentation generation utilities (used to create this documentation)</span>
44
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.applications.upscaler.html">upscaler/</a> <span class="comment"># 🔎 Image & Video upscaler (configurable)</span>
45
+ │ └── ...
46
+
47
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.html">continuous_delivery/</a>
48
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.cd_utils.html">cd_utils.py</a> <span class="comment"># 🔧 Common utilities for continuous delivery</span>
49
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.github.html">github.py</a> <span class="comment"># 📦 GitHub utilities (upload_to_github)</span>
50
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pypi.html">pypi.py</a> <span class="comment"># 📦 PyPI utilities (pypi_full_routine)</span>
51
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.continuous_delivery.pyproject.html">pyproject.py</a> <span class="comment"># 📝 Pyproject.toml utilities</span>
52
+ │ └── ...
53
+
54
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.html">data_science/</a>
55
+ │ ├── <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>
56
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.dataset.html">dataset/</a> <span class="comment"># 📊 Dataset handling (dataset, dataset_loader, grouping_strategy)</span>
57
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.data_processing.html">data_processing/</a> <span class="comment"># 🔄 Data processing utilities (image augmentation, preprocessing)</span>
58
+ │ │ ├── <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>
59
+ │ │ └── ...
60
+ │ ├── <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>
61
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras.html">keras/</a> <span class="comment"># 🤖 Keras model implementations</span>
62
+ │ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.models.keras_utils.html">keras_utils/</a> <span class="comment"># 🛠️ Keras utilities (callbacks, losses, visualizations)</span>
63
+ │ │ └── ...
64
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.scripts.html">scripts/</a> <span class="comment"># 📜 Data science scripts (augment, preprocess, routine)</span>
65
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.metric_utils.html">metric_utils.py</a> <span class="comment"># 📏 Metrics utilities for ML/DL models</span>
66
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.data_science.mlflow_utils.html">mlflow_utils.py</a> <span class="comment"># 📊 MLflow integration utilities</span>
67
+ │ └── ...
68
+
69
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.html">installer/</a>
70
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.common.html">common.py</a> <span class="comment"># 🔧 Common installer utilities</span>
71
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.downloader.html">downloader.py</a> <span class="comment"># ⬇️ File download utilities</span>
72
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.linux.html">linux.py</a> <span class="comment"># 🐧 Linux-specific installer utilities</span>
73
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.main.html">main.py</a> <span class="comment"># 🚀 Main installer functionality</span>
74
+ │ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.installer.windows.html">windows.py</a> <span class="comment"># 💻 Windows-specific installer utilities</span>
75
+ │ └── ...
76
+
77
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.all_doctests.html">all_doctests.py</a> <span class="comment"># ✅ Execution of all doctests for a given path</span>
78
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.archive.html">archive.py</a> <span class="comment"># 📦 Archive utilities (zip, repair_zip)</span>
79
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.backup.html">backup.py</a> <span class="comment"># 📦 Backup utilities (delta backup, consolidate)</span>
80
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.collections.html">collections.py</a> <span class="comment"># 🧰 Collection utilities (unique_list)</span>
81
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.ctx.html">ctx.py</a> <span class="comment"># 🚫 Context managers (Muffle, LogToFile)</span>
82
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.decorators.html">decorators.py</a> <span class="comment"># 🎯 Decorators (silent, measure_time, error_handler, simple_cache)</span>
83
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.image.html">image.py</a> <span class="comment"># 🖼️ Image utilities (image_resize)</span>
84
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.io.html">io.py</a> <span class="comment"># 💻 I/O utilities (file management, json)</span>
85
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.parallel.html">parallel.py</a> <span class="comment"># 🧑‍🤝‍🧑 Parallel processing (multiprocessing, multithreading)</span>
86
+ ├── <a href="https://stoupy51.github.io/stouputils/latest/modules/stouputils.print.html">print.py</a> <span class="comment"># 🖨️ Display utilities (info, debug, warning, error)</span>
87
+ └── ...
88
+ </pre>
89
+ </html>
90
+
91
+ ## ⭐ Star History
92
+
93
+ <html>
94
+ <a href="https://star-history.com/#Stoupy51/stouputils&Date">
95
+ <picture>
96
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date&theme=dark" />
97
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
98
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Stoupy51/stouputils&type=Date" />
99
+ </picture>
100
+ </a>
101
+ </html>
102
+
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
 
6
6
  [project]
7
7
  name = "stouputils"
8
- version = "1.4.7"
8
+ version = "1.4.8"
9
9
  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."
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
@@ -1,25 +1,25 @@
1
- """ Continuous delivery and deployment utilities.
2
-
3
- This module provides tools for automating software delivery and deployment:
4
-
5
- Key Features:
6
- - GitHub release management and uploads
7
- - PyPI package publishing utilities
8
- - pyproject.toml file management
9
- - Common CD/CI utilities
10
-
11
- Components:
12
- - cd_utils: Common utilities for continuous delivery
13
- - github: GitHub-specific utilities (upload_to_github)
14
- - pypi: PyPI publishing tools (pypi_full_routine)
15
- - pyproject: pyproject.toml file management
16
-
17
- """
18
- # ruff: noqa: F403
19
-
20
- # Imports
21
- from .cd_utils import *
22
- from .github import *
23
- from .pypi import *
24
- from .pyproject import *
25
-
1
+ """ Continuous delivery and deployment utilities.
2
+
3
+ This module provides tools for automating software delivery and deployment:
4
+
5
+ Key Features:
6
+ - GitHub release management and uploads
7
+ - PyPI package publishing utilities
8
+ - pyproject.toml file management
9
+ - Common CD/CI utilities
10
+
11
+ Components:
12
+ - cd_utils: Common utilities for continuous delivery
13
+ - github: GitHub-specific utilities (upload_to_github)
14
+ - pypi: PyPI publishing tools (pypi_full_routine)
15
+ - pyproject: pyproject.toml file management
16
+
17
+ """
18
+ # ruff: noqa: F403
19
+
20
+ # Imports
21
+ from .cd_utils import *
22
+ from .github import *
23
+ from .pypi import *
24
+ from .pyproject import *
25
+
@@ -1,141 +1,141 @@
1
- """ This module contains utilities for continuous delivery, such as loading credentials from a file.
2
- It is mainly used by the `stouputils.continuous_delivery.github` module.
3
- """
4
-
5
- # Imports
6
- import os
7
- from typing import Any
8
-
9
- import requests
10
- import yaml
11
-
12
- from ..decorators import handle_error
13
- from ..io import clean_path, super_json_load
14
- from ..print import warning
15
-
16
-
17
- # Load credentials from file
18
- @handle_error()
19
- def load_credentials(credentials_path: str) -> dict[str, Any]:
20
- """ Load credentials from a JSON or YAML file into a dictionary.
21
-
22
- Loads credentials from either a JSON or YAML file and returns them as a dictionary.
23
- The file must contain the required credentials in the appropriate format.
24
-
25
- Args:
26
- credentials_path (str): Path to the credentials file (.json or .yml)
27
- Returns:
28
- dict[str, Any]: Dictionary containing the credentials
29
-
30
- Example JSON format:
31
-
32
- .. code-block:: json
33
-
34
- {
35
- "github": {
36
- "username": "Stoupy51",
37
- "api_key": "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXX"
38
- }
39
- }
40
-
41
- Example YAML format:
42
-
43
- .. code-block:: yaml
44
-
45
- github:
46
- username: "Stoupy51"
47
- api_key: "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXX"
48
- """
49
- # Get the absolute path of the credentials file
50
- warning(
51
- "Be cautious when loading credentials from external sources like this, "
52
- "as they might contain malicious code that could compromise your credentials without your knowledge"
53
- )
54
- credentials_path = clean_path(credentials_path)
55
-
56
- # Check if the file exists
57
- if not os.path.exists(credentials_path):
58
- raise FileNotFoundError(f"Credentials file not found at '{credentials_path}'")
59
-
60
- # Load the file if it's a JSON file
61
- if credentials_path.endswith(".json"):
62
- return super_json_load(credentials_path)
63
-
64
- # Else, load the file if it's a YAML file
65
- elif credentials_path.endswith((".yml", ".yaml")):
66
- with open(credentials_path) as f:
67
- return yaml.safe_load(f)
68
-
69
- # Else, raise an error
70
- else:
71
- raise ValueError("Credentials file must be .json or .yml format")
72
-
73
- # Handle a response
74
- def handle_response(response: requests.Response, error_message: str) -> None:
75
- """ Handle a response from the API by raising an error if the response is not successful (status code not in 200-299).
76
-
77
- Args:
78
- response (requests.Response): The response from the API
79
- error_message (str): The error message to raise if the response is not successful
80
- """
81
- if response.status_code < 200 or response.status_code >= 300:
82
- try:
83
- raise ValueError(f"{error_message}, response code {response.status_code} with response {response.json()}")
84
- except requests.exceptions.JSONDecodeError as e:
85
- raise ValueError(f"{error_message}, response code {response.status_code} with response {response.text}") from e
86
-
87
- # Clean a version string
88
- def clean_version(version: str, keep: str = "") -> str:
89
- """ Clean a version string
90
-
91
- Args:
92
- version (str): The version string to clean
93
- keep (str): The characters to keep in the version string
94
- Returns:
95
- str: The cleaned version string
96
-
97
- >>> clean_version("v1.e0.zfezf0.1.2.3zefz")
98
- '1.0.0.1.2.3'
99
- >>> clean_version("v1.e0.zfezf0.1.2.3zefz", keep="v")
100
- 'v1.0.0.1.2.3'
101
- >>> clean_version("v1.2.3b", keep="ab")
102
- '1.2.3b'
103
- """
104
- return "".join(c for c in version if c in "0123456789." + keep)
105
-
106
- # Convert a version string to a float
107
- def version_to_float(version: str) -> float:
108
- """ Converts a version string into a float for comparison purposes.
109
- The version string is expected to follow the format of major.minor.patch.something_else....,
110
- where each part is separated by a dot and can be extended indefinitely.
111
-
112
- Args:
113
- version (str): The version string to convert. (e.g. "v1.0.0.1.2.3")
114
- Returns:
115
- float: The float representation of the version. (e.g. 0)
116
-
117
- >>> version_to_float("v1.0.0")
118
- 1.0
119
- >>> version_to_float("v1.0.0.1")
120
- 1.000000001
121
- >>> version_to_float("v2.3.7")
122
- 2.003007
123
- >>> version_to_float("v1.0.0.1.2.3")
124
- 1.0000000010020031
125
- >>> version_to_float("v2.0") > version_to_float("v1.0.0.1")
126
- True
127
- """
128
- # Clean the version string by keeping only the numbers and dots
129
- version = clean_version(version)
130
-
131
- # Split the version string into parts
132
- version_parts: list[str] = version.split(".")
133
- total: float = 0.0
134
- multiplier: float = 1.0
135
-
136
- # Iterate over the parts and add lesser and lesser weight to each part
137
- for part in version_parts:
138
- total += int(part) * multiplier
139
- multiplier /= 1_000
140
- return total
141
-
1
+ """ This module contains utilities for continuous delivery, such as loading credentials from a file.
2
+ It is mainly used by the `stouputils.continuous_delivery.github` module.
3
+ """
4
+
5
+ # Imports
6
+ import os
7
+ from typing import Any
8
+
9
+ import requests
10
+ import yaml
11
+
12
+ from ..decorators import handle_error
13
+ from ..io import clean_path, super_json_load
14
+ from ..print import warning
15
+
16
+
17
+ # Load credentials from file
18
+ @handle_error()
19
+ def load_credentials(credentials_path: str) -> dict[str, Any]:
20
+ """ Load credentials from a JSON or YAML file into a dictionary.
21
+
22
+ Loads credentials from either a JSON or YAML file and returns them as a dictionary.
23
+ The file must contain the required credentials in the appropriate format.
24
+
25
+ Args:
26
+ credentials_path (str): Path to the credentials file (.json or .yml)
27
+ Returns:
28
+ dict[str, Any]: Dictionary containing the credentials
29
+
30
+ Example JSON format:
31
+
32
+ .. code-block:: json
33
+
34
+ {
35
+ "github": {
36
+ "username": "Stoupy51",
37
+ "api_key": "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXX"
38
+ }
39
+ }
40
+
41
+ Example YAML format:
42
+
43
+ .. code-block:: yaml
44
+
45
+ github:
46
+ username: "Stoupy51"
47
+ api_key: "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXX"
48
+ """
49
+ # Get the absolute path of the credentials file
50
+ warning(
51
+ "Be cautious when loading credentials from external sources like this, "
52
+ "as they might contain malicious code that could compromise your credentials without your knowledge"
53
+ )
54
+ credentials_path = clean_path(credentials_path)
55
+
56
+ # Check if the file exists
57
+ if not os.path.exists(credentials_path):
58
+ raise FileNotFoundError(f"Credentials file not found at '{credentials_path}'")
59
+
60
+ # Load the file if it's a JSON file
61
+ if credentials_path.endswith(".json"):
62
+ return super_json_load(credentials_path)
63
+
64
+ # Else, load the file if it's a YAML file
65
+ elif credentials_path.endswith((".yml", ".yaml")):
66
+ with open(credentials_path) as f:
67
+ return yaml.safe_load(f)
68
+
69
+ # Else, raise an error
70
+ else:
71
+ raise ValueError("Credentials file must be .json or .yml format")
72
+
73
+ # Handle a response
74
+ def handle_response(response: requests.Response, error_message: str) -> None:
75
+ """ Handle a response from the API by raising an error if the response is not successful (status code not in 200-299).
76
+
77
+ Args:
78
+ response (requests.Response): The response from the API
79
+ error_message (str): The error message to raise if the response is not successful
80
+ """
81
+ if response.status_code < 200 or response.status_code >= 300:
82
+ try:
83
+ raise ValueError(f"{error_message}, response code {response.status_code} with response {response.json()}")
84
+ except requests.exceptions.JSONDecodeError as e:
85
+ raise ValueError(f"{error_message}, response code {response.status_code} with response {response.text}") from e
86
+
87
+ # Clean a version string
88
+ def clean_version(version: str, keep: str = "") -> str:
89
+ """ Clean a version string
90
+
91
+ Args:
92
+ version (str): The version string to clean
93
+ keep (str): The characters to keep in the version string
94
+ Returns:
95
+ str: The cleaned version string
96
+
97
+ >>> clean_version("v1.e0.zfezf0.1.2.3zefz")
98
+ '1.0.0.1.2.3'
99
+ >>> clean_version("v1.e0.zfezf0.1.2.3zefz", keep="v")
100
+ 'v1.0.0.1.2.3'
101
+ >>> clean_version("v1.2.3b", keep="ab")
102
+ '1.2.3b'
103
+ """
104
+ return "".join(c for c in version if c in "0123456789." + keep)
105
+
106
+ # Convert a version string to a float
107
+ def version_to_float(version: str) -> float:
108
+ """ Converts a version string into a float for comparison purposes.
109
+ The version string is expected to follow the format of major.minor.patch.something_else....,
110
+ where each part is separated by a dot and can be extended indefinitely.
111
+
112
+ Args:
113
+ version (str): The version string to convert. (e.g. "v1.0.0.1.2.3")
114
+ Returns:
115
+ float: The float representation of the version. (e.g. 0)
116
+
117
+ >>> version_to_float("v1.0.0")
118
+ 1.0
119
+ >>> version_to_float("v1.0.0.1")
120
+ 1.000000001
121
+ >>> version_to_float("v2.3.7")
122
+ 2.003007
123
+ >>> version_to_float("v1.0.0.1.2.3")
124
+ 1.0000000010020031
125
+ >>> version_to_float("v2.0") > version_to_float("v1.0.0.1")
126
+ True
127
+ """
128
+ # Clean the version string by keeping only the numbers and dots
129
+ version = clean_version(version)
130
+
131
+ # Split the version string into parts
132
+ version_parts: list[str] = version.split(".")
133
+ total: float = 0.0
134
+ multiplier: float = 1.0
135
+
136
+ # Iterate over the parts and add lesser and lesser weight to each part
137
+ for part in version_parts:
138
+ total += int(part) * multiplier
139
+ multiplier /= 1_000
140
+ return total
141
+