stouputils 1.14.0__tar.gz → 1.14.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.
Files changed (170) hide show
  1. {stouputils-1.14.0 → stouputils-1.14.2}/PKG-INFO +1 -1
  2. {stouputils-1.14.0 → stouputils-1.14.2}/pyproject.toml +102 -102
  3. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/applications/automatic_docs.py +3 -0
  4. stouputils-1.14.2/stouputils/continuous_delivery/pypi.pyi +52 -0
  5. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/config/get.py +51 -51
  6. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/__init__.py +66 -66
  7. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/auto_contrast.py +79 -79
  8. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/axis_flip.py +58 -58
  9. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/bias_field_correction.py +74 -74
  10. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/binary_threshold.py +73 -73
  11. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/blur.py +59 -59
  12. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/brightness.py +54 -54
  13. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/canny.py +110 -110
  14. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/clahe.py +92 -92
  15. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/common.py +30 -30
  16. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/contrast.py +53 -53
  17. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +74 -74
  18. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/denoise.py +378 -378
  19. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/histogram_equalization.py +123 -123
  20. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/invert.py +64 -64
  21. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/laplacian.py +60 -60
  22. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/median_blur.py +52 -52
  23. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/noise.py +59 -59
  24. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/normalize.py +65 -65
  25. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/random_erase.py +66 -66
  26. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/resize.py +69 -69
  27. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/rotation.py +80 -80
  28. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/salt_pepper.py +68 -68
  29. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/sharpening.py +55 -55
  30. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/shearing.py +64 -64
  31. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/threshold.py +64 -64
  32. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/translation.py +71 -71
  33. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image/zoom.py +83 -83
  34. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image_augmentation.py +118 -118
  35. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/image_preprocess.py +183 -183
  36. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/prosthesis_detection.py +359 -359
  37. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/data_processing/technique.py +481 -481
  38. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/dataset/__init__.py +45 -45
  39. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/dataset/dataset.py +292 -292
  40. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/dataset/dataset_loader.py +135 -135
  41. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/dataset/grouping_strategy.py +296 -296
  42. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/dataset/image_loader.py +100 -100
  43. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/dataset/xy_tuple.py +696 -696
  44. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/metric_dictionnary.py +106 -106
  45. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/mlflow_utils.py +206 -206
  46. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/abstract_model.py +149 -149
  47. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/all.py +85 -85
  48. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/all.py +38 -38
  49. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/convnext.py +62 -62
  50. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/densenet.py +50 -50
  51. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/efficientnet.py +60 -60
  52. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/mobilenet.py +56 -56
  53. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/resnet.py +52 -52
  54. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/squeezenet.py +233 -233
  55. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/vgg.py +42 -42
  56. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras/xception.py +38 -38
  57. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +20 -20
  58. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +219 -219
  59. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +148 -148
  60. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +31 -31
  61. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +249 -249
  62. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +66 -66
  63. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/losses/__init__.py +12 -12
  64. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +56 -56
  65. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/keras_utils/visualizations.py +416 -416
  66. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/sandbox.py +116 -116
  67. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/range_tuple.py +234 -234
  68. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/utils.py +285 -285
  69. stouputils-1.14.2/stouputils/decorators.pyi +242 -0
  70. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/installer/__init__.py +18 -18
  71. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/installer/linux.py +144 -144
  72. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/installer/main.py +223 -223
  73. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/installer/windows.py +136 -136
  74. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/parallel.py +12 -10
  75. stouputils-1.14.2/stouputils/parallel.pyi +211 -0
  76. stouputils-1.14.2/stouputils/print.pyi +136 -0
  77. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/py.typed +1 -1
  78. stouputils-1.14.2/stouputils/stouputils/__init__.pyi +15 -0
  79. stouputils-1.14.2/stouputils/stouputils/_deprecated.pyi +12 -0
  80. stouputils-1.14.2/stouputils/stouputils/all_doctests.pyi +46 -0
  81. stouputils-1.14.2/stouputils/stouputils/applications/__init__.pyi +2 -0
  82. stouputils-1.14.2/stouputils/stouputils/applications/automatic_docs.pyi +106 -0
  83. stouputils-1.14.2/stouputils/stouputils/applications/upscaler/__init__.pyi +3 -0
  84. stouputils-1.14.2/stouputils/stouputils/applications/upscaler/config.pyi +18 -0
  85. stouputils-1.14.2/stouputils/stouputils/applications/upscaler/image.pyi +109 -0
  86. stouputils-1.14.2/stouputils/stouputils/applications/upscaler/video.pyi +60 -0
  87. stouputils-1.14.2/stouputils/stouputils/archive.pyi +67 -0
  88. stouputils-1.14.2/stouputils/stouputils/backup.pyi +109 -0
  89. stouputils-1.14.2/stouputils/stouputils/collections.pyi +86 -0
  90. stouputils-1.14.2/stouputils/stouputils/continuous_delivery/__init__.pyi +5 -0
  91. stouputils-1.14.2/stouputils/stouputils/continuous_delivery/cd_utils.pyi +129 -0
  92. stouputils-1.14.2/stouputils/stouputils/continuous_delivery/github.pyi +162 -0
  93. stouputils-1.14.2/stouputils/stouputils/continuous_delivery/pyproject.pyi +67 -0
  94. stouputils-1.14.2/stouputils/stouputils/continuous_delivery/stubs.pyi +39 -0
  95. stouputils-1.14.2/stouputils/stouputils/ctx.pyi +211 -0
  96. stouputils-1.14.2/stouputils/stouputils/image.pyi +172 -0
  97. stouputils-1.14.2/stouputils/stouputils/installer/__init__.pyi +5 -0
  98. stouputils-1.14.2/stouputils/stouputils/installer/common.pyi +39 -0
  99. stouputils-1.14.2/stouputils/stouputils/installer/downloader.pyi +24 -0
  100. stouputils-1.14.2/stouputils/stouputils/installer/linux.pyi +39 -0
  101. stouputils-1.14.2/stouputils/stouputils/installer/main.pyi +57 -0
  102. stouputils-1.14.2/stouputils/stouputils/installer/windows.pyi +31 -0
  103. stouputils-1.14.2/stouputils/stouputils/io.pyi +213 -0
  104. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/stouputils/parallel.pyi +4 -4
  105. stouputils-1.14.2/stouputils/version_pkg.pyi +15 -0
  106. {stouputils-1.14.0 → stouputils-1.14.2}/README.md +0 -0
  107. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/__init__.py +0 -0
  108. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/__init__.pyi +0 -0
  109. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/__main__.py +0 -0
  110. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/_deprecated.py +0 -0
  111. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/_deprecated.pyi +0 -0
  112. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/all_doctests.py +0 -0
  113. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/all_doctests.pyi +0 -0
  114. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/applications/__init__.py +0 -0
  115. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/applications/__init__.pyi +0 -0
  116. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/applications/automatic_docs.pyi +0 -0
  117. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/applications/upscaler/__init__.py +0 -0
  118. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/applications/upscaler/__init__.pyi +0 -0
  119. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/applications/upscaler/config.py +0 -0
  120. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/applications/upscaler/config.pyi +0 -0
  121. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/applications/upscaler/image.py +0 -0
  122. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/applications/upscaler/image.pyi +0 -0
  123. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/applications/upscaler/video.py +0 -0
  124. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/applications/upscaler/video.pyi +0 -0
  125. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/archive.py +0 -0
  126. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/archive.pyi +0 -0
  127. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/backup.py +0 -0
  128. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/backup.pyi +0 -0
  129. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/collections.py +0 -0
  130. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/collections.pyi +0 -0
  131. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/continuous_delivery/__init__.py +0 -0
  132. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/continuous_delivery/__init__.pyi +0 -0
  133. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/continuous_delivery/cd_utils.py +0 -0
  134. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/continuous_delivery/cd_utils.pyi +0 -0
  135. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/continuous_delivery/github.py +0 -0
  136. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/continuous_delivery/github.pyi +0 -0
  137. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/continuous_delivery/pypi.py +0 -0
  138. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/continuous_delivery/pyproject.py +0 -0
  139. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/continuous_delivery/pyproject.pyi +0 -0
  140. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/continuous_delivery/stubs.py +0 -0
  141. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/continuous_delivery/stubs.pyi +0 -0
  142. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/ctx.py +0 -0
  143. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/ctx.pyi +0 -0
  144. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/config/set.py +0 -0
  145. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/metric_utils.py +0 -0
  146. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/base_keras.py +0 -0
  147. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/models/model_interface.py +0 -0
  148. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/scripts/augment_dataset.py +0 -0
  149. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/scripts/exhaustive_process.py +0 -0
  150. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
  151. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/data_science/scripts/routine.py +0 -0
  152. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/decorators.py +0 -0
  153. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/image.py +0 -0
  154. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/image.pyi +0 -0
  155. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/installer/__init__.pyi +0 -0
  156. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/installer/common.py +0 -0
  157. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/installer/common.pyi +0 -0
  158. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/installer/downloader.py +0 -0
  159. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/installer/downloader.pyi +0 -0
  160. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/installer/linux.pyi +0 -0
  161. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/installer/main.pyi +0 -0
  162. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/installer/windows.pyi +0 -0
  163. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/io.py +0 -0
  164. {stouputils-1.14.0/stouputils → stouputils-1.14.2}/stouputils/io.pyi +0 -0
  165. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/print.py +0 -0
  166. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/stouputils/continuous_delivery/pypi.pyi +0 -0
  167. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/stouputils/decorators.pyi +0 -0
  168. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/stouputils/print.pyi +0 -0
  169. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/stouputils/version_pkg.pyi +0 -0
  170. {stouputils-1.14.0 → stouputils-1.14.2}/stouputils/version_pkg.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: stouputils
3
- Version: 1.14.0
3
+ Version: 1.14.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
  Keywords: utilities,tools,helpers,development,python
6
6
  Author: Stoupy51
@@ -1,102 +1,102 @@
1
-
2
- [build-system]
3
- requires = ["uv_build"]
4
- build-backend = "uv_build"
5
-
6
- [tool.uv.build-backend]
7
- module-root = ""
8
-
9
- [project]
10
- name = "stouputils"
11
- version = "1.14.0"
12
- description = "Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more."
13
- readme = "README.md"
14
- keywords = ["utilities", "tools", "helpers", "development", "python"]
15
- requires-python = ">=3.12"
16
- classifiers = [
17
- "Programming Language :: Python :: 3",
18
- "Programming Language :: Python :: 3.12",
19
- "Programming Language :: Python :: 3.13",
20
- "Programming Language :: Python :: 3.14",
21
- "License :: OSI Approved :: MIT License",
22
- "Operating System :: OS Independent",
23
- ]
24
- dependencies = [
25
- "tqdm>=4.0.0",
26
- "requests>=2.20.0",
27
- "msgspec[toml,yaml]>=0.20.0",
28
- "pillow>=12.0.0",
29
- "python-box>=7.0.0",
30
- "argcomplete>=3.0.0",
31
- "numpy",
32
- ]
33
- authors = [
34
- { name = "Stoupy51", email = "stoupy51@gmail.com" },
35
- ]
36
-
37
- [project.optional-dependencies]
38
- docs = [
39
- "m2r2",
40
- "myst_parser",
41
- "sphinx_copybutton",
42
- "sphinx_design",
43
- "sphinx_treeview",
44
- "sphinx_breeze_theme",
45
- "pydata_sphinx_theme",
46
- ]
47
- data_science = [
48
- "opencv-python",
49
- "scikit-image",
50
- "simpleitk",
51
- "mlflow",
52
- "tensorflow",
53
- "scikit-learn",
54
- "PyWavelets",
55
- ]
56
-
57
- [project.urls]
58
- Homepage = "https://stoupy51.github.io/stouputils"
59
- Issues = "https://github.com/Stoupy51/stouputils/issues"
60
- Source = "https://github.com/Stoupy51/stouputils"
61
-
62
- [project.scripts]
63
- stouputils = "stouputils.__main__:main"
64
-
65
- [tool.pyright]
66
- typeCheckingMode = "strict"
67
-
68
- [tool.ruff]
69
- exclude = [
70
- ".git",
71
- ".ruff_cache",
72
- ".venv",
73
- ".vscode",
74
- ".cursor",
75
- "build",
76
- "dist",
77
- "*.pyi",
78
- ]
79
- line-length = 200
80
-
81
- [tool.ruff.lint]
82
- select = [
83
- "E",
84
- "W",
85
- "F",
86
- "I",
87
- "N",
88
- "UP",
89
- "B",
90
- "C4",
91
- "T20",
92
- "RUF",
93
- ]
94
- ignore = [
95
- "T201",
96
- "W191",
97
- "N803",
98
- "N806",
99
- "F403",
100
- "F405",
101
- ]
102
-
1
+
2
+ [build-system]
3
+ requires = ["uv_build"]
4
+ build-backend = "uv_build"
5
+
6
+ [tool.uv.build-backend]
7
+ module-root = ""
8
+
9
+ [project]
10
+ name = "stouputils"
11
+ version = "1.14.2"
12
+ description = "Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more."
13
+ readme = "README.md"
14
+ keywords = ["utilities", "tools", "helpers", "development", "python"]
15
+ requires-python = ">=3.12"
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ ]
24
+ dependencies = [
25
+ "tqdm>=4.0.0",
26
+ "requests>=2.20.0",
27
+ "msgspec[toml,yaml]>=0.20.0",
28
+ "pillow>=12.0.0",
29
+ "python-box>=7.0.0",
30
+ "argcomplete>=3.0.0",
31
+ "numpy",
32
+ ]
33
+ authors = [
34
+ { name = "Stoupy51", email = "stoupy51@gmail.com" },
35
+ ]
36
+
37
+ [project.optional-dependencies]
38
+ docs = [
39
+ "m2r2",
40
+ "myst_parser",
41
+ "sphinx_copybutton",
42
+ "sphinx_design",
43
+ "sphinx_treeview",
44
+ "sphinx_breeze_theme",
45
+ "pydata_sphinx_theme",
46
+ ]
47
+ data_science = [
48
+ "opencv-python",
49
+ "scikit-image",
50
+ "simpleitk",
51
+ "mlflow",
52
+ "tensorflow",
53
+ "scikit-learn",
54
+ "PyWavelets",
55
+ ]
56
+
57
+ [project.urls]
58
+ Homepage = "https://stoupy51.github.io/stouputils"
59
+ Issues = "https://github.com/Stoupy51/stouputils/issues"
60
+ Source = "https://github.com/Stoupy51/stouputils"
61
+
62
+ [project.scripts]
63
+ stouputils = "stouputils.__main__:main"
64
+
65
+ [tool.pyright]
66
+ typeCheckingMode = "strict"
67
+
68
+ [tool.ruff]
69
+ exclude = [
70
+ ".git",
71
+ ".ruff_cache",
72
+ ".venv",
73
+ ".vscode",
74
+ ".cursor",
75
+ "build",
76
+ "dist",
77
+ "*.pyi",
78
+ ]
79
+ line-length = 200
80
+
81
+ [tool.ruff.lint]
82
+ select = [
83
+ "E",
84
+ "W",
85
+ "F",
86
+ "I",
87
+ "N",
88
+ "UP",
89
+ "B",
90
+ "C4",
91
+ "T20",
92
+ "RUF",
93
+ ]
94
+ ignore = [
95
+ "T201",
96
+ "W191",
97
+ "N803",
98
+ "N806",
99
+ "F403",
100
+ "F405",
101
+ ]
102
+
@@ -286,6 +286,7 @@ def get_versions_from_github(github_user: str, github_repo: str, recent_minor_ve
286
286
  if d["type"] == "dir" and d["name"].startswith("v")
287
287
  ], key=version_to_float, reverse=True
288
288
  )
289
+ info(f"Found versions from GitHub: {all_versions}")
289
290
 
290
291
  # Group versions by major.minor
291
292
  from collections import defaultdict
@@ -295,9 +296,11 @@ def get_versions_from_github(github_user: str, github_repo: str, recent_minor_ve
295
296
  if len(parts) >= 2:
296
297
  minor_key = f"{parts[0]}.{parts[1]}"
297
298
  minor_versions[minor_key].append(version)
299
+ info(f"Grouped minor versions: {dict(minor_versions)}")
298
300
 
299
301
  # Get the sorted minor version keys
300
302
  sorted_minors = sorted(minor_versions.keys(), key=version_to_float, reverse=True)
303
+ info(f"Sorted minor versions: {sorted_minors}")
301
304
 
302
305
  # Build final version list
303
306
  final_versions: list[str] = []
@@ -0,0 +1,52 @@
1
+ from ..decorators import LogLevels as LogLevels, handle_error as handle_error
2
+ from .pyproject import read_pyproject as read_pyproject
3
+ from collections.abc import Callable as Callable
4
+
5
+ def update_pip_and_required_packages() -> int:
6
+ """ Update pip and required packages.
7
+
8
+ \tReturns:
9
+ \t\tint: Return code of the os.system call.
10
+ \t"""
11
+ def build_package() -> int:
12
+ """ Build the package.
13
+
14
+ \tReturns:
15
+ \t\tint: Return code of the os.system call.
16
+ \t"""
17
+ def upload_package(repository: str, filepath: str) -> int:
18
+ """ Upload the package to PyPI.
19
+
20
+ \tArgs:
21
+ \t\trepository (str): Repository to upload to.
22
+ \t\tfilepath (str): Path to the file to upload.
23
+
24
+ \tReturns:
25
+ \t\tint: Return code of the os.system call.
26
+ \t"""
27
+ def pypi_full_routine(repository: str, dist_directory: str, last_files: int = 1, endswith: str = '.tar.gz', update_all_function: Callable[[], int] = ..., build_package_function: Callable[[], int] = ..., upload_package_function: Callable[[str, str], int] = ...) -> None:
28
+ ''' Upload the most recent file(s) to PyPI after updating pip and required packages and building the package.
29
+
30
+ \tArgs:
31
+ \t\trepository (str): Repository to upload to.
32
+ \t\tdist_directory (str): Directory to upload from.
33
+ \t\tlast_files (int): Number of most recent files to upload. Defaults to 1.
34
+ \t\tendswith (str): End of the file name to upload. Defaults to ".tar.gz".
35
+ \t\tupdate_all_function (Callable[[], int]): Function to update pip and required packages.
36
+ \t\t\tDefaults to :func:`update_pip_and_required_packages`.
37
+ \t\tbuild_package_function (Callable[[], int]): Function to build the package.
38
+ \t\t\tDefaults to :func:`build_package`.
39
+ \t\tupload_package_function (Callable[[str, str], int]): Function to upload the package.
40
+ \t\t\tDefaults to :func:`upload_package`.
41
+
42
+ \tReturns:
43
+ \t\tint: Return code of the command.
44
+ \t'''
45
+ def pypi_full_routine_using_uv() -> None:
46
+ """ Full build and publish routine using 'uv' command line tool.
47
+
48
+ \tSteps:
49
+ \t\t1. Generate stubs unless '--no-stubs' is passed
50
+ \t\t2. Build the package using 'uv build'
51
+ \t\t3. Upload the most recent file to PyPI using 'uv publish'
52
+ \t"""
@@ -1,51 +1,51 @@
1
- """ Load configuration from the set.py file and handle some special cases.
2
-
3
- Proper way to get the configuration is by importing this module, not the set.py file directly.
4
- """
5
-
6
- # pyright: reportUnknownMemberType=false
7
- # pyright: reportUnknownVariableType=false
8
- # pyright: reportMissingTypeStubs=false
9
-
10
- # Imports
11
- import os
12
- from typing import Any
13
-
14
- from .set import DataScienceConfig
15
-
16
- # Special cases
17
- # Hide GPU when using CPU
18
- if DataScienceConfig.TENSORFLOW_DEVICE.lower().startswith("/cpu"):
19
- os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
20
-
21
- # Precise which GPU we use
22
- elif DataScienceConfig.TENSORFLOW_DEVICE.lower().startswith("/gpu"):
23
- os.environ["CUDA_VISIBLE_DEVICES"] = DataScienceConfig.TENSORFLOW_DEVICE.split(":")[-1]
24
-
25
- # Configure TensorFlow (if available)
26
- try:
27
- from tensorflow import config as tf_config
28
-
29
- # Get the physical devices
30
- physical_devices: list[Any] = tf_config.list_physical_devices("GPU")
31
-
32
- # Configure TensorFlow GPU memory management to allocate memory dynamically
33
- # This prevents TensorFlow from allocating all GPU memory upfront
34
- # Instead, memory will grow as needed, allowing better resource sharing
35
- for device in physical_devices:
36
- tf_config.experimental.set_memory_growth(device, True)
37
-
38
- # Disable eager execution mode in TensorFlow
39
- # This improves performance by allowing TensorFlow to create an optimized graph
40
- # of operations instead of executing operations one by one (at the cost of debugging difficulty)
41
- tf_config.run_functions_eagerly(False)
42
- except ImportError:
43
- pass
44
-
45
- # Enable mixed precision training (if available)
46
- try:
47
- from keras import mixed_precision
48
- mixed_precision.set_global_policy(DataScienceConfig.MIXED_PRECISION_POLICY)
49
- except ImportError:
50
- pass
51
-
1
+ """ Load configuration from the set.py file and handle some special cases.
2
+
3
+ Proper way to get the configuration is by importing this module, not the set.py file directly.
4
+ """
5
+
6
+ # pyright: reportUnknownMemberType=false
7
+ # pyright: reportUnknownVariableType=false
8
+ # pyright: reportMissingTypeStubs=false
9
+
10
+ # Imports
11
+ import os
12
+ from typing import Any
13
+
14
+ from .set import DataScienceConfig
15
+
16
+ # Special cases
17
+ # Hide GPU when using CPU
18
+ if DataScienceConfig.TENSORFLOW_DEVICE.lower().startswith("/cpu"):
19
+ os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
20
+
21
+ # Precise which GPU we use
22
+ elif DataScienceConfig.TENSORFLOW_DEVICE.lower().startswith("/gpu"):
23
+ os.environ["CUDA_VISIBLE_DEVICES"] = DataScienceConfig.TENSORFLOW_DEVICE.split(":")[-1]
24
+
25
+ # Configure TensorFlow (if available)
26
+ try:
27
+ from tensorflow import config as tf_config
28
+
29
+ # Get the physical devices
30
+ physical_devices: list[Any] = tf_config.list_physical_devices("GPU")
31
+
32
+ # Configure TensorFlow GPU memory management to allocate memory dynamically
33
+ # This prevents TensorFlow from allocating all GPU memory upfront
34
+ # Instead, memory will grow as needed, allowing better resource sharing
35
+ for device in physical_devices:
36
+ tf_config.experimental.set_memory_growth(device, True)
37
+
38
+ # Disable eager execution mode in TensorFlow
39
+ # This improves performance by allowing TensorFlow to create an optimized graph
40
+ # of operations instead of executing operations one by one (at the cost of debugging difficulty)
41
+ tf_config.run_functions_eagerly(False)
42
+ except ImportError:
43
+ pass
44
+
45
+ # Enable mixed precision training (if available)
46
+ try:
47
+ from keras import mixed_precision
48
+ mixed_precision.set_global_policy(DataScienceConfig.MIXED_PRECISION_POLICY)
49
+ except ImportError:
50
+ pass
51
+
@@ -1,66 +1,66 @@
1
-
2
- # Imports
3
- from .auto_contrast import auto_contrast_image
4
- from .axis_flip import flip_image
5
- from .bias_field_correction import bias_field_correction_image
6
- from .binary_threshold import binary_threshold_image
7
- from .blur import blur_image
8
- from .brightness import brightness_image
9
- from .canny import canny_image
10
- from .clahe import clahe_image
11
- from .contrast import contrast_image
12
- from .curvature_flow_filter import curvature_flow_filter_image
13
- from .denoise import (
14
- adaptive_denoise_image,
15
- bilateral_denoise_image,
16
- nlm_denoise_image,
17
- tv_denoise_image,
18
- wavelet_denoise_image,
19
- )
20
- from .invert import invert_image
21
- from .laplacian import laplacian_image
22
- from .median_blur import median_blur_image
23
- from .noise import noise_image
24
- from .normalize import normalize_image
25
- from .random_erase import random_erase_image
26
- from .resize import resize_image
27
- from .rotation import rotate_image
28
- from .salt_pepper import salt_pepper_image
29
- from .sharpening import sharpen_image
30
- from .shearing import shear_image
31
- from .threshold import threshold_image
32
- from .translation import translate_image
33
- from .zoom import zoom_image
34
-
35
- __all__ = [
36
- "adaptive_denoise_image",
37
- "auto_contrast_image",
38
- "bias_field_correction_image",
39
- "bilateral_denoise_image",
40
- "binary_threshold_image",
41
- "blur_image",
42
- "brightness_image",
43
- "canny_image",
44
- "clahe_image",
45
- "contrast_image",
46
- "curvature_flow_filter_image",
47
- "flip_image",
48
- "invert_image",
49
- "laplacian_image",
50
- "median_blur_image",
51
- "nlm_denoise_image",
52
- "noise_image",
53
- "normalize_image",
54
- "random_erase_image",
55
- "resize_image",
56
- "rotate_image",
57
- "salt_pepper_image",
58
- "sharpen_image",
59
- "shear_image",
60
- "threshold_image",
61
- "translate_image",
62
- "tv_denoise_image",
63
- "wavelet_denoise_image",
64
- "zoom_image",
65
- ]
66
-
1
+
2
+ # Imports
3
+ from .auto_contrast import auto_contrast_image
4
+ from .axis_flip import flip_image
5
+ from .bias_field_correction import bias_field_correction_image
6
+ from .binary_threshold import binary_threshold_image
7
+ from .blur import blur_image
8
+ from .brightness import brightness_image
9
+ from .canny import canny_image
10
+ from .clahe import clahe_image
11
+ from .contrast import contrast_image
12
+ from .curvature_flow_filter import curvature_flow_filter_image
13
+ from .denoise import (
14
+ adaptive_denoise_image,
15
+ bilateral_denoise_image,
16
+ nlm_denoise_image,
17
+ tv_denoise_image,
18
+ wavelet_denoise_image,
19
+ )
20
+ from .invert import invert_image
21
+ from .laplacian import laplacian_image
22
+ from .median_blur import median_blur_image
23
+ from .noise import noise_image
24
+ from .normalize import normalize_image
25
+ from .random_erase import random_erase_image
26
+ from .resize import resize_image
27
+ from .rotation import rotate_image
28
+ from .salt_pepper import salt_pepper_image
29
+ from .sharpening import sharpen_image
30
+ from .shearing import shear_image
31
+ from .threshold import threshold_image
32
+ from .translation import translate_image
33
+ from .zoom import zoom_image
34
+
35
+ __all__ = [
36
+ "adaptive_denoise_image",
37
+ "auto_contrast_image",
38
+ "bias_field_correction_image",
39
+ "bilateral_denoise_image",
40
+ "binary_threshold_image",
41
+ "blur_image",
42
+ "brightness_image",
43
+ "canny_image",
44
+ "clahe_image",
45
+ "contrast_image",
46
+ "curvature_flow_filter_image",
47
+ "flip_image",
48
+ "invert_image",
49
+ "laplacian_image",
50
+ "median_blur_image",
51
+ "nlm_denoise_image",
52
+ "noise_image",
53
+ "normalize_image",
54
+ "random_erase_image",
55
+ "resize_image",
56
+ "rotate_image",
57
+ "salt_pepper_image",
58
+ "sharpen_image",
59
+ "shear_image",
60
+ "threshold_image",
61
+ "translate_image",
62
+ "tv_denoise_image",
63
+ "wavelet_denoise_image",
64
+ "zoom_image",
65
+ ]
66
+