pyspur icon indicating copy to clipboard operation
pyspur copied to clipboard

Refactor/base node simplification

Open srijanpatel opened this issue 9 months ago • 1 comments

This pull request introduces several changes to the workflow_executor.py file in the backend/pyspur/execution directory. The primary focus of these changes is to refactor the code to use BaseModel from pydantic instead of custom types, and to improve code readability and maintainability.

Refactoring to use BaseModel:

  • Replaced BaseNodeOutput with BaseModel throughout the file, including in function signatures and type hints. [1] [2] [3] [4] [5] [6] [7] [8]

Code readability improvements:

  • Moved import statements to group related imports together and added TypeVar for type safety.
  • Simplified docstrings by removing unnecessary newlines and making them more concise. [1] [2] [3] [4]
  • Added type annotations for variables and function return types to improve code clarity. [1] [2]

These changes enhance the overall structure and maintainability of the workflow_executor.py file while ensuring type safety and consistency in the codebase.

srijanpatel avatar Mar 04 '25 01:03 srijanpatel

wow this is a major change … looks like a lot of interface breakage

rajeev avatar Mar 04 '25 15:03 rajeev