Appointat commented on code in PR #737:
URL: https://github.com/apache/geaflow/pull/737#discussion_r2796539001


##########
geaflow-ai/src/operator/casts/casts/core/interfaces.py:
##########
@@ -0,0 +1,195 @@
+"""Core interfaces and abstractions for CASTS system.
+
+This module defines the key abstractions that enable dependency injection
+and adherence to SOLID principles, especially Dependency Inversion Principle 
(DIP).
+"""
+
+from abc import ABC, abstractmethod
+from typing import Any, Protocol
+
+import numpy as np
+
+
+class GoalGenerator(ABC):
+    """Abstract interface for generating traversal goals based on graph 
schema."""
+
+    @property
+    @abstractmethod
+    def goal_texts(self) -> list[str]:
+        """Get list of available goal descriptions."""
+        pass
+
+    @property
+    @abstractmethod
+    def goal_weights(self) -> list[int]:

Review Comment:
   Agree. Weights can be fractional, so I’ve updated the interface to 
list[float] and aligned implementations. Int weights still work since they’re 
valid floats.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to