pysiral.core.legacy_classes =========================== .. py:module:: pysiral.core.legacy_classes .. autoapi-nested-parse:: This module provides access to deprecated legacy classes and functions that are still used in some parts of the codebase. These classes and functions are maintained for backward compatibility but should not be used in new development. Attributes ---------- .. autoapisummary:: pysiral.core.legacy_classes.__author__ Classes ------- .. autoapisummary:: pysiral.core.legacy_classes.AttrDict pysiral.core.legacy_classes.ErrorStatus pysiral.core.legacy_classes.DefaultLoggingClass Module Contents --------------- .. py:data:: __author__ :value: 'Stefan Hendricks ' .. py:class:: AttrDict(dict=None, /, **kwargs) Bases: :py:obj:`collections.UserDict` Short implementation of attrdict.AttrDict using UserDict. The code is based on the solutions shared here https://stackoverflow.com/a/76231823 and has been modified to allow nested AttrDict instances. .. py:method:: __getattr__(key) .. py:method:: __setattr__(key, value) .. py:class:: ErrorStatus(caller_id='') Bases: :py:obj:`object` .. py:attribute:: caller_id :value: '' .. py:attribute:: status :value: False .. py:attribute:: codes :value: [] .. py:attribute:: messages :value: [] .. py:method:: add_error(code, message) Add an error. Error code and messages are arbitrary .. py:method:: raise_on_error() print error messages and exit program on existing error(s) .. py:method:: get_all_messages() .. py:method:: reset() Remove all error messages and set to clean status .. py:property:: message .. py:class:: DefaultLoggingClass(cls_name=None) Bases: :py:obj:`object` Template for default pysiral class with logging/error handling capabilities .. py:attribute:: error .. py:attribute:: log