Skip to content

Commit

Permalink
Moved from utils to core_utils (deprecate)
Browse files Browse the repository at this point in the history
  • Loading branch information
glrs committed Oct 7, 2024
1 parent 64977dc commit 3e335ca
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@

from abc import ABC, abstractmethod
import warnings
from abc import ABC, abstractmethod


class DestinyInterface(ABC):
"""
DestinyInterface serves as an abstract base for different 'destiny' strategies in the Yggdrasil application.
It defines the interface for processing documents, where each destiny encapsulates a unique pathway
or processing logic, akin to the diverse fates woven by the Norns under Yggdrasil.
"""

def __init__(self):
warnings.warn("DestinyInterface is deprecated and will be removed in future releases, use RealmTemplate instead.", DeprecationWarning)
warnings.warn(
"DestinyInterface is deprecated and will be removed in future releases, use RealmTemplate instead.",
DeprecationWarning,
)

@abstractmethod
def process(self, doc):
"""
Process a document according to the specific destiny (strategy). This method needs to be implemented
Process a document according to the specific destiny (strategy). This method needs to be implemented
by each concrete destiny class, defining how each document's journey unfolds.
:param doc: The document to be processed.
Expand Down

0 comments on commit 3e335ca

Please sign in to comment.