stouputils 1.18.2__tar.gz → 1.18.4__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.18.2 → stouputils-1.18.4}/PKG-INFO +1 -1
- {stouputils-1.18.2 → stouputils-1.18.4}/pyproject.toml +1 -1
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/decorators.py +35 -11
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/decorators.pyi +7 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/print.py +17 -16
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/print.pyi +8 -8
- {stouputils-1.18.2 → stouputils-1.18.4}/README.md +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/__main__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/_deprecated.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/_deprecated.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/all_doctests.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/all_doctests.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/automatic_docs.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/automatic_docs.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/config.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/config.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/image.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/image.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/video.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/applications/upscaler/video.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/archive.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/archive.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/backup.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/backup.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/collections.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/collections.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/cd_utils.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/cd_utils.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/github.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/github.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/pypi.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/pypi.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/pyproject.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/pyproject.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/stubs.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/continuous_delivery/stubs.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/ctx.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/ctx.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/config/get.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/config/set.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/auto_contrast.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/axis_flip.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/bias_field_correction.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/binary_threshold.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/blur.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/brightness.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/canny.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/clahe.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/common.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/contrast.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/denoise.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/histogram_equalization.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/invert.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/laplacian.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/median_blur.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/noise.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/normalize.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/random_erase.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/resize.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/rotation.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/salt_pepper.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/sharpening.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/shearing.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/threshold.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/translation.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/zoom.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image_augmentation.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image_preprocess.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/prosthesis_detection.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/technique.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/dataset.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/dataset_loader.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/grouping_strategy.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/image_loader.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/xy_tuple.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/metric_dictionnary.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/metric_utils.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/mlflow_utils.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/abstract_model.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/all.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/base_keras.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/all.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/convnext.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/densenet.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/efficientnet.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/mobilenet.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/resnet.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/squeezenet.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/vgg.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/xception.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/callbacks/model_checkpoint_v2.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/losses/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/visualizations.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/model_interface.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/sandbox.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/range_tuple.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/scripts/augment_dataset.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/scripts/exhaustive_process.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/scripts/routine.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/utils.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/image.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/image.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/common.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/common.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/downloader.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/downloader.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/linux.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/linux.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/main.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/main.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/windows.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/installer/windows.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/io.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/io.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/base.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/base.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/queue.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/queue.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/re_entrant.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/re_entrant.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/redis_fifo.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/redis_fifo.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/shared.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/lock/shared.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/__init__.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/__init__.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/capturer.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/capturer.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/common.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/common.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/multi.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/multi.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/subprocess.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/parallel/subprocess.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/py.typed +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/typing.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/typing.pyi +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/version_pkg.py +0 -0
- {stouputils-1.18.2 → stouputils-1.18.4}/stouputils/version_pkg.pyi +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: stouputils
|
|
3
|
-
Version: 1.18.
|
|
3
|
+
Version: 1.18.4
|
|
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
|
|
@@ -8,7 +8,7 @@ module-root = ""
|
|
|
8
8
|
|
|
9
9
|
[project]
|
|
10
10
|
name = "stouputils"
|
|
11
|
-
version = "1.18.
|
|
11
|
+
version = "1.18.4"
|
|
12
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
13
|
readme = "README.md"
|
|
14
14
|
keywords = ["utilities", "tools", "helpers", "development", "python"]
|
|
@@ -76,7 +76,7 @@ def measure_time(
|
|
|
76
76
|
def wrapper(*args: tuple[Any, ...], **kwargs: dict[str, Any]) -> Any:
|
|
77
77
|
with MeasureTime(print_func=printer, message=new_msg, perf_counter=perf_counter):
|
|
78
78
|
return func(*args, **kwargs)
|
|
79
|
-
wrapper
|
|
79
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.measure_time", func))
|
|
80
80
|
return wrapper
|
|
81
81
|
|
|
82
82
|
# Handle both @measure_time and @measure_time(printer=..., message=..., perf_counter=..., is_generator=...)
|
|
@@ -160,7 +160,7 @@ def handle_error(
|
|
|
160
160
|
# Sleep for the specified time, only if the error_log is not ERROR_TRACEBACK (because it's blocking)
|
|
161
161
|
if sleep_time > 0.0 and error_log != LogLevels.ERROR_TRACEBACK:
|
|
162
162
|
time.sleep(sleep_time)
|
|
163
|
-
wrapper
|
|
163
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.handle_error", func))
|
|
164
164
|
return wrapper
|
|
165
165
|
|
|
166
166
|
# Handle both @handle_error and @handle_error(exceptions=..., message=..., error_log=...)
|
|
@@ -277,7 +277,7 @@ def timeout(
|
|
|
277
277
|
if result_container:
|
|
278
278
|
return result_container[0]
|
|
279
279
|
|
|
280
|
-
wrapper
|
|
280
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.timeout", func))
|
|
281
281
|
return wrapper
|
|
282
282
|
|
|
283
283
|
# Handle both @timeout and @timeout(seconds=..., message=...)
|
|
@@ -352,7 +352,7 @@ def retry(
|
|
|
352
352
|
time.sleep(current_delay)
|
|
353
353
|
current_delay *= backoff
|
|
354
354
|
|
|
355
|
-
wrapper
|
|
355
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.retry", func))
|
|
356
356
|
return wrapper
|
|
357
357
|
|
|
358
358
|
# Handle both @retry and @retry(exceptions=..., max_attempts=..., delay=...)
|
|
@@ -427,7 +427,7 @@ def simple_cache(
|
|
|
427
427
|
return result
|
|
428
428
|
|
|
429
429
|
# Return the wrapper
|
|
430
|
-
wrapper
|
|
430
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.simple_cache", func))
|
|
431
431
|
return wrapper
|
|
432
432
|
|
|
433
433
|
# Handle both @simple_cache and @simple_cache(method=...)
|
|
@@ -477,10 +477,10 @@ def abstract(
|
|
|
477
477
|
|
|
478
478
|
@wraps(func)
|
|
479
479
|
@handle_error(exceptions=NotImplementedError, error_log=error_log)
|
|
480
|
-
def
|
|
480
|
+
def not_implemented_error(*args: tuple[Any, ...], **kwargs: dict[str, Any]) -> Any:
|
|
481
481
|
raise NotImplementedError(message)
|
|
482
|
-
|
|
483
|
-
return
|
|
482
|
+
_set_wrapper_name(not_implemented_error, _get_wrapper_name("stouputils.decorators.abstract", func))
|
|
483
|
+
return not_implemented_error
|
|
484
484
|
|
|
485
485
|
# Handle both @abstract and @abstract(error_log=...)
|
|
486
486
|
if func is None:
|
|
@@ -541,7 +541,7 @@ def deprecated(
|
|
|
541
541
|
|
|
542
542
|
# Call the original function
|
|
543
543
|
return func(*args, **kwargs)
|
|
544
|
-
wrapper
|
|
544
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.deprecated", func))
|
|
545
545
|
return wrapper
|
|
546
546
|
|
|
547
547
|
# Handle both @deprecated and @deprecated(message=..., error_log=...)
|
|
@@ -582,7 +582,7 @@ def silent(
|
|
|
582
582
|
# Use Muffle context manager to silence output
|
|
583
583
|
with Muffle(mute_stderr=mute_stderr):
|
|
584
584
|
return func(*args, **kwargs)
|
|
585
|
-
wrapper
|
|
585
|
+
_set_wrapper_name(wrapper, _get_wrapper_name("stouputils.decorators.silent", func))
|
|
586
586
|
return wrapper
|
|
587
587
|
|
|
588
588
|
# Handle both @silent and @silent(mute_stderr=...)
|
|
@@ -613,7 +613,31 @@ def _get_wrapper_name(decorator_name: str, func: Callable[..., Any]) -> str:
|
|
|
613
613
|
|
|
614
614
|
# Remove "stouputils.decorators.*" prefix if present
|
|
615
615
|
if func_name.startswith("stouputils.decorators."):
|
|
616
|
-
func_name =
|
|
616
|
+
func_name = func_name.split(".", 2)[-1]
|
|
617
617
|
|
|
618
618
|
return f"{decorator_name}@{func_name}"
|
|
619
619
|
|
|
620
|
+
|
|
621
|
+
def _set_wrapper_name(wrapper: Callable[..., Any], name: str) -> None:
|
|
622
|
+
""" Set the wrapper function's visible name, qualname and code object name for clearer tracebacks.
|
|
623
|
+
|
|
624
|
+
Args:
|
|
625
|
+
wrapper (Callable[..., Any]): Wrapper function to update
|
|
626
|
+
name (str): New name to set
|
|
627
|
+
"""
|
|
628
|
+
# __name__ affects repr and some introspection
|
|
629
|
+
wrapper.__name__ = name
|
|
630
|
+
|
|
631
|
+
# __qualname__ helps when using nested scopes and in some introspection tools
|
|
632
|
+
try:
|
|
633
|
+
wrapper.__qualname__ = name
|
|
634
|
+
except Exception:
|
|
635
|
+
pass
|
|
636
|
+
|
|
637
|
+
# Update the code object's co_name so tracebacks show the new name
|
|
638
|
+
try:
|
|
639
|
+
wrapper.__code__ = wrapper.__code__.replace(co_name=name)
|
|
640
|
+
except Exception:
|
|
641
|
+
# If code.replace isn't available, ignore silently
|
|
642
|
+
pass
|
|
643
|
+
|
|
@@ -250,3 +250,10 @@ def _get_wrapper_name(decorator_name: str, func: Callable[..., Any]) -> str:
|
|
|
250
250
|
\tReturns:
|
|
251
251
|
\t\tstr: Combined name for the wrapper function (e.g., "stouputils.decorators.handle_error@function_name")
|
|
252
252
|
\t'''
|
|
253
|
+
def _set_wrapper_name(wrapper: Callable[..., Any], name: str) -> None:
|
|
254
|
+
""" Set the wrapper function's visible name, qualname and code object name for clearer tracebacks.
|
|
255
|
+
|
|
256
|
+
\tArgs:
|
|
257
|
+
\t\twrapper\t(Callable[..., Any]):\tWrapper function to update
|
|
258
|
+
\t\tname\t(str):\t\t\t\t\tNew name to set
|
|
259
|
+
\t"""
|
|
@@ -328,39 +328,39 @@ def info(
|
|
|
328
328
|
else:
|
|
329
329
|
print(message, *values, RESET, file=file, **print_kwargs)
|
|
330
330
|
|
|
331
|
-
def debug(*values: Any, **print_kwargs: Any) -> None:
|
|
331
|
+
def debug(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
332
332
|
""" Print a debug message looking like "[DEBUG HH:MM:SS] message" in cyan by default. """
|
|
333
333
|
if "text" not in print_kwargs:
|
|
334
334
|
print_kwargs["text"] = "DEBUG"
|
|
335
335
|
if "color" not in print_kwargs:
|
|
336
336
|
print_kwargs["color"] = CYAN
|
|
337
|
-
info(*values, **print_kwargs)
|
|
337
|
+
info(*values, flush=flush, **print_kwargs)
|
|
338
338
|
|
|
339
|
-
def alt_debug(*values: Any, **print_kwargs: Any) -> None:
|
|
339
|
+
def alt_debug(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
340
340
|
""" Print a debug message looking like "[DEBUG HH:MM:SS] message" in blue by default. """
|
|
341
341
|
if "text" not in print_kwargs:
|
|
342
342
|
print_kwargs["text"] = "DEBUG"
|
|
343
343
|
if "color" not in print_kwargs:
|
|
344
344
|
print_kwargs["color"] = BLUE
|
|
345
|
-
info(*values, **print_kwargs)
|
|
345
|
+
info(*values, flush=flush, **print_kwargs)
|
|
346
346
|
|
|
347
|
-
def suggestion(*values: Any, **print_kwargs: Any) -> None:
|
|
347
|
+
def suggestion(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
348
348
|
""" Print a suggestion message looking like "[SUGGESTION HH:MM:SS] message" in cyan by default. """
|
|
349
349
|
if "text" not in print_kwargs:
|
|
350
350
|
print_kwargs["text"] = "SUGGESTION"
|
|
351
351
|
if "color" not in print_kwargs:
|
|
352
352
|
print_kwargs["color"] = CYAN
|
|
353
|
-
info(*values, **print_kwargs)
|
|
353
|
+
info(*values, flush=flush, **print_kwargs)
|
|
354
354
|
|
|
355
|
-
def progress(*values: Any, **print_kwargs: Any) -> None:
|
|
355
|
+
def progress(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
356
356
|
""" Print a progress message looking like "[PROGRESS HH:MM:SS] message" in magenta by default. """
|
|
357
357
|
if "text" not in print_kwargs:
|
|
358
358
|
print_kwargs["text"] = "PROGRESS"
|
|
359
359
|
if "color" not in print_kwargs:
|
|
360
360
|
print_kwargs["color"] = MAGENTA
|
|
361
|
-
info(*values, **print_kwargs)
|
|
361
|
+
info(*values, flush=flush, **print_kwargs)
|
|
362
362
|
|
|
363
|
-
def warning(*values: Any, **print_kwargs: Any) -> None:
|
|
363
|
+
def warning(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
364
364
|
""" Print a warning message looking like "[WARNING HH:MM:SS] message" in yellow by default and in sys.stderr. """
|
|
365
365
|
if "file" not in print_kwargs:
|
|
366
366
|
print_kwargs["file"] = sys.stderr
|
|
@@ -368,9 +368,9 @@ def warning(*values: Any, **print_kwargs: Any) -> None:
|
|
|
368
368
|
print_kwargs["text"] = "WARNING"
|
|
369
369
|
if "color" not in print_kwargs:
|
|
370
370
|
print_kwargs["color"] = YELLOW
|
|
371
|
-
info(*values, **print_kwargs)
|
|
371
|
+
info(*values, flush=flush, **print_kwargs)
|
|
372
372
|
|
|
373
|
-
def error(*values: Any, exit: bool = False, **print_kwargs: Any) -> None:
|
|
373
|
+
def error(*values: Any, exit: bool = False, flush: bool = True, **print_kwargs: Any) -> None:
|
|
374
374
|
""" Print an error message (in sys.stderr and in red by default)
|
|
375
375
|
and optionally ask the user to continue or stop the program.
|
|
376
376
|
|
|
@@ -390,7 +390,7 @@ def error(*values: Any, exit: bool = False, **print_kwargs: Any) -> None:
|
|
|
390
390
|
print_kwargs["text"] = "ERROR"
|
|
391
391
|
if "color" not in print_kwargs:
|
|
392
392
|
print_kwargs["color"] = RED
|
|
393
|
-
info(*values, **print_kwargs)
|
|
393
|
+
info(*values, flush=flush, **print_kwargs)
|
|
394
394
|
if exit:
|
|
395
395
|
try:
|
|
396
396
|
print("Press enter to ignore error and continue, or 'CTRL+C' to stop the program... ", file=file)
|
|
@@ -402,6 +402,7 @@ def error(*values: Any, exit: bool = False, **print_kwargs: Any) -> None:
|
|
|
402
402
|
def whatisit(
|
|
403
403
|
*values: Any,
|
|
404
404
|
print_function: Callable[..., None] = debug,
|
|
405
|
+
flush: bool = True,
|
|
405
406
|
max_length: int = 250,
|
|
406
407
|
color: str = CYAN,
|
|
407
408
|
**print_kwargs: Any,
|
|
@@ -473,11 +474,11 @@ def whatisit(
|
|
|
473
474
|
|
|
474
475
|
# Print the values
|
|
475
476
|
if len(values) > 1:
|
|
476
|
-
print_function("".join(f"\n {_internal(value)}" for value in values), **print_kwargs)
|
|
477
|
+
print_function("".join(f"\n {_internal(value)}" for value in values), flush=flush, **print_kwargs)
|
|
477
478
|
elif len(values) == 1:
|
|
478
|
-
print_function(_internal(values[0]), **print_kwargs)
|
|
479
|
+
print_function(_internal(values[0]), flush=flush, **print_kwargs)
|
|
479
480
|
|
|
480
|
-
def breakpoint(*values: Any, print_function: Callable[..., None] = warning, **print_kwargs: Any) -> None:
|
|
481
|
+
def breakpoint(*values: Any, print_function: Callable[..., None] = warning, flush: bool = True, **print_kwargs: Any) -> None:
|
|
481
482
|
""" Breakpoint function, pause the program and print the values.
|
|
482
483
|
|
|
483
484
|
Args:
|
|
@@ -493,7 +494,7 @@ def breakpoint(*values: Any, print_function: Callable[..., None] = warning, **pr
|
|
|
493
494
|
file = cast(TextIO, print_kwargs["file"][0])
|
|
494
495
|
else:
|
|
495
496
|
file = print_kwargs["file"]
|
|
496
|
-
whatisit(*values, print_function=print_function, **print_kwargs)
|
|
497
|
+
whatisit(*values, print_function=print_function, flush=flush, **print_kwargs)
|
|
497
498
|
try:
|
|
498
499
|
input()
|
|
499
500
|
except (KeyboardInterrupt, EOFError):
|
|
@@ -125,17 +125,17 @@ def info(*values: Any, color: str = ..., text: str = 'INFO ', prefix: str = '',
|
|
|
125
125
|
\t\tuse_colored\t\t(bool):\t\t\t\t\tWhether to use the colored() function to format the message
|
|
126
126
|
\t\tprint_kwargs\t(dict):\t\t\t\t\tKeyword arguments to pass to the print function
|
|
127
127
|
\t'''
|
|
128
|
-
def debug(*values: Any, **print_kwargs: Any) -> None:
|
|
128
|
+
def debug(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
129
129
|
''' Print a debug message looking like "[DEBUG HH:MM:SS] message" in cyan by default. '''
|
|
130
|
-
def alt_debug(*values: Any, **print_kwargs: Any) -> None:
|
|
130
|
+
def alt_debug(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
131
131
|
''' Print a debug message looking like "[DEBUG HH:MM:SS] message" in blue by default. '''
|
|
132
|
-
def suggestion(*values: Any, **print_kwargs: Any) -> None:
|
|
132
|
+
def suggestion(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
133
133
|
''' Print a suggestion message looking like "[SUGGESTION HH:MM:SS] message" in cyan by default. '''
|
|
134
|
-
def progress(*values: Any, **print_kwargs: Any) -> None:
|
|
134
|
+
def progress(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
135
135
|
''' Print a progress message looking like "[PROGRESS HH:MM:SS] message" in magenta by default. '''
|
|
136
|
-
def warning(*values: Any, **print_kwargs: Any) -> None:
|
|
136
|
+
def warning(*values: Any, flush: bool = True, **print_kwargs: Any) -> None:
|
|
137
137
|
''' Print a warning message looking like "[WARNING HH:MM:SS] message" in yellow by default and in sys.stderr. '''
|
|
138
|
-
def error(*values: Any, exit: bool = False, **print_kwargs: Any) -> None:
|
|
138
|
+
def error(*values: Any, exit: bool = False, flush: bool = True, **print_kwargs: Any) -> None:
|
|
139
139
|
""" Print an error message (in sys.stderr and in red by default)
|
|
140
140
|
\tand optionally ask the user to continue or stop the program.
|
|
141
141
|
|
|
@@ -145,7 +145,7 @@ def error(*values: Any, exit: bool = False, **print_kwargs: Any) -> None:
|
|
|
145
145
|
\t\t\tfalse to ignore the error automatically and continue
|
|
146
146
|
\t\tprint_kwargs\t(dict):\t\tKeyword arguments to pass to the print function
|
|
147
147
|
\t"""
|
|
148
|
-
def whatisit(*values: Any, print_function: Callable[..., None] = ..., max_length: int = 250, color: str = ..., **print_kwargs: Any) -> None:
|
|
148
|
+
def whatisit(*values: Any, print_function: Callable[..., None] = ..., flush: bool = True, max_length: int = 250, color: str = ..., **print_kwargs: Any) -> None:
|
|
149
149
|
''' Print the type of each value and the value itself, with its id and length/shape.
|
|
150
150
|
|
|
151
151
|
\tThe output format is: "type, <id id_number>:\t(length/shape) value"
|
|
@@ -157,7 +157,7 @@ def whatisit(*values: Any, print_function: Callable[..., None] = ..., max_length
|
|
|
157
157
|
\t\tcolor\t\t\t(str):\t\tColor of the message (default: CYAN)
|
|
158
158
|
\t\tprint_kwargs\t(dict):\t\tKeyword arguments to pass to the print function
|
|
159
159
|
\t'''
|
|
160
|
-
def breakpoint(*values: Any, print_function: Callable[..., None] = ..., **print_kwargs: Any) -> None:
|
|
160
|
+
def breakpoint(*values: Any, print_function: Callable[..., None] = ..., flush: bool = True, **print_kwargs: Any) -> None:
|
|
161
161
|
""" Breakpoint function, pause the program and print the values.
|
|
162
162
|
|
|
163
163
|
\tArgs:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/axis_flip.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/blur.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/brightness.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/canny.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/clahe.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/common.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/contrast.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/denoise.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/invert.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/laplacian.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/median_blur.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/noise.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/normalize.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/resize.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/rotation.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/salt_pepper.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/sharpening.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/shearing.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/threshold.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/translation.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image/zoom.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/image_preprocess.py
RENAMED
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/data_processing/technique.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/dataset/grouping_strategy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras/efficientnet.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/models/keras_utils/visualizations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/scripts/exhaustive_process.py
RENAMED
|
File without changes
|
{stouputils-1.18.2 → stouputils-1.18.4}/stouputils/data_science/scripts/preprocess_dataset.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|