aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/DataFeatures.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index 66eaba1..1bb1329 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -26,6 +26,7 @@ import sys
import threading
import time
from typing import Self
+from functools import wraps
import cv2
import matplotlib.patches as mpatches
@@ -687,8 +688,7 @@ class TimestampedImages(TimestampedObjectsList):
def PipelineStepExecutionTime(method):
"""Define a decorator use to assess pipeline step execution time and frequency."""
- logging.debug("@PipelineStepExecutionTime: assessing %s method execution time and frequency", method.__name__)
-
+ @wraps(method)
def wrapper(self, *args, **kwargs):
start = time.perf_counter()
@@ -721,6 +721,7 @@ def PipelineStepExecutionTime(method):
def PipelineStepInit(method):
"""Define a decorator use into PipelineStepObject class to wrap pipeline step __init__ method."""
+ @wraps(method)
def wrapper(self, **kwargs):
"""Wrap pipeline __init__ init method to update PipelineStepObject attributes with arguments after init call.
@@ -744,6 +745,7 @@ def PipelineStepInit(method):
def PipelineStepEnter(method):
"""Define a decorator use into PipelineStepObject class to wrap pipeline step __enter__ method."""
+ @wraps(method)
def wrapper(self):
"""Wrap pipeline step __enter__ method to call super, observers and children __enter__ method."""
@@ -761,6 +763,7 @@ def PipelineStepEnter(method):
def PipelineStepExit(method):
"""Define a decorator use into PipelineStepObject class to wrap pipeline step __exit__ method."""
+ @wraps(method)
def wrapper(self, *args):
"""Wrap pipeline step __exit__ method to call super, observers and children __exit__ method."""
@@ -776,6 +779,7 @@ def PipelineStepExit(method):
def PipelineStepAttributeSetter(method):
"""Define a decorator use into PipelineStepObject class to wrap pipeline step attribute setter."""
+ @wraps(method)
def wrapper(self, new_value, unwrap: bool = False):
"""Wrap pipeline step attribute setter to load attribute from file.
@@ -856,8 +860,7 @@ def PipelineStepAttributeSetter(method):
def PipelineStepMethod(method):
"""Define a decorator use into PipelineStepObject class to declare pipeline method."""
- logging.debug("@PipelineStepMethod: %s method notify observers and timestamped exceptions", method.__name__)
-
+ @wraps(method)
def wrapper(self, *args, timestamp: int | float = None, unwrap: bool = False, **kwargs):
"""Wrap pipeline step method to notify observers and timestamped exceptions.
@@ -918,6 +921,7 @@ def PipelineStepMethod(method):
def PipelineStepImage(method):
"""Define a decorator use into PipelineStepObject class to wrap pipeline step image method."""
+ @wraps(method)
def wrapper(self, **kwargs) -> numpy.array:
"""Wrap pipeline step image method."""
@@ -947,6 +951,7 @@ def PipelineStepImage(method):
def PipelineStepDraw(method):
"""Define a decorator use into PipelineStepObject class to wrap pipeline step draw method."""
+ @wraps(method)
def wrapper(self, image: numpy.array, **kwargs):
"""Wrap pipeline step draw method."""