errors
errors ¤
Custom warnings and exceptions for ts-shape.
Follows the pandas/scikit-learn pattern:
- warnings.warn() for user-facing feedback (visible by default).
- logging for internal diagnostics (silent unless configured).
Users can filter specific categories, e.g.::
import warnings
from ts_shape.errors import PerformanceWarning
warnings.filterwarnings("ignore", category=PerformanceWarning)
TsShapeWarning ¤
Bases: UserWarning
Base warning for all ts-shape warnings.
PerformanceWarning ¤
Bases: TsShapeWarning
Warn when an operation may be slow due to data size or shape.
DataQualityWarning ¤
Bases: TsShapeWarning
Warn about potential data quality issues (gaps, duplicates, NaNs).
LoaderConfigWarning ¤
Bases: TsShapeWarning
Warn when a loader returns no data, likely due to misconfiguration.
ColumnNotFoundError ¤
Bases: ValueError
Raised when a required column is missing from the DataFrame.
Subclasses ValueError so existing except ValueError handlers keep
working, while callers that want to react specifically to a missing
column can catch this narrower type.
LoaderError ¤
Bases: Exception
Raised when a loader cannot read from its configured source.
Covers misconfiguration (missing path, absent credentials) and I/O that fails after the configured number of retries. Callers can catch this single type regardless of the underlying backend (local, S3, Azure, database).