stouputils 1.4.0__tar.gz → 1.4.2__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.
- {stouputils-1.4.0 → stouputils-1.4.2}/.gitignore +1 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/LICENSE +21 -21
- {stouputils-1.4.0 → stouputils-1.4.2}/PKG-INFO +1 -1
- {stouputils-1.4.0 → stouputils-1.4.2}/README.md +102 -102
- {stouputils-1.4.0 → stouputils-1.4.2}/pyproject.toml +4 -1
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/__init__.py +5 -5
- stouputils-1.4.2/stouputils/__main__.py +35 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/all_doctests.py +23 -12
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/applications/automatic_docs.py +520 -519
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/applications/upscaler/image.py +2 -2
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/applications/upscaler/video.py +2 -2
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/archive.py +129 -110
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/backup.py +120 -119
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/collections.py +2 -3
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/continuous_delivery/__init__.py +25 -25
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/continuous_delivery/cd_utils.py +141 -141
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/continuous_delivery/pypi.py +90 -90
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/continuous_delivery/pyproject.py +124 -124
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/ctx.py +286 -276
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/config/set.py +125 -125
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/base_keras.py +765 -766
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +31 -31
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/decorators.py +109 -109
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/image.py +7 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/installer/__init__.py +18 -18
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/installer/linux.py +144 -144
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/installer/main.py +223 -223
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/installer/windows.py +136 -136
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/io.py +144 -141
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/parallel.py +68 -85
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/print.py +119 -29
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/py.typed +1 -1
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/applications/__init__.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/applications/upscaler/__init__.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/applications/upscaler/config.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/continuous_delivery/github.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/config/get.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/__init__.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/auto_contrast.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/axis_flip.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/bias_field_correction.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/binary_threshold.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/blur.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/brightness.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/canny.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/clahe.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/common.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/contrast.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/denoise.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/histogram_equalization.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/invert.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/laplacian.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/median_blur.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/noise.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/normalize.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/random_erase.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/resize.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/rotation.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/salt_pepper.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/sharpening.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/shearing.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/threshold.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/translation.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image/zoom.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image_augmentation.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/image_preprocess.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/prosthesis_detection.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/data_processing/technique.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/dataset/__init__.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/dataset/dataset.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/dataset/dataset_loader.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/dataset/grouping_strategy.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/dataset/image_loader.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/dataset/xy_tuple.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/metric_dictionnary.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/metric_utils.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/mlflow_utils.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/abstract_model.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/all.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/all.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/convnext.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/densenet.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/efficientnet.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/mobilenet.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/resnet.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/squeezenet.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/vgg.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras/xception.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/losses/__init__.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/keras_utils/visualizations.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/model_interface.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/models/sandbox.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/range_tuple.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/scripts/augment_dataset.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/scripts/exhaustive_process.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/scripts/routine.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/data_science/utils.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/installer/common.py +0 -0
- {stouputils-1.4.0 → stouputils-1.4.2}/stouputils/installer/downloader.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.
|
|
3
|
+
Version: 1.4.2
|
|
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
|
-
[](https://github.com/Stoupy51/stouputils/releases/latest)
|
|
3
|
-
[](https://pypi.org/project/stouputils/)
|
|
4
|
-
[](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
|
+
[](https://github.com/Stoupy51/stouputils/releases/latest)
|
|
3
|
+
[](https://pypi.org/project/stouputils/)
|
|
4
|
+
[](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.
|
|
8
|
+
version = "1.4.2"
|
|
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"
|
|
@@ -23,6 +23,9 @@ email = "stoupy51@gmail.com"
|
|
|
23
23
|
Homepage = "https://github.com/Stoupy51/stouputils"
|
|
24
24
|
Issues = "https://github.com/Stoupy51/stouputils/issues"
|
|
25
25
|
|
|
26
|
+
[project.scripts]
|
|
27
|
+
stouputils = "stouputils.__main__:main"
|
|
28
|
+
|
|
26
29
|
[tool.pyright]
|
|
27
30
|
typeCheckingMode = "strict"
|
|
28
31
|
|
|
@@ -16,6 +16,9 @@ Key Features:
|
|
|
16
16
|
"""
|
|
17
17
|
# ruff: noqa: F403
|
|
18
18
|
|
|
19
|
+
# Version (handle case where the package is not installed)
|
|
20
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
21
|
+
|
|
19
22
|
# Imports
|
|
20
23
|
from .all_doctests import *
|
|
21
24
|
from .archive import *
|
|
@@ -31,11 +34,8 @@ from .io import *
|
|
|
31
34
|
from .parallel import *
|
|
32
35
|
from .print import *
|
|
33
36
|
|
|
34
|
-
# Version (handle case where the package is not installed)
|
|
35
|
-
import importlib.metadata
|
|
36
|
-
|
|
37
37
|
try:
|
|
38
|
-
__version__: str =
|
|
39
|
-
except
|
|
38
|
+
__version__: str = version("stouputils")
|
|
39
|
+
except PackageNotFoundError:
|
|
40
40
|
__version__: str = "0.0.0-dev"
|
|
41
41
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
# Imports
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
from .all_doctests import launch_tests
|
|
7
|
+
from .decorators import handle_error
|
|
8
|
+
from .print import show_version
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@handle_error(message="Error while running 'stouputils'")
|
|
12
|
+
def main():
|
|
13
|
+
second_arg: str = sys.argv[1].lower() if len(sys.argv) >= 2 else ""
|
|
14
|
+
if not second_arg:
|
|
15
|
+
# TODO
|
|
16
|
+
return
|
|
17
|
+
|
|
18
|
+
# Print the version of stouputils and its dependencies
|
|
19
|
+
if second_arg in ("--version","-v"):
|
|
20
|
+
return show_version()
|
|
21
|
+
|
|
22
|
+
# Handle "all_doctests" command
|
|
23
|
+
if second_arg == "all_doctests":
|
|
24
|
+
if launch_tests("." if len(sys.argv) == 2 else sys.argv[2]) > 0:
|
|
25
|
+
sys.exit(1)
|
|
26
|
+
return
|
|
27
|
+
|
|
28
|
+
# Check if the command is any package name
|
|
29
|
+
if second_arg in (): # type: ignore
|
|
30
|
+
return
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == "__main__":
|
|
34
|
+
main()
|
|
35
|
+
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"""
|
|
2
2
|
This module is used to run all the doctests for all the modules in a given directory.
|
|
3
3
|
|
|
4
|
+
- launch_tests: Main function to launch tests for all modules in the given directory.
|
|
5
|
+
- test_module_with_progress: Test a module with testmod and measure the time taken with progress printing.
|
|
6
|
+
|
|
4
7
|
.. image:: https://raw.githubusercontent.com/Stoupy51/stouputils/refs/heads/main/assets/all_doctests_module.gif
|
|
5
8
|
:alt: stouputils all_doctests examples
|
|
6
9
|
"""
|
|
@@ -14,24 +17,17 @@ from doctest import TestResults, testmod
|
|
|
14
17
|
from types import ModuleType
|
|
15
18
|
|
|
16
19
|
from . import decorators
|
|
17
|
-
from .decorators import
|
|
18
|
-
from .print import error, info, progress, warning
|
|
20
|
+
from .decorators import measure_time
|
|
19
21
|
from .io import clean_path, relative_path
|
|
22
|
+
from .print import error, info, progress, warning
|
|
20
23
|
|
|
21
24
|
|
|
22
|
-
def test_module_with_progress(module: ModuleType, separator: str) -> TestResults:
|
|
23
|
-
@measure_time(progress, message=f"Testing module '{module.__name__}' {separator}took")
|
|
24
|
-
def internal() -> TestResults:
|
|
25
|
-
return testmod(m=module)
|
|
26
|
-
return internal()
|
|
27
|
-
|
|
28
25
|
# Main program
|
|
29
|
-
def launch_tests(root_dir: str,
|
|
26
|
+
def launch_tests(root_dir: str, strict: bool = True) -> int:
|
|
30
27
|
""" Main function to launch tests for all modules in the given directory.
|
|
31
28
|
|
|
32
29
|
Args:
|
|
33
30
|
root_dir (str): Root directory to search for modules
|
|
34
|
-
importing_errors (LogLevels): Log level for the errors when importing modules
|
|
35
31
|
strict (bool): Modify the force_raise_exception variable to True in the decorators module
|
|
36
32
|
|
|
37
33
|
Returns:
|
|
@@ -61,7 +57,7 @@ def launch_tests(root_dir: str, importing_errors: LogLevels = LogLevels.WARNING_
|
|
|
61
57
|
old_value: bool = strict
|
|
62
58
|
decorators.force_raise_exception = True
|
|
63
59
|
strict = old_value
|
|
64
|
-
|
|
60
|
+
|
|
65
61
|
# Get the path of the directory to check modules from
|
|
66
62
|
working_dir: str = clean_path(os.getcwd())
|
|
67
63
|
root_dir = clean_path(os.path.abspath(root_dir))
|
|
@@ -108,7 +104,7 @@ def launch_tests(root_dir: str, importing_errors: LogLevels = LogLevels.WARNING_
|
|
|
108
104
|
def internal(a: str = module_path, b: str = separator) -> None:
|
|
109
105
|
modules.append(importlib.import_module(a))
|
|
110
106
|
separators.append(b)
|
|
111
|
-
|
|
107
|
+
|
|
112
108
|
try:
|
|
113
109
|
internal()
|
|
114
110
|
except Exception as e:
|
|
@@ -135,3 +131,18 @@ def launch_tests(root_dir: str, importing_errors: LogLevels = LogLevels.WARNING_
|
|
|
135
131
|
# Return the number of failed tests
|
|
136
132
|
return nb_failed_tests
|
|
137
133
|
|
|
134
|
+
|
|
135
|
+
def test_module_with_progress(module: ModuleType, separator: str) -> TestResults:
|
|
136
|
+
""" Test a module with testmod and measure the time taken with progress printing.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
module (ModuleType): Module to test
|
|
140
|
+
separator (str): Separator string for alignment in output
|
|
141
|
+
Returns:
|
|
142
|
+
TestResults: The results of the tests
|
|
143
|
+
"""
|
|
144
|
+
@measure_time(progress, message=f"Testing module '{module.__name__}' {separator}took")
|
|
145
|
+
def internal() -> TestResults:
|
|
146
|
+
return testmod(m=module)
|
|
147
|
+
return internal()
|
|
148
|
+
|