-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
feat: add dump and dumps methods to Graph #3202
Conversation
Pull Request Validation ReportThis comment is automatically generated by Conventional PR Whitelist Report
Result Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated. Validation Report
Result Pull request satisfies all enabled pull request rules. Last Modified at 05 Aug 24 19:01 UTC |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
…for Edge dictionaries
…tries in types list for improved type management
…d validation logic when checking data types
… enhance robustness against JSON decode errors
…_type alias for clarity and consistency in field definitions
…input/output methods for better component interaction
…pe safety and structure in vertex data handling
…hod for better data management and access
…nclude model_config attribute
- Consolidated imports and removed redundant `BaseModel` definitions for `SourceHandle` and `TargetHandle`. - Added `valid_handles`, `target_param`, and `_target_handle` attributes to `Edge` class. - Enhanced handle validation logic to distinguish between dictionary and string types. - Introduced `to_data` method to return edge data. - Updated attribute names to follow consistent naming conventions (`base_classes`, `input_types`, `field_name`).
…ge class - Renamed attributes to use snake_case consistently (`baseClasses` to `base_classes`, `inputTypes` to `input_types`, `fieldName` to `field_name`). - Added `to_data` method to return `_data` attribute. - Updated validation methods to use new attribute names.
…utes and improve validation logic for handles
…thods to NodeData for better type safety and clarity
…d `dump` methods, enhancing data export capabilities
…est structure for better clarity and organization
…ove test structure
a455337
to
46fec80
Compare
…e code and improve readability
… code clarity and maintainability
…rganization and maintainability in api_utils.py
…rganization and maintainability in prompt.py
… workflow - Introduced `async` variable in Makefile to conditionally run unit tests with or without parallel execution. - Updated `unit_tests` target in Makefile to handle `async` flag. - Modified GitHub Actions workflow to set `async=false` for unit tests.
This pull request includes several refactorings and enhancements to improve the handling of graph data in the codebase.
The commits in this pull request introduce pytest fixtures for memory_chatbot_graph tests and improve the test structure. They also implement JSON serialization for graph data, enhancing the data export capabilities. Additionally, the node argument type in the add_node and _create_vertex methods has been changed to NodeData for better type safety and clarity.
The Edge class has been updated to consistently use snake_case for attributes and improve validation logic for handles. Attribute naming has been standardized and a
to_data
method has been added to return the edge data. The Edge class has also been refactored to improve handle validation and data handling. Consolidated imports, removed redundant BaseModel definitions, and introduced new attributes to the Edge class.TypedDict classes have been added for graph schema serialization, including NodeData and Position for improved type safety and structure in vertex data handling. The vertex constructors have been refactored to use NodeData and input/output methods have been added for better component interaction.
Other changes include improvements to model_config formatting, retry logic for loading starter projects to enhance robustness against JSON decode errors, and enhanced validation logic when checking data types. The Output class has been streamlined to prevent duplicate entries in the types list for improved type management. Finally, an escape_json_dump function has been added to escape JSON strings for Edge dictionaries.
Overall, these changes enhance the codebase by improving test structure, serialization capabilities, type safety, data handling, and validation logic.