stouputils 1.14.2__py3-none-any.whl → 1.15.0__py3-none-any.whl
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/continuous_delivery/pypi.py +1 -1
- stouputils/continuous_delivery/pypi.pyi +3 -2
- stouputils/data_science/config/get.py +51 -51
- stouputils/data_science/data_processing/image/__init__.py +66 -66
- stouputils/data_science/data_processing/image/auto_contrast.py +79 -79
- stouputils/data_science/data_processing/image/axis_flip.py +58 -58
- stouputils/data_science/data_processing/image/bias_field_correction.py +74 -74
- stouputils/data_science/data_processing/image/binary_threshold.py +73 -73
- stouputils/data_science/data_processing/image/blur.py +59 -59
- stouputils/data_science/data_processing/image/brightness.py +54 -54
- stouputils/data_science/data_processing/image/canny.py +110 -110
- stouputils/data_science/data_processing/image/clahe.py +92 -92
- stouputils/data_science/data_processing/image/common.py +30 -30
- stouputils/data_science/data_processing/image/contrast.py +53 -53
- stouputils/data_science/data_processing/image/curvature_flow_filter.py +74 -74
- stouputils/data_science/data_processing/image/denoise.py +378 -378
- stouputils/data_science/data_processing/image/histogram_equalization.py +123 -123
- stouputils/data_science/data_processing/image/invert.py +64 -64
- stouputils/data_science/data_processing/image/laplacian.py +60 -60
- stouputils/data_science/data_processing/image/median_blur.py +52 -52
- stouputils/data_science/data_processing/image/noise.py +59 -59
- stouputils/data_science/data_processing/image/normalize.py +65 -65
- stouputils/data_science/data_processing/image/random_erase.py +66 -66
- stouputils/data_science/data_processing/image/resize.py +69 -69
- stouputils/data_science/data_processing/image/rotation.py +80 -80
- stouputils/data_science/data_processing/image/salt_pepper.py +68 -68
- stouputils/data_science/data_processing/image/sharpening.py +55 -55
- stouputils/data_science/data_processing/image/shearing.py +64 -64
- stouputils/data_science/data_processing/image/threshold.py +64 -64
- stouputils/data_science/data_processing/image/translation.py +71 -71
- stouputils/data_science/data_processing/image/zoom.py +83 -83
- stouputils/data_science/data_processing/image_augmentation.py +118 -118
- stouputils/data_science/data_processing/image_preprocess.py +183 -183
- stouputils/data_science/data_processing/prosthesis_detection.py +359 -359
- stouputils/data_science/data_processing/technique.py +481 -481
- stouputils/data_science/dataset/__init__.py +45 -45
- stouputils/data_science/dataset/dataset.py +292 -292
- stouputils/data_science/dataset/dataset_loader.py +135 -135
- stouputils/data_science/dataset/grouping_strategy.py +296 -296
- stouputils/data_science/dataset/image_loader.py +100 -100
- stouputils/data_science/dataset/xy_tuple.py +696 -696
- stouputils/data_science/metric_dictionnary.py +106 -106
- stouputils/data_science/mlflow_utils.py +206 -206
- stouputils/data_science/models/abstract_model.py +149 -149
- stouputils/data_science/models/all.py +85 -85
- stouputils/data_science/models/keras/all.py +38 -38
- stouputils/data_science/models/keras/convnext.py +62 -62
- stouputils/data_science/models/keras/densenet.py +50 -50
- stouputils/data_science/models/keras/efficientnet.py +60 -60
- stouputils/data_science/models/keras/mobilenet.py +56 -56
- stouputils/data_science/models/keras/resnet.py +52 -52
- stouputils/data_science/models/keras/squeezenet.py +233 -233
- stouputils/data_science/models/keras/vgg.py +42 -42
- stouputils/data_science/models/keras/xception.py +38 -38
- stouputils/data_science/models/keras_utils/callbacks/__init__.py +20 -20
- stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +219 -219
- stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +148 -148
- stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +31 -31
- stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +249 -249
- stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +66 -66
- stouputils/data_science/models/keras_utils/losses/__init__.py +12 -12
- stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +56 -56
- stouputils/data_science/models/keras_utils/visualizations.py +416 -416
- stouputils/data_science/models/sandbox.py +116 -116
- stouputils/data_science/range_tuple.py +234 -234
- stouputils/data_science/utils.py +285 -285
- stouputils/decorators.py +53 -39
- stouputils/decorators.pyi +12 -2
- stouputils/installer/__init__.py +18 -18
- stouputils/installer/linux.py +144 -144
- stouputils/installer/main.py +223 -223
- stouputils/installer/windows.py +136 -136
- stouputils/io.py +16 -9
- stouputils/parallel.pyi +12 -7
- stouputils/print.py +229 -2
- stouputils/print.pyi +92 -3
- stouputils/py.typed +1 -1
- {stouputils-1.14.2.dist-info → stouputils-1.15.0.dist-info}/METADATA +1 -1
- stouputils-1.15.0.dist-info/RECORD +140 -0
- {stouputils-1.14.2.dist-info → stouputils-1.15.0.dist-info}/WHEEL +1 -1
- stouputils/stouputils/__init__.pyi +0 -15
- stouputils/stouputils/_deprecated.pyi +0 -12
- stouputils/stouputils/all_doctests.pyi +0 -46
- stouputils/stouputils/applications/__init__.pyi +0 -2
- stouputils/stouputils/applications/automatic_docs.pyi +0 -106
- stouputils/stouputils/applications/upscaler/__init__.pyi +0 -3
- stouputils/stouputils/applications/upscaler/config.pyi +0 -18
- stouputils/stouputils/applications/upscaler/image.pyi +0 -109
- stouputils/stouputils/applications/upscaler/video.pyi +0 -60
- stouputils/stouputils/archive.pyi +0 -67
- stouputils/stouputils/backup.pyi +0 -109
- stouputils/stouputils/collections.pyi +0 -86
- stouputils/stouputils/continuous_delivery/__init__.pyi +0 -5
- stouputils/stouputils/continuous_delivery/cd_utils.pyi +0 -129
- stouputils/stouputils/continuous_delivery/github.pyi +0 -162
- stouputils/stouputils/continuous_delivery/pypi.pyi +0 -53
- stouputils/stouputils/continuous_delivery/pyproject.pyi +0 -67
- stouputils/stouputils/continuous_delivery/stubs.pyi +0 -39
- stouputils/stouputils/ctx.pyi +0 -211
- stouputils/stouputils/decorators.pyi +0 -252
- stouputils/stouputils/image.pyi +0 -172
- stouputils/stouputils/installer/__init__.pyi +0 -5
- stouputils/stouputils/installer/common.pyi +0 -39
- stouputils/stouputils/installer/downloader.pyi +0 -24
- stouputils/stouputils/installer/linux.pyi +0 -39
- stouputils/stouputils/installer/main.pyi +0 -57
- stouputils/stouputils/installer/windows.pyi +0 -31
- stouputils/stouputils/io.pyi +0 -213
- stouputils/stouputils/parallel.pyi +0 -216
- stouputils/stouputils/print.pyi +0 -136
- stouputils/stouputils/version_pkg.pyi +0 -15
- stouputils-1.14.2.dist-info/RECORD +0 -171
- {stouputils-1.14.2.dist-info → stouputils-1.15.0.dist-info}/entry_points.txt +0 -0
stouputils/print.pyi
CHANGED
|
@@ -9,13 +9,14 @@ BLUE: str
|
|
|
9
9
|
MAGENTA: str
|
|
10
10
|
CYAN: str
|
|
11
11
|
LINE_UP: str
|
|
12
|
+
BOLD: str
|
|
12
13
|
BAR_FORMAT: str
|
|
13
14
|
T = TypeVar('T')
|
|
14
15
|
previous_args_kwards: tuple[Any, Any]
|
|
15
16
|
nb_values: int
|
|
16
17
|
import_time: float
|
|
17
18
|
|
|
18
|
-
def colored_for_loop[T](iterable: Iterable[T], desc: str = 'Processing', color: str = ..., bar_format: str = ..., ascii: bool = False, **kwargs: Any) -> Iterator[T]:
|
|
19
|
+
def colored_for_loop[T](iterable: Iterable[T], desc: str = 'Processing', color: str = ..., bar_format: str = ..., ascii: bool = False, smooth_tqdm: bool = True, **kwargs: Any) -> Iterator[T]:
|
|
19
20
|
''' Function to iterate over a list with a colored TQDM progress bar like the other functions in this module.
|
|
20
21
|
|
|
21
22
|
\tArgs:
|
|
@@ -24,7 +25,7 @@ def colored_for_loop[T](iterable: Iterable[T], desc: str = 'Processing', color:
|
|
|
24
25
|
\t\tcolor\t\t(str):\t\t\t\tColor of the progress bar (Defaults to MAGENTA)
|
|
25
26
|
\t\tbar_format\t(str):\t\t\t\tFormat of the progress bar (Defaults to BAR_FORMAT)
|
|
26
27
|
\t\tascii\t\t(bool):\t\t\t\tWhether to use ASCII or Unicode characters for the progress bar (Defaults to False)
|
|
27
|
-
\t\
|
|
28
|
+
\t\tsmooth_tqdm\t(bool):\t\t\t\tWhether to enable smooth progress bar updates by setting miniters=1 and mininterval=0.0 (Defaults to True)
|
|
28
29
|
\t\t**kwargs:\t\t\t\t\t\tAdditional arguments to pass to the TQDM progress bar
|
|
29
30
|
|
|
30
31
|
\tYields:
|
|
@@ -35,7 +36,85 @@ def colored_for_loop[T](iterable: Iterable[T], desc: str = 'Processing', color:
|
|
|
35
36
|
\t\t... time.sleep(0.01)
|
|
36
37
|
\t\t>>> # Time sleeping loop: 100%|██████████████████| 10/10 [ 95.72it/s, 00:00<00:00]
|
|
37
38
|
\t'''
|
|
38
|
-
def
|
|
39
|
+
def format_colored(*values: Any) -> str:
|
|
40
|
+
''' Format text with Python 3.14 style colored formatting.
|
|
41
|
+
|
|
42
|
+
\tDynamically colors text by analyzing each word:
|
|
43
|
+
\t- File paths in magenta
|
|
44
|
+
\t- Numbers in magenta
|
|
45
|
+
\t- Function names (built-in and callable objects) in magenta
|
|
46
|
+
\t- Exception names in bold magenta
|
|
47
|
+
|
|
48
|
+
\tArgs:
|
|
49
|
+
\t\tvalues\t(Any):\tValues to format (like the print function)
|
|
50
|
+
|
|
51
|
+
\tReturns:
|
|
52
|
+
\t\tstr: The formatted text with ANSI color codes
|
|
53
|
+
|
|
54
|
+
\tExamples:
|
|
55
|
+
\t\t>>> # Test function names with parentheses
|
|
56
|
+
\t\t>>> result = format_colored("Call print() with 42 items")
|
|
57
|
+
\t\t>>> result.count(MAGENTA) == 2 # print and 42
|
|
58
|
+
\t\tTrue
|
|
59
|
+
|
|
60
|
+
\t\t>>> # Test function names without parentheses
|
|
61
|
+
\t\t>>> result = format_colored("Use len and sum functions")
|
|
62
|
+
\t\t>>> result.count(MAGENTA) == 2 # len and sum
|
|
63
|
+
\t\tTrue
|
|
64
|
+
|
|
65
|
+
\t\t>>> # Test exceptions (bold magenta)
|
|
66
|
+
\t\t>>> result = format_colored("Got ValueError when parsing")
|
|
67
|
+
\t\t>>> result.count(MAGENTA) == 1 and result.count(BOLD) == 1 # ValueError in bold magenta
|
|
68
|
+
\t\tTrue
|
|
69
|
+
|
|
70
|
+
\t\t>>> # Test file paths
|
|
71
|
+
\t\t>>> result = format_colored("Processing ./data.csv file")
|
|
72
|
+
\t\t>>> result.count(MAGENTA) == 1 # ./data.csv
|
|
73
|
+
\t\tTrue
|
|
74
|
+
|
|
75
|
+
\t\t>>> # Test file paths with quotes
|
|
76
|
+
\t\t>>> result = format_colored(\'File "/path/to/script.py" line 42\')
|
|
77
|
+
\t\t>>> result.count(MAGENTA) == 2 # /path/to/script.py and 42
|
|
78
|
+
\t\tTrue
|
|
79
|
+
|
|
80
|
+
\t\t>>> # Test numbers
|
|
81
|
+
\t\t>>> result = format_colored("Found 100 items and 3.14 value")
|
|
82
|
+
\t\t>>> result.count(MAGENTA) == 2 # 100 and 3.14
|
|
83
|
+
\t\tTrue
|
|
84
|
+
|
|
85
|
+
\t\t>>> # Test mixed content
|
|
86
|
+
\t\t>>> result = format_colored("Call sum() got IndexError at line 256 in utils.py")
|
|
87
|
+
\t\t>>> result.count(MAGENTA) == 3 # sum, IndexError (bold), and 256
|
|
88
|
+
\t\tTrue
|
|
89
|
+
\t\t>>> result.count(BOLD) == 1 # IndexError is bold
|
|
90
|
+
\t\tTrue
|
|
91
|
+
|
|
92
|
+
\t\t>>> # Test plain text (no coloring)
|
|
93
|
+
\t\t>>> result = format_colored("This is plain text")
|
|
94
|
+
\t\t>>> result.count(MAGENTA) == 0 and result == "This is plain text"
|
|
95
|
+
\t\tTrue
|
|
96
|
+
\t'''
|
|
97
|
+
def colored(*values: Any, file: TextIO | None = None, **print_kwargs: Any) -> None:
|
|
98
|
+
''' Print with Python 3.14 style colored formatting.
|
|
99
|
+
|
|
100
|
+
\tDynamically colors text by analyzing each word:
|
|
101
|
+
\t- File paths in magenta
|
|
102
|
+
\t- Numbers in magenta
|
|
103
|
+
\t- Function names (built-in and callable objects) in magenta
|
|
104
|
+
\t- Exception names in bold magenta
|
|
105
|
+
|
|
106
|
+
\tArgs:
|
|
107
|
+
\t\tvalues\t\t\t(Any):\t\tValues to print (like the print function)
|
|
108
|
+
\t\tfile\t\t\t(TextIO):\tFile to write the message to (default: sys.stdout)
|
|
109
|
+
\t\tprint_kwargs\t(dict):\t\tKeyword arguments to pass to the print function
|
|
110
|
+
|
|
111
|
+
\tExamples:
|
|
112
|
+
\t\t>>> colored("File \'/path/to/file.py\', line 42, in function_name") # doctest: +SKIP
|
|
113
|
+
\t\t>>> colored("KeyboardInterrupt") # doctest: +SKIP
|
|
114
|
+
\t\t>>> colored("Processing data.csv with 100 items") # doctest: +SKIP
|
|
115
|
+
\t\t>>> colored("Using print and len functions") # doctest: +SKIP
|
|
116
|
+
\t'''
|
|
117
|
+
def info(*values: Any, color: str = ..., text: str = 'INFO ', prefix: str = '', file: TextIO | list[TextIO] | None = None, use_colored: bool = False, **print_kwargs: Any) -> None:
|
|
39
118
|
''' Print an information message looking like "[INFO HH:MM:SS] message" in green by default.
|
|
40
119
|
|
|
41
120
|
\tArgs:
|
|
@@ -44,6 +123,7 @@ def info(*values: Any, color: str = ..., text: str = 'INFO ', prefix: str = '',
|
|
|
44
123
|
\t\ttext\t\t\t(str):\t\t\t\t\tText of the message (default: "INFO ")
|
|
45
124
|
\t\tprefix\t\t\t(str):\t\t\t\t\tPrefix to add to the values
|
|
46
125
|
\t\tfile\t\t\t(TextIO|list[TextIO]):\tFile(s) to write the message to (default: sys.stdout)
|
|
126
|
+
\t\tuse_colored\t\t(bool):\t\t\t\t\tWhether to use the colored() function to format the message
|
|
47
127
|
\t\tprint_kwargs\t(dict):\t\t\t\t\tKeyword arguments to pass to the print function
|
|
48
128
|
\t'''
|
|
49
129
|
def debug(*values: Any, **print_kwargs: Any) -> None:
|
|
@@ -134,3 +214,12 @@ def is_same_print(*args: Any, **kwargs: Any) -> bool:
|
|
|
134
214
|
""" Checks if the current print call is the same as the previous one. """
|
|
135
215
|
def current_time() -> str:
|
|
136
216
|
''' Get the current time as "HH:MM:SS" if less than 24 hours since import, else "YYYY-MM-DD HH:MM:SS" '''
|
|
217
|
+
def infoc(*args: Any, **kwargs: Any) -> None: ...
|
|
218
|
+
def debugc(*args: Any, **kwargs: Any) -> None: ...
|
|
219
|
+
def alt_debugc(*args: Any, **kwargs: Any) -> None: ...
|
|
220
|
+
def warningc(*args: Any, **kwargs: Any) -> None: ...
|
|
221
|
+
def errorc(*args: Any, **kwargs: Any) -> None: ...
|
|
222
|
+
def progressc(*args: Any, **kwargs: Any) -> None: ...
|
|
223
|
+
def suggestionc(*args: Any, **kwargs: Any) -> None: ...
|
|
224
|
+
def whatisitc(*args: Any, **kwargs: Any) -> None: ...
|
|
225
|
+
def breakpointc(*args: Any, **kwargs: Any) -> None: ...
|
stouputils/py.typed
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: stouputils
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.15.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
|
Keywords: utilities,tools,helpers,development,python
|
|
6
6
|
Author: Stoupy51
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
stouputils/__init__.py,sha256=KMJoy8FCiiiXJ53QfgU3rz7AY7AJ_j5kP3j24JuznC0,1136
|
|
2
|
+
stouputils/__init__.pyi,sha256=J8LeijIkWrTdGlevNR8dlGlgYg-Dh_MvGjp2EsPZ8UM,351
|
|
3
|
+
stouputils/__main__.py,sha256=sJSncuTWua7jA9pTw4BUoDzNUUExZKeyATbmY4lhl0E,2764
|
|
4
|
+
stouputils/_deprecated.py,sha256=Bcq6YjdM9Rk9Vq-WMhc_tuEbPORX6U8HAJ9Vh-VIWTA,1478
|
|
5
|
+
stouputils/_deprecated.pyi,sha256=6-8YsftJd2fRAdBLsysc6jf-uA8V2wiqkiFAbdfWfJQ,664
|
|
6
|
+
stouputils/all_doctests.py,sha256=1bGGUg80nvLBY3wrPkFrkcuQRjFTWmTpHZtai9X-vnY,5891
|
|
7
|
+
stouputils/all_doctests.pyi,sha256=8JD8qn7neYuR0PolabWxX6id1dNEvQDrvOhMS2aYhTM,1907
|
|
8
|
+
stouputils/applications/__init__.py,sha256=dbjwZt8PZF043KoJSItqCpH32FtRxN5sgV-8Q2b1l10,457
|
|
9
|
+
stouputils/applications/__init__.pyi,sha256=DTYq2Uqq1uLzCMkFByjRqdtREA-9SaQnp4QpgmCEPFg,56
|
|
10
|
+
stouputils/applications/automatic_docs.py,sha256=_6XbCuVi2EiSdkiPZ7XHr5mUGh2ZORev8Vd0tJDb0ug,20561
|
|
11
|
+
stouputils/applications/automatic_docs.pyi,sha256=sfFXpVE5y5Z907HEjKzpZ_9zM34d-jKNDQCdMx7E-9s,6189
|
|
12
|
+
stouputils/applications/upscaler/__init__.py,sha256=8vrca93OYu5GQJrZO1GvnAbptzyhu_L0DnP3M9unlA0,1142
|
|
13
|
+
stouputils/applications/upscaler/__init__.pyi,sha256=VSp6Tq09ATCTdfnjhbDnu7lblaLLGbCNi-E22jYxa88,67
|
|
14
|
+
stouputils/applications/upscaler/config.py,sha256=3WHJv6fznM03nWpdvy72OheuJvNgOZfHH4GEjyRpnZU,5559
|
|
15
|
+
stouputils/applications/upscaler/config.pyi,sha256=lsRHAW3mvvM2inKSJ66VXb511ovmIScLABrUzckmUfk,608
|
|
16
|
+
stouputils/applications/upscaler/image.py,sha256=3oyAp0BwGfP-BoUDBmPJUzT88mbLyvVXp1PTOJVxKpw,9767
|
|
17
|
+
stouputils/applications/upscaler/image.pyi,sha256=AB92XoKt8Q2c_J72ZdDdyVDuCGOEiM7E6v8L-uFmAxI,4786
|
|
18
|
+
stouputils/applications/upscaler/video.py,sha256=2YItk_QJ9sENllOPtwJC1QsvOto7IleIPsb6YNW3OvE,11853
|
|
19
|
+
stouputils/applications/upscaler/video.pyi,sha256=AyRlb7iHqCwdW7lHiW8Dy_czin8CbN-GiK2_xoVJvNU,2918
|
|
20
|
+
stouputils/archive.py,sha256=uDrPFxbY_C8SwUZRH4FWnYSoJKkFWynCx751zP9AHaY,12144
|
|
21
|
+
stouputils/archive.pyi,sha256=Z2BbQAiErRYntv53QC9uf_XPw3tx3Oy73wB0Bbil11c,3246
|
|
22
|
+
stouputils/backup.py,sha256=AE5WKMLiyk0VkRUfhmNfO2EUeUbZY5GTFVIuI5z7axA,20947
|
|
23
|
+
stouputils/backup.pyi,sha256=-SLVykkR5U8479T84zjNPVBNnV193s0zyWjathY2DDA,4923
|
|
24
|
+
stouputils/collections.py,sha256=5u904s_osO03-drmqPXtFZUlcweDatEQmY-dLUrnNX0,8849
|
|
25
|
+
stouputils/collections.pyi,sha256=mKIBV4K7mm-PTvtoYi_cVOAGjW7bo3iIASqosSXFUzE,3519
|
|
26
|
+
stouputils/continuous_delivery/__init__.py,sha256=JqPww29xZ-pp6OJDGhUj2dxyV9rgTTMUz0YDDVr9RaA,731
|
|
27
|
+
stouputils/continuous_delivery/__init__.pyi,sha256=_Sz2D10n1CDEyY8qDFwXNKdr01HVxanY4qdq9aN19cc,117
|
|
28
|
+
stouputils/continuous_delivery/cd_utils.py,sha256=fkaHk2V3j66uFAUsM2c_UddNhXW2KAQcrh7jVsH79pU,8594
|
|
29
|
+
stouputils/continuous_delivery/cd_utils.pyi,sha256=nxTLQydVOSVIix88dRtBXjMrUPpI5ftiQYbLI_nMByQ,4848
|
|
30
|
+
stouputils/continuous_delivery/github.py,sha256=Iva2XNm60Th78P_evnhCJHn0Q9-06udPlOZAxtZB5vw,19464
|
|
31
|
+
stouputils/continuous_delivery/github.pyi,sha256=RHRsSroEsT0I1qeuq-Wg0JLdEEDttLrzgHZPVRtLZ0Q,6641
|
|
32
|
+
stouputils/continuous_delivery/pypi.py,sha256=v7EVkF36mi1VtGiSRd-H4k9DQsdMmOnRYDgjdnCezOU,5322
|
|
33
|
+
stouputils/continuous_delivery/pypi.pyi,sha256=fRAu8ocLNpEN6dhUTMuFxlmRgt3-LRjKPOJjFlUPrJ4,2463
|
|
34
|
+
stouputils/continuous_delivery/pyproject.py,sha256=olD3QqzLfCLnTBw8IkSKSLBPWyeMv6uS7A0yGdFuIvQ,4802
|
|
35
|
+
stouputils/continuous_delivery/pyproject.pyi,sha256=bMWwqyG0Auo46dt-dWGePQ9yJ8rSrgb7mnJTfbiS3TQ,2053
|
|
36
|
+
stouputils/continuous_delivery/stubs.py,sha256=xUAcP21Y03PLEr7X6LrIBMvPeLI8Rp-EyaTLxocA0C4,3512
|
|
37
|
+
stouputils/continuous_delivery/stubs.pyi,sha256=sLZypdz1oGoymQIRPez50rnH8TQhvEIx6A7xUdGtnys,2390
|
|
38
|
+
stouputils/ctx.py,sha256=KVVDmL3pAPX2WM_QzjsmctbG-YfjJ-4aWBSoI7eU_ws,15586
|
|
39
|
+
stouputils/ctx.pyi,sha256=-7AJwD9bKzKBFsYlgyULPznstq3LvXRXe2r_2at72FI,9799
|
|
40
|
+
stouputils/data_science/config/get.py,sha256=smdWcu5bBlY38WGtC3GzIF2el-gpvSlDMRNsypmr0JM,1773
|
|
41
|
+
stouputils/data_science/config/set.py,sha256=PBBnWhgSptWTPkMtq3N1UxmEz_E4ywUcl3daS43wA2M,4175
|
|
42
|
+
stouputils/data_science/data_processing/image/__init__.py,sha256=ovzV48Bn0tyKXnAMMdujzwT89-1g-PK7GYNlHBrMt9Q,1889
|
|
43
|
+
stouputils/data_science/data_processing/image/auto_contrast.py,sha256=xDwnv-suNHgO1sjWK09WulJeQVyGJIGH0ZyqrJldeX4,2368
|
|
44
|
+
stouputils/data_science/data_processing/image/axis_flip.py,sha256=fu7aD_qZltymmC541JpZs2XJcN4A1EO2Vp_44S-ZCv0,1721
|
|
45
|
+
stouputils/data_science/data_processing/image/bias_field_correction.py,sha256=nBOD2t2ZzGal-x6NRqFxWdsKVb_9ELqjY9G4Q06CzQ4,2461
|
|
46
|
+
stouputils/data_science/data_processing/image/binary_threshold.py,sha256=vRd7PMp5srRwyPAbAm9bGexb6uU-C-zWT7itNyOSMLE,2526
|
|
47
|
+
stouputils/data_science/data_processing/image/blur.py,sha256=i92IEiy_nYV-s025k6tMJn0IsD-C39TWYGIuP1oxmOU,1752
|
|
48
|
+
stouputils/data_science/data_processing/image/brightness.py,sha256=_uv-qouAWh8Up9DpTQImZcbxSNx8xQ7ltGbA-F7PkSE,1725
|
|
49
|
+
stouputils/data_science/data_processing/image/canny.py,sha256=3T_B3Lt3oLRSJC-JSJ4JONMXSnLUiHNREjB_69T76V4,3970
|
|
50
|
+
stouputils/data_science/data_processing/image/clahe.py,sha256=ryAT7uxfxzGv3GdialqVlmkS1UCGT79Jg39mCuM9Mzs,3134
|
|
51
|
+
stouputils/data_science/data_processing/image/common.py,sha256=wCRO6x8c1bV7PNDylcRogkePNfteUcYoXtgZuaKJthY,754
|
|
52
|
+
stouputils/data_science/data_processing/image/contrast.py,sha256=deC3m5c4sCpF0LpjUPne6DookXskBEUfEA8sBTCrpcM,1667
|
|
53
|
+
stouputils/data_science/data_processing/image/curvature_flow_filter.py,sha256=SdI_x6sWsIlHSTAgbPERRsyi8kKgQojcwQYtcUCttBQ,2527
|
|
54
|
+
stouputils/data_science/data_processing/image/denoise.py,sha256=V6y1lIcRZqXSLt9gQee77Zv_ghxbx25umHFV-L1ogOU,13125
|
|
55
|
+
stouputils/data_science/data_processing/image/histogram_equalization.py,sha256=EwPEY7vS3JLAAH7lvXuyD9EyBIWPCkD08nvWiXyWAB4,4693
|
|
56
|
+
stouputils/data_science/data_processing/image/invert.py,sha256=RRFZEEjE-7vbq9x-ldZp2mXYggPg7xA3CJUpQ2iXdQw,1942
|
|
57
|
+
stouputils/data_science/data_processing/image/laplacian.py,sha256=Uf8kj--_8Obdr9rQl_MXRcmqlCWYNZ8Jh6gOKnjWuF4,2086
|
|
58
|
+
stouputils/data_science/data_processing/image/median_blur.py,sha256=a3VuZAyggmodIWPX2zEAnjtED_HezdE6PMxDot06y2s,1552
|
|
59
|
+
stouputils/data_science/data_processing/image/noise.py,sha256=U3MA-Jw5DAjSE24-zptUt85QoUXzYtt1c7JhlscE3iI,1936
|
|
60
|
+
stouputils/data_science/data_processing/image/normalize.py,sha256=uCZNrf-WHT41ZvRNxBiNlGtGZ71ocrBRIUjYO2BMuO0,1982
|
|
61
|
+
stouputils/data_science/data_processing/image/random_erase.py,sha256=M1kmscbG0idwZd33b8ZUEj50Nn-QARSIZlTXqfOsY_Q,2173
|
|
62
|
+
stouputils/data_science/data_processing/image/resize.py,sha256=p-EE_77sgweelDhNoXNuX3qW23jEpgZtDmfJdhPonhA,2128
|
|
63
|
+
stouputils/data_science/data_processing/image/rotation.py,sha256=ZY0oQnQPzikt9lmJSPo4MVE_nNI67_7apYSNJT-GHbY,2566
|
|
64
|
+
stouputils/data_science/data_processing/image/salt_pepper.py,sha256=Dp9_BNVPifM54PAQsIcmKN0n6GuklFboqCH3E-vqMpE,2155
|
|
65
|
+
stouputils/data_science/data_processing/image/sharpening.py,sha256=HHZNalFXyEQRdp3pN1bI3fZKcHdnkWZRb9OBt7Sw3O0,1635
|
|
66
|
+
stouputils/data_science/data_processing/image/shearing.py,sha256=ikT5YuE3w31lC9lX7qtM8JTJGpzfHmX-gMcdLy8eS3Y,2102
|
|
67
|
+
stouputils/data_science/data_processing/image/threshold.py,sha256=rQjlpzoVJqq8KwAB0LF_LZBm2bcaovEN7IElfHD7bKM,2365
|
|
68
|
+
stouputils/data_science/data_processing/image/translation.py,sha256=PKwKOA9L6OuTiROFd6cO9ze2d0nGzwLN6u1R59AKoqU,2531
|
|
69
|
+
stouputils/data_science/data_processing/image/zoom.py,sha256=p8QSL6El7KYEM_iLmC_wANdv1oWNKHpeQBb_fsCYOiw,2696
|
|
70
|
+
stouputils/data_science/data_processing/image_augmentation.py,sha256=7fUKxI3laHiVWOG91Y1OfKQn45-KQ1GO3gIywNR5FRI,4807
|
|
71
|
+
stouputils/data_science/data_processing/image_preprocess.py,sha256=qjko0aL-8T5cLIifOvhDBPSmmr4JRRqdtrWnapxd59s,6501
|
|
72
|
+
stouputils/data_science/data_processing/prosthesis_detection.py,sha256=SgJuKhdXX2xL05ABVePs-jEB22l83KNhEOJh7pjxtcE,13470
|
|
73
|
+
stouputils/data_science/data_processing/technique.py,sha256=rql-ObXZKxEZDerYstGNNPsGUNV73aSU7ABDM6-lhXE,20136
|
|
74
|
+
stouputils/data_science/dataset/__init__.py,sha256=FptJEc5mkzIM95ZmHv3SW3RCfE9SSykroE7uBA86zH0,1604
|
|
75
|
+
stouputils/data_science/dataset/dataset.py,sha256=IRca5EXiLQf4QgPnKY4b3hAG4p1s-QQ46r7mIx0NOIQ,11566
|
|
76
|
+
stouputils/data_science/dataset/dataset_loader.py,sha256=XExz1oYcQUYxSKU0-U7FTaCzIHK0rdCdHKOH0OOv5Rg,4562
|
|
77
|
+
stouputils/data_science/dataset/grouping_strategy.py,sha256=rykG-TfSEzDyb7R8HjZfoNJMiepknOMF8nDSOZFNBgA,10946
|
|
78
|
+
stouputils/data_science/dataset/image_loader.py,sha256=pqQvAEfxVvyzpdvbiSMIQGIj27v8bP3aLtHmbXBywE8,4000
|
|
79
|
+
stouputils/data_science/dataset/xy_tuple.py,sha256=tovKezsldERHEJX_DI9NzuA_6WOiwQFwZoL5u_zVzvc,26074
|
|
80
|
+
stouputils/data_science/metric_dictionnary.py,sha256=_bOybn8Bt-Fbp4Qis18hYmrA3t8oAjunAd7v432edFY,3950
|
|
81
|
+
stouputils/data_science/metric_utils.py,sha256=cHO1eS-gUZdfGfx4sMUXczMgrJScPLesciN9NGLQysI,34006
|
|
82
|
+
stouputils/data_science/mlflow_utils.py,sha256=_fM7LljiojYgGF3zpOlIVzKW_CnVVJzpCLwmPEKrUVw,7275
|
|
83
|
+
stouputils/data_science/models/abstract_model.py,sha256=cZmYA4-Sb5Q2ySzQqsNy3KoEWAgcsQdzMTC1ff3gyPg,4104
|
|
84
|
+
stouputils/data_science/models/all.py,sha256=BfBJO8PGGMDbWuAXB90JT-vne8rAo0yVnyL_t4PuO5E,3124
|
|
85
|
+
stouputils/data_science/models/base_keras.py,sha256=bOQ6Uk0dILgcjnCT2KehUdc99btOzf5C7xC3Ljx4FUM,27764
|
|
86
|
+
stouputils/data_science/models/keras/all.py,sha256=-InRH5x-5bZsbBGqnuCxDtAg59dTcvhDqYsnqiJtmgs,1041
|
|
87
|
+
stouputils/data_science/models/keras/convnext.py,sha256=3CMhnK_dZgCS6Y0XorRu1QKm12RexdH7HG1-ZISHBlo,2595
|
|
88
|
+
stouputils/data_science/models/keras/densenet.py,sha256=b4mPfwvibhrrIBpFtkcmRWmJXxfx0pNfxcE7t0KLSQg,1858
|
|
89
|
+
stouputils/data_science/models/keras/efficientnet.py,sha256=or4zHeBt82nBnXSNr3AJdziNz8F4wTZZeAmR2IRPkps,2502
|
|
90
|
+
stouputils/data_science/models/keras/mobilenet.py,sha256=ugPYSp_2g3QL_qPBfOZZx0gk2kMeZpic6WkFDvLoveM,2313
|
|
91
|
+
stouputils/data_science/models/keras/resnet.py,sha256=DJexThuFCnYj4cRaa80CunizkOtEu721nLN4UjC3Cko,1841
|
|
92
|
+
stouputils/data_science/models/keras/squeezenet.py,sha256=fvM3xrpRUwKWL6Ter04HosoZkvfK9OCHuH7v1qPXAzY,8590
|
|
93
|
+
stouputils/data_science/models/keras/vgg.py,sha256=D3UJ2uGu8O6bXUUv2tBFwFrXru-oUSjtsbvBPo1WPfc,1545
|
|
94
|
+
stouputils/data_science/models/keras/xception.py,sha256=PHMAQHgM6P9OocC__BBiTLYtc_q7NQ_liug0tQWZ328,1295
|
|
95
|
+
stouputils/data_science/models/keras_utils/callbacks/__init__.py,sha256=211evA7wPJVL5rJ-qGZq1oMj5e-RpZr0_HGfMupGGfo,873
|
|
96
|
+
stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py,sha256=b321QLJu3q7S6ThQeHu7s6PXsm5h0JIFugq5wcUiYLo,7860
|
|
97
|
+
stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py,sha256=p6gIR-Rj2NBGAfWRrhDsS_XViA50nBcPCDDTXCylonk,5206
|
|
98
|
+
stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py,sha256=_9UXBP-Ryef_WCpRaWT0exhSX8VLezXF-FRDMlYTc58,966
|
|
99
|
+
stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py,sha256=MD3V3Uj-7D6Z5jPr09GKBx2HnOgKn7CY4BHzuyVWCoo,9854
|
|
100
|
+
stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py,sha256=WeP3YyoXyMBuLmzW9TqSIx1Sf1dEOoNYhNLvsK3JlSs,2378
|
|
101
|
+
stouputils/data_science/models/keras_utils/losses/__init__.py,sha256=W8NELTZJ217yY8-Pr614a6W5o4_yWuEboCm4e1N6yZY,186
|
|
102
|
+
stouputils/data_science/models/keras_utils/losses/next_generation_loss.py,sha256=U0HfYUVNi1b5YRA9XtB9dpSZ7D3jkEUrEonmlVd3sbY,1634
|
|
103
|
+
stouputils/data_science/models/keras_utils/visualizations.py,sha256=XQDPgLHosKdUxV-B6s73lVmgiTqmmxuov-VTNxnA5_c,15867
|
|
104
|
+
stouputils/data_science/models/model_interface.py,sha256=om1hnEYHTILfLJRcoTDhR7Rj0lbmW_8zIJkTIGuTqOQ,37140
|
|
105
|
+
stouputils/data_science/models/sandbox.py,sha256=ZeuoXNHnVvMlm6umCgTl2Ss0zyQSlxFEV9xJb3ET1Qw,4269
|
|
106
|
+
stouputils/data_science/range_tuple.py,sha256=5f5PQcwENZEMV0O6U5IpZ2_ylNMB_graDyv-wxrDUhk,6908
|
|
107
|
+
stouputils/data_science/scripts/augment_dataset.py,sha256=zGcQ2uSn_DO570NIFEs2DUc_d5uvWxLfY-RavjdO3aU,3469
|
|
108
|
+
stouputils/data_science/scripts/exhaustive_process.py,sha256=Ty2lHBZBweWxH6smpjoUEqpGz6JmMUO_oaNZO7d-gtQ,5483
|
|
109
|
+
stouputils/data_science/scripts/preprocess_dataset.py,sha256=OLC2KjEtSMeyHHPpNOATfNDuq0lZ09utKhsuzBA4MN4,2929
|
|
110
|
+
stouputils/data_science/scripts/routine.py,sha256=FkTLzmcdm_qUp69D-dPAKJm2RfXZZLtPgje6lEopu2I,7662
|
|
111
|
+
stouputils/data_science/utils.py,sha256=HFXI2RQZ53RbBOn_4Act2bi0z4xQlTtsuR5Am80v9JU,11084
|
|
112
|
+
stouputils/decorators.py,sha256=miZ8r2g8VhmQs2_knkKuUagdQabriZe7w0fCOEB69Nw,21838
|
|
113
|
+
stouputils/decorators.pyi,sha256=vbPRsvox4dotqcln3StgE6iZ1cWCOeAn56M9zMpdw2U,10948
|
|
114
|
+
stouputils/image.py,sha256=NtduEVzgbCuZhDRpDZHGTW7-wTs7MqoxUwSQcipvb08,16633
|
|
115
|
+
stouputils/image.pyi,sha256=Dkf64KmXJTAEcbtYDHFZ1kqEHqOf2FgJ2Z2BlJgp4fU,8455
|
|
116
|
+
stouputils/installer/__init__.py,sha256=DBwI9w3xvw0NR_jDMxmURwPi1F79kPLe7EuNjmrxW_U,502
|
|
117
|
+
stouputils/installer/__init__.pyi,sha256=ZB-8frAUOW-0pCEJL-e2AdbFodivv46v3EBYwEXCxRo,117
|
|
118
|
+
stouputils/installer/common.py,sha256=UJr5u02h4LQZQdkmVOkJ3vvW_0-ROGgVMMh0PNoVS1A,2209
|
|
119
|
+
stouputils/installer/common.pyi,sha256=5aG0-58omFkkNYeVHnQ0uHUBsaI7xoMD-WqWVdOgOms,1403
|
|
120
|
+
stouputils/installer/downloader.py,sha256=IIV_zI1lnKCD-9OsnroOoo4nDPOLr2Vn6oOYHnXshj8,3659
|
|
121
|
+
stouputils/installer/downloader.pyi,sha256=8Xp0sXyba4flHAZ0nNqNlFU4VUmfPvllmPUkWalkvRA,1273
|
|
122
|
+
stouputils/installer/linux.py,sha256=6BsMFoBDn1-RPMCW8rAciuxHwxbk9QTX0DmA-meQdDE,5512
|
|
123
|
+
stouputils/installer/linux.pyi,sha256=V-EbY7seOFnC6LL844bqWRNvQ7rHmMhDkcFj5r1V7Tk,1943
|
|
124
|
+
stouputils/installer/main.py,sha256=8wrx_cnQo1dFGRf6x8vtxh6-96tQ-AzMyvJ0S64j0io,8538
|
|
125
|
+
stouputils/installer/main.pyi,sha256=r3j4GoMBpU06MpOqjSwoDTiSMOmbA3WWUA87970b6KE,3134
|
|
126
|
+
stouputils/installer/windows.py,sha256=r2AIuoyAmtMEuoCtQBH9GWQWI-JUT2J9zoH28j9ruOU,4880
|
|
127
|
+
stouputils/installer/windows.pyi,sha256=tHogIFhPVDQS0I10liLkAxnpaFFAvmFtEVMpPIae5LU,1616
|
|
128
|
+
stouputils/io.py,sha256=XG2cReP8wzmoe0LyMtUqvEqixiHehPvXW23h5hBf_Pw,17202
|
|
129
|
+
stouputils/io.pyi,sha256=TCBTVEWUkI3dO_jWI9oPMF9SbnT1yLzFChE551JPbSY,9076
|
|
130
|
+
stouputils/parallel.py,sha256=_o96klxFYgDPyxCeqFp5qNOtJhhXHQYmFIfqbJYnxko,19061
|
|
131
|
+
stouputils/parallel.pyi,sha256=ug9I-Ni2q9cwwByXERQuxW-UM3rqw3dCiurnJjOWUpI,11576
|
|
132
|
+
stouputils/print.py,sha256=crcvgJO-NCbQ6-C3Prsxvsn8E9mPKI186t_xcQ6O2Uo,24527
|
|
133
|
+
stouputils/print.pyi,sha256=SRAAdObriW_LPcqvDGrCpjfGLrswRhIyJmCvC9_3OpM,10232
|
|
134
|
+
stouputils/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
135
|
+
stouputils/version_pkg.py,sha256=Jsp-s03L14DkiZ94vQgrlQmaxApfn9DC8M_nzT1SJLk,7014
|
|
136
|
+
stouputils/version_pkg.pyi,sha256=QPvqp1U3QA-9C_CC1dT9Vahv1hXEhstbM7x5uzMZSsQ,755
|
|
137
|
+
stouputils-1.15.0.dist-info/WHEEL,sha256=XjEbIc5-wIORjWaafhI6vBtlxDBp7S9KiujWF1EM7Ak,79
|
|
138
|
+
stouputils-1.15.0.dist-info/entry_points.txt,sha256=tx0z9VOnE-sfkmbFbA93zaBMzV3XSsKEJa_BWIqUzxw,57
|
|
139
|
+
stouputils-1.15.0.dist-info/METADATA,sha256=1FFyPDRUgvHlhXrDArmApMkI6nwy3rDZbqWWKWlPQ1Q,13615
|
|
140
|
+
stouputils-1.15.0.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
from ._deprecated import *
|
|
2
|
-
from .all_doctests import *
|
|
3
|
-
from .archive import *
|
|
4
|
-
from .backup import *
|
|
5
|
-
from .collections import *
|
|
6
|
-
from .continuous_delivery import *
|
|
7
|
-
from .ctx import *
|
|
8
|
-
from .decorators import *
|
|
9
|
-
from .image import *
|
|
10
|
-
from .io import *
|
|
11
|
-
from .parallel import *
|
|
12
|
-
from .print import *
|
|
13
|
-
from .version_pkg import *
|
|
14
|
-
|
|
15
|
-
__version__: str
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from .decorators import LogLevels as LogLevels, deprecated as deprecated
|
|
2
|
-
from .io import csv_dump as csv_dump, csv_load as csv_load, json_dump as json_dump, json_load as json_load
|
|
3
|
-
from typing import Any
|
|
4
|
-
|
|
5
|
-
def super_csv_dump(*args: Any, **kwargs: Any) -> Any:
|
|
6
|
-
''' Deprecated function, use "csv_dump" instead. '''
|
|
7
|
-
def super_csv_load(*args: Any, **kwargs: Any) -> Any:
|
|
8
|
-
''' Deprecated function, use "csv_load" instead. '''
|
|
9
|
-
def super_json_dump(*args: Any, **kwargs: Any) -> Any:
|
|
10
|
-
''' Deprecated function, use "json_dump" instead. '''
|
|
11
|
-
def super_json_load(*args: Any, **kwargs: Any) -> Any:
|
|
12
|
-
''' Deprecated function, use "json_load" instead. '''
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
from . import decorators as decorators
|
|
2
|
-
from .decorators import measure_time as measure_time
|
|
3
|
-
from .io import clean_path as clean_path, relative_path as relative_path
|
|
4
|
-
from .print import error as error, info as info, progress as progress, warning as warning
|
|
5
|
-
from doctest import TestResults as TestResults
|
|
6
|
-
from types import ModuleType
|
|
7
|
-
|
|
8
|
-
def launch_tests(root_dir: str, strict: bool = True) -> int:
|
|
9
|
-
''' Main function to launch tests for all modules in the given directory.
|
|
10
|
-
|
|
11
|
-
\tArgs:
|
|
12
|
-
\t\troot_dir\t\t\t\t(str):\t\t\tRoot directory to search for modules
|
|
13
|
-
\t\tstrict\t\t\t\t\t(bool):\t\t\tModify the force_raise_exception variable to True in the decorators module
|
|
14
|
-
|
|
15
|
-
\tReturns:
|
|
16
|
-
\t\tint: The number of failed tests
|
|
17
|
-
|
|
18
|
-
\tExamples:
|
|
19
|
-
\t\t>>> launch_tests("unknown_dir")
|
|
20
|
-
\t\tTraceback (most recent call last):
|
|
21
|
-
\t\t\t...
|
|
22
|
-
\t\tValueError: No modules found in \'unknown_dir\'
|
|
23
|
-
|
|
24
|
-
\t.. code-block:: python
|
|
25
|
-
|
|
26
|
-
\t\t> if launch_tests("/path/to/source") > 0:
|
|
27
|
-
\t\t\tsys.exit(1)
|
|
28
|
-
\t\t[PROGRESS HH:MM:SS] Importing module \'module1\'\ttook 0.001s
|
|
29
|
-
\t\t[PROGRESS HH:MM:SS] Importing module \'module2\'\ttook 0.002s
|
|
30
|
-
\t\t[PROGRESS HH:MM:SS] Importing module \'module3\'\ttook 0.003s
|
|
31
|
-
\t\t[PROGRESS HH:MM:SS] Importing module \'module4\'\ttook 0.004s
|
|
32
|
-
\t\t[INFO HH:MM:SS] Testing 4 modules...
|
|
33
|
-
\t\t[PROGRESS HH:MM:SS] Testing module \'module1\'\ttook 0.005s
|
|
34
|
-
\t\t[PROGRESS HH:MM:SS] Testing module \'module2\'\ttook 0.006s
|
|
35
|
-
\t\t[PROGRESS HH:MM:SS] Testing module \'module3\'\ttook 0.007s
|
|
36
|
-
\t\t[PROGRESS HH:MM:SS] Testing module \'module4\'\ttook 0.008s
|
|
37
|
-
\t'''
|
|
38
|
-
def test_module_with_progress(module: ModuleType, separator: str) -> TestResults:
|
|
39
|
-
""" Test a module with testmod and measure the time taken with progress printing.
|
|
40
|
-
|
|
41
|
-
\tArgs:
|
|
42
|
-
\t\tmodule\t\t(ModuleType):\tModule to test
|
|
43
|
-
\t\tseparator\t(str):\t\t\tSeparator string for alignment in output
|
|
44
|
-
\tReturns:
|
|
45
|
-
\t\tTestResults: The results of the tests
|
|
46
|
-
\t"""
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
from ..continuous_delivery import version_to_float as version_to_float
|
|
2
|
-
from ..decorators import LogLevels as LogLevels, handle_error as handle_error, simple_cache as simple_cache
|
|
3
|
-
from ..io import clean_path as clean_path, json_dump as json_dump, super_open as super_open
|
|
4
|
-
from ..print import info as info
|
|
5
|
-
from collections.abc import Callable as Callable
|
|
6
|
-
|
|
7
|
-
REQUIREMENTS: list[str]
|
|
8
|
-
|
|
9
|
-
def check_dependencies(html_theme: str) -> None:
|
|
10
|
-
''' Check for each requirement if it is installed.
|
|
11
|
-
|
|
12
|
-
\tArgs:
|
|
13
|
-
\t\thtml_theme (str): HTML theme to use for the documentation, to check if it is installed (e.g. "breeze", "pydata_sphinx_theme", "furo", etc.)
|
|
14
|
-
\t'''
|
|
15
|
-
def get_sphinx_conf_content(project: str, project_dir: str, author: str, current_version: str, copyright: str, html_logo: str, html_favicon: str, html_theme: str = 'breeze', github_user: str = '', github_repo: str = '', version_list: list[str] | None = None, skip_undocumented: bool = True) -> str:
|
|
16
|
-
""" Get the content of the Sphinx configuration file.
|
|
17
|
-
|
|
18
|
-
\tArgs:
|
|
19
|
-
\t\tproject (str): Name of the project
|
|
20
|
-
\t\tproject_dir (str): Path to the project directory
|
|
21
|
-
\t\tauthor (str): Author of the project
|
|
22
|
-
\t\tcurrent_version (str): Current version
|
|
23
|
-
\t\tcopyright (str): Copyright information
|
|
24
|
-
\t\thtml_logo (str): URL to the logo
|
|
25
|
-
\t\thtml_favicon (str): URL to the favicon
|
|
26
|
-
\t\tgithub_user (str): GitHub username
|
|
27
|
-
\t\tgithub_repo (str): GitHub repository name
|
|
28
|
-
\t\tversion_list (list[str] | None): List of versions. Defaults to None
|
|
29
|
-
\t\tskip_undocumented (bool): Whether to skip undocumented members. Defaults to True
|
|
30
|
-
|
|
31
|
-
\tReturns:
|
|
32
|
-
\t\tstr: Content of the Sphinx configuration file
|
|
33
|
-
\t"""
|
|
34
|
-
def get_versions_from_github(github_user: str, github_repo: str, recent_minor_versions: int = 2) -> list[str]:
|
|
35
|
-
""" Get list of versions from GitHub gh-pages branch.
|
|
36
|
-
\tOnly shows detailed versions for the last N minor versions, and keeps only
|
|
37
|
-
\tthe latest patch version for older minor versions.
|
|
38
|
-
|
|
39
|
-
\tArgs:
|
|
40
|
-
\t\tgithub_user (str): GitHub username
|
|
41
|
-
\t\tgithub_repo (str): GitHub repository name
|
|
42
|
-
\t\trecent_minor_versions (int): Number of recent minor versions to show all patches for (-1 for all).
|
|
43
|
-
|
|
44
|
-
\tReturns:
|
|
45
|
-
\t\tlist[str]: List of versions, with 'latest' as first element
|
|
46
|
-
\t"""
|
|
47
|
-
def markdown_to_rst(markdown_content: str) -> str:
|
|
48
|
-
""" Convert markdown content to RST format.
|
|
49
|
-
|
|
50
|
-
\tArgs:
|
|
51
|
-
\t\tmarkdown_content (str): Markdown content
|
|
52
|
-
|
|
53
|
-
\tReturns:
|
|
54
|
-
\t\tstr: RST content
|
|
55
|
-
\t"""
|
|
56
|
-
def generate_index_rst(readme_path: str, index_path: str, project: str, github_user: str, github_repo: str, get_versions_function: Callable[[str, str, int], list[str]] = ..., recent_minor_versions: int = 2) -> None:
|
|
57
|
-
""" Generate index.rst from README.md content.
|
|
58
|
-
|
|
59
|
-
\tArgs:
|
|
60
|
-
\t\treadme_path (str): Path to the README.md file
|
|
61
|
-
\t\tindex_path (str): Path where index.rst should be created
|
|
62
|
-
\t\tproject (str): Name of the project
|
|
63
|
-
\t\tgithub_user (str): GitHub username
|
|
64
|
-
\t\tgithub_repo (str): GitHub repository name
|
|
65
|
-
\t\tget_versions_function (Callable[[str, str, int], list[str]]): Function to get versions from GitHub
|
|
66
|
-
\t\trecent_minor_versions (int): Number of recent minor versions to show all patches for. Defaults to 2
|
|
67
|
-
\t"""
|
|
68
|
-
def generate_documentation(source_dir: str, modules_dir: str, project_dir: str, build_dir: str) -> None:
|
|
69
|
-
""" Generate documentation using Sphinx.
|
|
70
|
-
|
|
71
|
-
\tArgs:
|
|
72
|
-
\t\tsource_dir (str): Source directory
|
|
73
|
-
\t\tmodules_dir (str): Modules directory
|
|
74
|
-
\t\tproject_dir (str): Project directory
|
|
75
|
-
\t\tbuild_dir (str): Build directory
|
|
76
|
-
\t"""
|
|
77
|
-
def generate_redirect_html(filepath: str) -> None:
|
|
78
|
-
""" Generate HTML content for redirect page.
|
|
79
|
-
|
|
80
|
-
\tArgs:
|
|
81
|
-
\t\tfilepath (str): Path to the file where the HTML content should be written
|
|
82
|
-
\t"""
|
|
83
|
-
def update_documentation(root_path: str, project: str, project_dir: str = '', author: str = 'Author', copyright: str = '2025, Author', html_logo: str = '', html_favicon: str = '', html_theme: str = 'breeze', github_user: str = '', github_repo: str = '', version: str | None = None, skip_undocumented: bool = True, recent_minor_versions: int = 2, get_versions_function: Callable[[str, str, int], list[str]] = ..., generate_index_function: Callable[..., None] = ..., generate_docs_function: Callable[..., None] = ..., generate_redirect_function: Callable[[str], None] = ..., get_conf_content_function: Callable[..., str] = ...) -> None:
|
|
84
|
-
''' Update the Sphinx documentation.
|
|
85
|
-
|
|
86
|
-
\tArgs:
|
|
87
|
-
\t\troot_path (str): Root path of the project
|
|
88
|
-
\t\tproject (str): Name of the project
|
|
89
|
-
\t\tproject_dir (str): Path to the project directory (to be used with generate_docs_function)
|
|
90
|
-
\t\tauthor (str): Author of the project
|
|
91
|
-
\t\tcopyright (str): Copyright information
|
|
92
|
-
\t\thtml_logo (str): URL to the logo
|
|
93
|
-
\t\thtml_favicon (str): URL to the favicon
|
|
94
|
-
\t\thtml_theme (str): Theme to use for the documentation. Defaults to "breeze"
|
|
95
|
-
\t\tgithub_user (str): GitHub username
|
|
96
|
-
\t\tgithub_repo (str): GitHub repository name
|
|
97
|
-
\t\tversion (str | None): Version to build documentation for (e.g. "1.0.0", defaults to "latest")
|
|
98
|
-
\t\tskip_undocumented (bool): Whether to skip undocumented members. Defaults to True
|
|
99
|
-
\t\trecent_minor_versions (int): Number of recent minor versions to show all patches for. Defaults to 2
|
|
100
|
-
|
|
101
|
-
\t\tget_versions_function (Callable[[str, str, int], list[str]]): Function to get versions from GitHub
|
|
102
|
-
\t\tgenerate_index_function (Callable[..., None]): Function to generate index.rst
|
|
103
|
-
\t\tgenerate_docs_function (Callable[..., None]): Function to generate documentation
|
|
104
|
-
\t\tgenerate_redirect_function (Callable[[str], None]): Function to create redirect file
|
|
105
|
-
\t\tget_conf_content_function (Callable[..., str]): Function to get Sphinx conf.py content
|
|
106
|
-
\t'''
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
WAIFU2X_NCNN_VULKAN_RELEASES: dict[str, str]
|
|
2
|
-
FFMPEG_RELEASES: dict[str, str]
|
|
3
|
-
YOUTUBE_BITRATE_RECOMMENDATIONS: dict[str, dict[str, dict[int, int]]]
|
|
4
|
-
|
|
5
|
-
class Config:
|
|
6
|
-
""" Configuration class for the upscaler. """
|
|
7
|
-
JPG_QUALITY: int
|
|
8
|
-
VIDEO_FINAL_BITRATE: int
|
|
9
|
-
FFMPEG_EXECUTABLE: str
|
|
10
|
-
FFMPEG_ARGS: tuple[str, ...]
|
|
11
|
-
FFPROBE_EXECUTABLE: str
|
|
12
|
-
FFMPEG_CHECK_HELP_TEXT: str
|
|
13
|
-
UPSCALER_EXECUTABLE: str
|
|
14
|
-
UPSCALER_ARGS: tuple[str, ...]
|
|
15
|
-
UPSCALER_EXECUTABLE_HELP_TEXT: str
|
|
16
|
-
SLIGHTLY_FASTER_MODE: bool
|
|
17
|
-
upscaler_executable_checked: bool
|
|
18
|
-
ffmpeg_executable_checked: bool
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
from ...installer import check_executable as check_executable
|
|
2
|
-
from ...io import clean_path as clean_path
|
|
3
|
-
from ...parallel import multithreading as multithreading
|
|
4
|
-
from ...print import colored_for_loop as colored_for_loop, debug as debug, info as info
|
|
5
|
-
from .config import Config as Config, WAIFU2X_NCNN_VULKAN_RELEASES as WAIFU2X_NCNN_VULKAN_RELEASES
|
|
6
|
-
from tempfile import TemporaryDirectory
|
|
7
|
-
|
|
8
|
-
def convert_frame(frame_path: str, delete_png: bool = True) -> None:
|
|
9
|
-
''' Convert a PNG frame to JPG format to take less space.
|
|
10
|
-
|
|
11
|
-
\tArgs:
|
|
12
|
-
\t\tframe_path (str): Path to the PNG frame to convert.
|
|
13
|
-
\t\tdelete_png (bool): Whether to delete the original PNG file after conversion.
|
|
14
|
-
|
|
15
|
-
\tReturns:
|
|
16
|
-
\t\tNone: This function doesn\'t return anything.
|
|
17
|
-
|
|
18
|
-
\tExample:
|
|
19
|
-
\t\t.. code-block:: python
|
|
20
|
-
|
|
21
|
-
\t\t\t> convert_frame("input.png", delete_png=True)
|
|
22
|
-
\t\t\t> # input.png will be converted to input.jpg and the original file will be deleted
|
|
23
|
-
|
|
24
|
-
\t\t\t> convert_frame("input.png", delete_png=False)
|
|
25
|
-
\t\t\t> # input.png will be converted to input.jpg and the original file will be kept
|
|
26
|
-
\t'''
|
|
27
|
-
def get_all_files(folder: str, suffix: str | tuple[str, ...] = '') -> list[str]:
|
|
28
|
-
''' Get all files paths in a folder, with a specific suffix if provided.
|
|
29
|
-
|
|
30
|
-
\tArgs:
|
|
31
|
-
\t\tfolder (str): Path to the folder containing the files.
|
|
32
|
-
\t\tsuffix (str | tuple[str, ...]): Suffix of the files to get (e.g. ".png", ".jpg", etc.).
|
|
33
|
-
|
|
34
|
-
\tReturns:
|
|
35
|
-
\t\tlist[str]: List of all files paths in the folder.
|
|
36
|
-
|
|
37
|
-
\tExample:
|
|
38
|
-
\t\t>>> files: list[str] = get_all_files("some_folder", ".png")
|
|
39
|
-
\t\t>>> len(files)
|
|
40
|
-
\t\t0
|
|
41
|
-
\t'''
|
|
42
|
-
def create_temp_dir_for_not_upscaled(input_path: str, output_path: str) -> TemporaryDirectory[str] | None:
|
|
43
|
-
""" Creates a temporary directory containing only images that haven't been upscaled yet.
|
|
44
|
-
|
|
45
|
-
Args:
|
|
46
|
-
input_path (str): Path to the folder containing input images.
|
|
47
|
-
output_path (str): Path to the folder where upscaled images are saved.
|
|
48
|
-
|
|
49
|
-
Returns:
|
|
50
|
-
TemporaryDirectory[str] | None: A temporary directory object if there are images to process,
|
|
51
|
-
None if all images are already upscaled.
|
|
52
|
-
"""
|
|
53
|
-
def check_upscaler_executable() -> None: ...
|
|
54
|
-
def upscale(input_path: str, output_path: str, upscale_ratio: int) -> None:
|
|
55
|
-
''' Upscale an input image (or a directory of images) with the upscaler executable.
|
|
56
|
-
|
|
57
|
-
\tArgs:
|
|
58
|
-
\t\tinput_path (str): Path to the image to upscale (or a directory).
|
|
59
|
-
\t\toutput_path (str): Path to the output image (or a directory).
|
|
60
|
-
\t\tupscale_ratio (int): Upscaling ratio.
|
|
61
|
-
|
|
62
|
-
\tExample:
|
|
63
|
-
\t\t.. code-block:: python
|
|
64
|
-
|
|
65
|
-
\t\t\t> upscale("folder", "folder", 2)
|
|
66
|
-
\t\t\tTraceback (most recent call last):
|
|
67
|
-
\t\t\t\t...
|
|
68
|
-
\t\t\tAssertionError: Input and output paths cannot be the same, got \'folder\'
|
|
69
|
-
|
|
70
|
-
\t\t\t> upscale("stouputils", "stouputils/output.jpg", 2)
|
|
71
|
-
\t\t\tTraceback (most recent call last):
|
|
72
|
-
\t\t\t\t...
|
|
73
|
-
\t\t\tAssertionError: If input is a directory, output must be a directory too, got \'stouputils/output.jpg\'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
\t\t\t> upscale("input.jpg", "output.jpg", 2)
|
|
77
|
-
\t\t\t> # The input.jpg will be upscaled to output.jpg with a ratio of 2
|
|
78
|
-
|
|
79
|
-
\t\t\t> upscale("input_folder", "output_folder", 2)
|
|
80
|
-
\t\t\t> # The input_folder will be upscaled to output_folder with a ratio of 2
|
|
81
|
-
\t'''
|
|
82
|
-
def upscale_images(images: list[str], output_folder: str, upscale_ratio: int, desc: str = 'Upscaling images') -> None:
|
|
83
|
-
""" Upscale multiple images from a list.
|
|
84
|
-
|
|
85
|
-
\tArgs:
|
|
86
|
-
\t\timages (list[str]): List of paths to the images to upscale.
|
|
87
|
-
\t\toutput_folder (str): Path to the output folder where the upscaled images will be saved.
|
|
88
|
-
\t\tupscale_ratio (int): Upscaling ratio.
|
|
89
|
-
\t\tdesc (str): Description of the function execution displayed in the progress bar.
|
|
90
|
-
\t\t\tNo progress bar will be displayed if desc is empty.
|
|
91
|
-
|
|
92
|
-
\tReturns:
|
|
93
|
-
\t\tNone: This function doesn't return anything.
|
|
94
|
-
\t"""
|
|
95
|
-
def upscale_folder(input_folder: str, output_folder: str, upscale_ratio: int, slightly_faster_mode: bool = True, desc: str = 'Upscaling folder') -> None:
|
|
96
|
-
""" Upscale all images in a folder.
|
|
97
|
-
|
|
98
|
-
\tArgs:
|
|
99
|
-
\t\tinput_folder (str): Path to the input folder containing the images to upscale.
|
|
100
|
-
\t\toutput_folder (str): Path to the output folder where the upscaled images will be saved.
|
|
101
|
-
\t\tupscale_ratio (int): Upscaling ratio.
|
|
102
|
-
\t\tslightly_faster_mode (bool): Whether to use the slightly faster mode (no progress bar),
|
|
103
|
-
\t\t\tone call to the upscaler executable.
|
|
104
|
-
\t\tdesc (str): Description of the function execution displayed in the progress bar.
|
|
105
|
-
\t\t\tNo progress bar will be displayed if desc is empty.
|
|
106
|
-
|
|
107
|
-
\tReturns:
|
|
108
|
-
\t\tNone: This function doesn't return anything.
|
|
109
|
-
\t"""
|