stouputils 1.9.7__tar.gz → 1.10.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.
- {stouputils-1.9.7 → stouputils-1.10.0}/LICENSE +21 -21
- {stouputils-1.9.7 → stouputils-1.10.0}/PKG-INFO +39 -36
- {stouputils-1.9.7 → stouputils-1.10.0}/README.md +36 -33
- {stouputils-1.9.7 → stouputils-1.10.0}/pyproject.toml +3 -3
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/automatic_docs.py +51 -1
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/pypi.py +90 -90
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/ctx.py +408 -408
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/config/set.py +125 -125
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +31 -31
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/utils.py +4 -4
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/__init__.py +18 -18
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/linux.py +144 -144
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/main.py +223 -223
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/windows.py +136 -136
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/print.py +18 -6
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/py.typed +1 -1
- {stouputils-1.9.7 → stouputils-1.10.0}/.gitignore +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/__init__.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/__main__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/_deprecated.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/_deprecated.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/all_doctests.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/all_doctests.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/__init__.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/automatic_docs.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/__init__.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/config.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/config.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/image.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/image.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/video.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/applications/upscaler/video.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/archive.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/archive.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/backup.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/backup.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/collections.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/collections.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/__init__.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/cd_utils.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/cd_utils.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/github.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/github.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/pypi.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/pyproject.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/pyproject.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/stubs.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/continuous_delivery/stubs.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/ctx.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/config/get.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/auto_contrast.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/axis_flip.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/bias_field_correction.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/binary_threshold.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/blur.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/brightness.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/canny.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/clahe.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/common.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/contrast.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/denoise.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/histogram_equalization.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/invert.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/laplacian.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/median_blur.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/noise.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/normalize.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/random_erase.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/resize.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/rotation.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/salt_pepper.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/sharpening.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/shearing.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/threshold.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/translation.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image/zoom.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image_augmentation.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/image_preprocess.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/prosthesis_detection.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/data_processing/technique.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/dataset/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/dataset/dataset.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/dataset/dataset_loader.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/dataset/grouping_strategy.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/dataset/image_loader.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/dataset/xy_tuple.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/metric_dictionnary.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/metric_utils.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/mlflow_utils.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/abstract_model.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/all.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/base_keras.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/all.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/convnext.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/densenet.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/efficientnet.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/mobilenet.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/resnet.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/squeezenet.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/vgg.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras/xception.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/losses/__init__.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/keras_utils/visualizations.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/model_interface.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/models/sandbox.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/range_tuple.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/scripts/augment_dataset.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/scripts/exhaustive_process.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/data_science/scripts/routine.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/decorators.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/decorators.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/image.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/image.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/__init__.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/common.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/common.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/downloader.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/downloader.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/linux.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/main.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/installer/windows.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/io.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/io.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/parallel.py +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/parallel.pyi +0 -0
- {stouputils-1.9.7 → stouputils-1.10.0}/stouputils/print.pyi +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.
|
|
3
|
+
Version: 1.10.0
|
|
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
|
|
@@ -9,10 +9,10 @@ License-File: LICENSE
|
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
13
|
Requires-Dist: argcomplete>=3.0.0
|
|
14
14
|
Requires-Dist: mypy>=1.18.2
|
|
15
|
-
Requires-Dist: numpy
|
|
15
|
+
Requires-Dist: numpy>=2.4.0
|
|
16
16
|
Requires-Dist: opencv-python>=4.0.0
|
|
17
17
|
Requires-Dist: orjson>=3.0.0
|
|
18
18
|
Requires-Dist: pillow>=10.0.0
|
|
@@ -40,46 +40,22 @@ Requires-Dist: sphinx-design; extra == 'docs'
|
|
|
40
40
|
Requires-Dist: sphinx-treeview; extra == 'docs'
|
|
41
41
|
Description-Content-Type: text/markdown
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
## 🛠️ Project Badges
|
|
44
45
|
[](https://github.com/Stoupy51/stouputils/releases/latest)
|
|
45
46
|
[](https://pypi.org/project/stouputils/)
|
|
46
47
|
[](https://stoupy51.github.io/stouputils/latest/)
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# 📚 Project Overview
|
|
49
|
+
## 📚 Project Overview
|
|
51
50
|
Stouputils is a collection of utility modules designed to simplify and enhance the development process.<br>
|
|
52
|
-
It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers
|
|
53
|
-
|
|
54
|
-
## 🔧 Installation
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pip install stouputils
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### ✨ Enable Tab Completion on Linux (Optional)
|
|
61
|
-
|
|
62
|
-
For a better CLI experience, enable bash tab completion:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Option 1: Using argcomplete's global activation
|
|
66
|
-
activate-global-python-argcomplete --user
|
|
67
|
-
|
|
68
|
-
# Option 2: Manual setup for bash
|
|
69
|
-
register-python-argcomplete stouputils >> ~/.bashrc
|
|
70
|
-
source ~/.bashrc
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
After enabling completion, you can use `<TAB>` to autocomplete commands:
|
|
74
|
-
```bash
|
|
75
|
-
stouputils <TAB> # Shows: --version, -v, all_doctests, backup
|
|
76
|
-
stouputils all_<TAB> # Completes to: all_doctests
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**Note:** Tab completion works best in bash, zsh, Git Bash, or WSL on Windows.
|
|
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>
|
|
80
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>
|
|
81
57
|
|
|
82
|
-
|
|
58
|
+
## 🚀 Project File Tree
|
|
83
59
|
<html>
|
|
84
60
|
<details style="display: none;">
|
|
85
61
|
<summary></summary>
|
|
@@ -161,6 +137,33 @@ stouputils all_<TAB> # Completes to: all_doctests
|
|
|
161
137
|
</pre>
|
|
162
138
|
</html>
|
|
163
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
|
+
|
|
164
167
|
## ⭐ Star History
|
|
165
168
|
|
|
166
169
|
<html>
|
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
## 🛠️ Project Badges
|
|
2
3
|
[](https://github.com/Stoupy51/stouputils/releases/latest)
|
|
3
4
|
[](https://pypi.org/project/stouputils/)
|
|
4
5
|
[](https://stoupy51.github.io/stouputils/latest/)
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# 📚 Project Overview
|
|
7
|
+
## 📚 Project Overview
|
|
9
8
|
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
|
-
## 🔧 Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
pip install stouputils
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### ✨ Enable Tab Completion on Linux (Optional)
|
|
19
|
-
|
|
20
|
-
For a better CLI experience, enable bash tab completion:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Option 1: Using argcomplete's global activation
|
|
24
|
-
activate-global-python-argcomplete --user
|
|
25
|
-
|
|
26
|
-
# Option 2: Manual setup for bash
|
|
27
|
-
register-python-argcomplete stouputils >> ~/.bashrc
|
|
28
|
-
source ~/.bashrc
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
After enabling completion, you can use `<TAB>` to autocomplete commands:
|
|
32
|
-
```bash
|
|
33
|
-
stouputils <TAB> # Shows: --version, -v, all_doctests, backup
|
|
34
|
-
stouputils all_<TAB> # Completes to: all_doctests
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
**Note:** Tab completion works best in bash, zsh, Git Bash, or WSL on Windows.
|
|
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>
|
|
38
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>
|
|
39
15
|
|
|
40
|
-
|
|
16
|
+
## 🚀 Project File Tree
|
|
41
17
|
<html>
|
|
42
18
|
<details style="display: none;">
|
|
43
19
|
<summary></summary>
|
|
@@ -119,6 +95,33 @@ stouputils all_<TAB> # Completes to: all_doctests
|
|
|
119
95
|
</pre>
|
|
120
96
|
</html>
|
|
121
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
|
+
|
|
122
125
|
## ⭐ Star History
|
|
123
126
|
|
|
124
127
|
<html>
|
|
@@ -5,16 +5,16 @@ build-backend = "hatchling.build"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "stouputils"
|
|
8
|
-
version = "1.
|
|
8
|
+
version = "1.10.0"
|
|
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
|
-
requires-python = ">=3.
|
|
11
|
+
requires-python = ">=3.12"
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Programming Language :: Python :: 3",
|
|
14
14
|
"License :: OSI Approved :: MIT License",
|
|
15
15
|
"Operating System :: OS Independent",
|
|
16
16
|
]
|
|
17
|
-
dependencies = [ "tqdm>=4.0.0", "requests>=2.20.0", "pyyaml>=6.0.0", "toml>=0.10.0", "pillow>=10.0.0", "numpy", "opencv-python>=4.0.0", "orjson>=3.0.0", "pyfastcopy>=1.0.0", "python-box[all]>=7.0.0", "zarr>=2.18.3", "mypy>=1.18.2", "argcomplete>=3.0.0",]
|
|
17
|
+
dependencies = [ "tqdm>=4.0.0", "requests>=2.20.0", "pyyaml>=6.0.0", "toml>=0.10.0", "pillow>=10.0.0", "numpy>=2.4.0", "opencv-python>=4.0.0", "orjson>=3.0.0", "pyfastcopy>=1.0.0", "python-box[all]>=7.0.0", "zarr>=2.18.3", "mypy>=1.18.2", "argcomplete>=3.0.0",]
|
|
18
18
|
[[project.authors]]
|
|
19
19
|
name = "Stoupy51"
|
|
20
20
|
email = "stoupy51@gmail.com"
|
|
@@ -188,6 +188,7 @@ exclude_patterns: list[str] = []
|
|
|
188
188
|
# HTML output options
|
|
189
189
|
html_theme: str = "{html_theme}"
|
|
190
190
|
html_static_path: list[str] = ["_static"]
|
|
191
|
+
html_css_files: list[str] = ["custom.css"]
|
|
191
192
|
html_logo: str = "{html_logo}"
|
|
192
193
|
html_title: str = "{project}"
|
|
193
194
|
html_favicon: str = "{html_favicon}"
|
|
@@ -377,10 +378,14 @@ def generate_index_rst(
|
|
|
377
378
|
|
|
378
379
|
modules/{project_module}
|
|
379
380
|
"""
|
|
381
|
+
module_docs = markdown_to_rst(f"""
|
|
382
|
+
Here is the complete unsorted documentation for all modules in the {project} project.<br>
|
|
383
|
+
Prefer to use the search button at the top to find what you need!
|
|
384
|
+
""") + module_docs
|
|
380
385
|
|
|
381
386
|
# Convert markdown to RST
|
|
382
387
|
rst_content: str = f"""
|
|
383
|
-
|
|
388
|
+
✨ Welcome to {project.capitalize()} Documentation ✨
|
|
384
389
|
{'=' * 100}
|
|
385
390
|
{version_selector}
|
|
386
391
|
|
|
@@ -520,6 +525,51 @@ def update_documentation(
|
|
|
520
525
|
for dir in [modules_dir, static_dir, templates_dir]:
|
|
521
526
|
os.makedirs(dir, exist_ok=True)
|
|
522
527
|
|
|
528
|
+
# Create custom CSS file to reduce heading sizes
|
|
529
|
+
custom_css_path: str = f"{static_dir}/custom.css"
|
|
530
|
+
with super_open(custom_css_path, "w") as f:
|
|
531
|
+
f.write("""
|
|
532
|
+
/* Custom CSS for Sphinx documentation */
|
|
533
|
+
/* Reduce heading sizes */
|
|
534
|
+
h1 { font-size: 2.0em !important; }
|
|
535
|
+
h2 { font-size: 1.6em !important; }
|
|
536
|
+
h3 { font-size: 1.4em !important; }
|
|
537
|
+
h4 { font-size: 1.2em !important; }
|
|
538
|
+
h5 { font-size: 1.0em !important; }
|
|
539
|
+
h6 { font-size: 0.9em !important; }
|
|
540
|
+
|
|
541
|
+
/* Gradient animation keyframes */
|
|
542
|
+
@keyframes shine-slide {
|
|
543
|
+
0% { background-position: -200% center; }
|
|
544
|
+
100% { background-position: 200% center; }
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/* On hover animation for various elements */
|
|
548
|
+
a, h1, h2, h3, h4, h5, h6, .admonition {
|
|
549
|
+
transition: transform 0.3s;
|
|
550
|
+
position: relative;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
a:hover, h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover, .admonition:hover {
|
|
554
|
+
transform: scale(1.05);
|
|
555
|
+
}
|
|
556
|
+
a:hover {
|
|
557
|
+
background: linear-gradient(
|
|
558
|
+
110deg,
|
|
559
|
+
currentColor 0%,
|
|
560
|
+
currentColor 40%,
|
|
561
|
+
white 50%,
|
|
562
|
+
currentColor 60%,
|
|
563
|
+
currentColor 100%
|
|
564
|
+
);
|
|
565
|
+
background-size: 200% 100%;
|
|
566
|
+
background-clip: text;
|
|
567
|
+
-webkit-background-clip: text;
|
|
568
|
+
-webkit-text-fill-color: transparent;
|
|
569
|
+
animation: shine-slide 2s linear infinite;
|
|
570
|
+
}
|
|
571
|
+
""")
|
|
572
|
+
|
|
523
573
|
# Generate index.rst from README.md
|
|
524
574
|
readme_path: str = f"{root_path}/README.md"
|
|
525
575
|
index_path: str = f"{source_dir}/index.rst"
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
""" This module contains utilities for PyPI.
|
|
2
|
-
|
|
3
|
-
- pypi_full_routine: Upload the most recent file(s) to PyPI after updating pip and required packages and building the package
|
|
4
|
-
|
|
5
|
-
.. image:: https://raw.githubusercontent.com/Stoupy51/stouputils/refs/heads/main/assets/continuous_delivery/pypi_module.gif
|
|
6
|
-
:alt: stouputils pypi examples
|
|
7
|
-
"""
|
|
8
|
-
|
|
9
|
-
# Imports
|
|
10
|
-
import os
|
|
11
|
-
import sys
|
|
12
|
-
from collections.abc import Callable
|
|
13
|
-
|
|
14
|
-
from ..decorators import LogLevels, handle_error
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def update_pip_and_required_packages() -> int:
|
|
18
|
-
""" Update pip and required packages.
|
|
19
|
-
|
|
20
|
-
Returns:
|
|
21
|
-
int: Return code of the os.system call.
|
|
22
|
-
"""
|
|
23
|
-
return os.system(f"{sys.executable} -m pip install --upgrade pip setuptools build twine pkginfo packaging")
|
|
24
|
-
|
|
25
|
-
def build_package() -> int:
|
|
26
|
-
""" Build the package.
|
|
27
|
-
|
|
28
|
-
Returns:
|
|
29
|
-
int: Return code of the os.system call.
|
|
30
|
-
"""
|
|
31
|
-
return os.system(f"{sys.executable} -m build")
|
|
32
|
-
|
|
33
|
-
def upload_package(repository: str, filepath: str) -> int:
|
|
34
|
-
""" Upload the package to PyPI.
|
|
35
|
-
|
|
36
|
-
Args:
|
|
37
|
-
repository (str): Repository to upload to.
|
|
38
|
-
filepath (str): Path to the file to upload.
|
|
39
|
-
|
|
40
|
-
Returns:
|
|
41
|
-
int: Return code of the os.system call.
|
|
42
|
-
"""
|
|
43
|
-
return os.system(f"{sys.executable} -m twine upload --verbose -r {repository} {filepath}")
|
|
44
|
-
|
|
45
|
-
@handle_error(message="Error while doing the pypi full routine", error_log=LogLevels.ERROR_TRACEBACK)
|
|
46
|
-
def pypi_full_routine(
|
|
47
|
-
repository: str,
|
|
48
|
-
dist_directory: str,
|
|
49
|
-
last_files: int = 1,
|
|
50
|
-
endswith: str = ".tar.gz",
|
|
51
|
-
|
|
52
|
-
update_all_function: Callable[[], int] = update_pip_and_required_packages,
|
|
53
|
-
build_package_function: Callable[[], int] = build_package,
|
|
54
|
-
upload_package_function: Callable[[str, str], int] = upload_package,
|
|
55
|
-
) -> None:
|
|
56
|
-
""" Upload the most recent file(s) to PyPI after updating pip and required packages and building the package.
|
|
57
|
-
|
|
58
|
-
Args:
|
|
59
|
-
repository (str): Repository to upload to.
|
|
60
|
-
dist_directory (str): Directory to upload from.
|
|
61
|
-
last_files (int): Number of most recent files to upload. Defaults to 1.
|
|
62
|
-
endswith (str): End of the file name to upload. Defaults to ".tar.gz".
|
|
63
|
-
update_all_function (Callable[[], int]): Function to update pip and required packages.
|
|
64
|
-
Defaults to :func:`update_pip_and_required_packages`.
|
|
65
|
-
build_package_function (Callable[[], int]): Function to build the package.
|
|
66
|
-
Defaults to :func:`build_package`.
|
|
67
|
-
upload_package_function (Callable[[str, str], int]): Function to upload the package.
|
|
68
|
-
Defaults to :func:`upload_package`.
|
|
69
|
-
|
|
70
|
-
Returns:
|
|
71
|
-
int: Return code of the command.
|
|
72
|
-
"""
|
|
73
|
-
if update_all_function() != 0:
|
|
74
|
-
raise Exception("Error while updating pip and required packages")
|
|
75
|
-
|
|
76
|
-
if build_package_function() != 0:
|
|
77
|
-
raise Exception("Error while building the package")
|
|
78
|
-
|
|
79
|
-
# Get list of tar.gz files in dist directory sorted by modification time
|
|
80
|
-
files: list[str] = sorted(
|
|
81
|
-
[x for x in os.listdir(dist_directory) if x.endswith(endswith)], # Get list of tar.gz files in dist directory
|
|
82
|
-
key=lambda x: os.path.getmtime(f"{dist_directory}/{x}"), # Sort by modification time
|
|
83
|
-
reverse=True # Sort in reverse order
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
# Upload the most recent file(s)
|
|
87
|
-
for file in files[:last_files]:
|
|
88
|
-
upload_package_function(repository, f"{dist_directory}/{file}")
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
""" This module contains utilities for PyPI.
|
|
2
|
+
|
|
3
|
+
- pypi_full_routine: Upload the most recent file(s) to PyPI after updating pip and required packages and building the package
|
|
4
|
+
|
|
5
|
+
.. image:: https://raw.githubusercontent.com/Stoupy51/stouputils/refs/heads/main/assets/continuous_delivery/pypi_module.gif
|
|
6
|
+
:alt: stouputils pypi examples
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
# Imports
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
from collections.abc import Callable
|
|
13
|
+
|
|
14
|
+
from ..decorators import LogLevels, handle_error
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def update_pip_and_required_packages() -> int:
|
|
18
|
+
""" Update pip and required packages.
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
int: Return code of the os.system call.
|
|
22
|
+
"""
|
|
23
|
+
return os.system(f"{sys.executable} -m pip install --upgrade pip setuptools build twine pkginfo packaging")
|
|
24
|
+
|
|
25
|
+
def build_package() -> int:
|
|
26
|
+
""" Build the package.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
int: Return code of the os.system call.
|
|
30
|
+
"""
|
|
31
|
+
return os.system(f"{sys.executable} -m build")
|
|
32
|
+
|
|
33
|
+
def upload_package(repository: str, filepath: str) -> int:
|
|
34
|
+
""" Upload the package to PyPI.
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
repository (str): Repository to upload to.
|
|
38
|
+
filepath (str): Path to the file to upload.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
int: Return code of the os.system call.
|
|
42
|
+
"""
|
|
43
|
+
return os.system(f"{sys.executable} -m twine upload --verbose -r {repository} {filepath}")
|
|
44
|
+
|
|
45
|
+
@handle_error(message="Error while doing the pypi full routine", error_log=LogLevels.ERROR_TRACEBACK)
|
|
46
|
+
def pypi_full_routine(
|
|
47
|
+
repository: str,
|
|
48
|
+
dist_directory: str,
|
|
49
|
+
last_files: int = 1,
|
|
50
|
+
endswith: str = ".tar.gz",
|
|
51
|
+
|
|
52
|
+
update_all_function: Callable[[], int] = update_pip_and_required_packages,
|
|
53
|
+
build_package_function: Callable[[], int] = build_package,
|
|
54
|
+
upload_package_function: Callable[[str, str], int] = upload_package,
|
|
55
|
+
) -> None:
|
|
56
|
+
""" Upload the most recent file(s) to PyPI after updating pip and required packages and building the package.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
repository (str): Repository to upload to.
|
|
60
|
+
dist_directory (str): Directory to upload from.
|
|
61
|
+
last_files (int): Number of most recent files to upload. Defaults to 1.
|
|
62
|
+
endswith (str): End of the file name to upload. Defaults to ".tar.gz".
|
|
63
|
+
update_all_function (Callable[[], int]): Function to update pip and required packages.
|
|
64
|
+
Defaults to :func:`update_pip_and_required_packages`.
|
|
65
|
+
build_package_function (Callable[[], int]): Function to build the package.
|
|
66
|
+
Defaults to :func:`build_package`.
|
|
67
|
+
upload_package_function (Callable[[str, str], int]): Function to upload the package.
|
|
68
|
+
Defaults to :func:`upload_package`.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
int: Return code of the command.
|
|
72
|
+
"""
|
|
73
|
+
if update_all_function() != 0:
|
|
74
|
+
raise Exception("Error while updating pip and required packages")
|
|
75
|
+
|
|
76
|
+
if build_package_function() != 0:
|
|
77
|
+
raise Exception("Error while building the package")
|
|
78
|
+
|
|
79
|
+
# Get list of tar.gz files in dist directory sorted by modification time
|
|
80
|
+
files: list[str] = sorted(
|
|
81
|
+
[x for x in os.listdir(dist_directory) if x.endswith(endswith)], # Get list of tar.gz files in dist directory
|
|
82
|
+
key=lambda x: os.path.getmtime(f"{dist_directory}/{x}"), # Sort by modification time
|
|
83
|
+
reverse=True # Sort in reverse order
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
# Upload the most recent file(s)
|
|
87
|
+
for file in files[:last_files]:
|
|
88
|
+
upload_package_function(repository, f"{dist_directory}/{file}")
|
|
89
|
+
|
|
90
|
+
|