pysiral.core.legacy_classes

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

__author__

Classes

AttrDict

Short implementation of attrdict.AttrDict using UserDict. The code is based on the solutions shared here

ErrorStatus

DefaultLoggingClass

Template for default pysiral class with logging/error handling capabilities

Module Contents

pysiral.core.legacy_classes.__author__ = 'Stefan Hendricks <stefan.hendricks@awi.de>'
class pysiral.core.legacy_classes.AttrDict(dict=None, /, **kwargs)

Bases: 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.

__getattr__(key)
__setattr__(key, value)
class pysiral.core.legacy_classes.ErrorStatus(caller_id='')

Bases: object

caller_id = ''
status = False
codes = []
messages = []
add_error(code, message)

Add an error. Error code and messages are arbitrary

raise_on_error()

print error messages and exit program on existing error(s)

get_all_messages()
reset()

Remove all error messages and set to clean status

property message
class pysiral.core.legacy_classes.DefaultLoggingClass(cls_name=None)

Bases: object

Template for default pysiral class with logging/error handling capabilities

error
log