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

Refactor/base node simplification #186

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

srijanpatel
Copy link
Collaborator

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.

@rajeev
Copy link
Contributor

rajeev commented Mar 4, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants