Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a base class for all nodes to ensure they share common methods and structure. #17

Closed
4 tasks
Tracked by #5
c0rtexR opened this issue Sep 15, 2024 · 0 comments
Closed
4 tasks
Tracked by #5
Labels

Comments

@c0rtexR
Copy link
Contributor

c0rtexR commented Sep 15, 2024

Subtask: Create a base class for all nodes to ensure they share common methods, structure, and input/output type and subtype handling.

Task Overview: Develop a base class that will define shared methods, properties, and robust type/subtype information for inputs and outputs, ensuring nodes can handle core types like bool, number, and string, with optional subtypes like JSON.

Specific 🎯:

  • Design a base class with core methods (execute(), validate(), toJSON()), and properties like id, type, inputs, and outputs.
  • Add input/output type definitions for core types such as bool, number, string, with support for subtypes such as JSON format.
  • Ensure the base class can be extended by other node types to implement specific logic while maintaining the shared structure and type handling.

Measurable 📏: Success will be measured by ensuring all node types can inherit from the base class, manage core types (bool, number, string) and subtypes (e.g., JSON), and override methods as needed. Unit tests will validate type consistency and format handling.

Achievable 🚀: This task is achievable by introducing clear type-checking mechanisms that ensure flexibility with both types and subtypes. The base class will include logic for handling various core types and formats without complicating the individual node implementations.

Relevant 🎯: A standardized base class with proper type and subtype handling is essential for workflows to support different data inputs and outputs seamlessly, such as JSON as a subtype while handling core types like number or bool.

Time-bound ⏳: This task should be completed within 3 days to ensure proper type handling is in place before the development of individual nodes.

Acceptance Criteria ✅:

  • The base class includes input/output type definitions for bool, number, and string, and supports subtypes like JSON.
  • Each node type inherits from the base class and overrides methods as needed.
  • Unit tests for type/subtype handling, inheritance, and method consistency pass.
  • Common properties like id, type, inputs, and outputs are defined in the base class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant