Lukabura/epd 2131 allow dataset attributes to be renamed python sdk update#384
Open
lukabura-ab wants to merge 3 commits intomainfrom
Open
Conversation
304d37b to
892bc99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow dataset attributes to be renamed
Greptile Summary
This PR implements functionality to allow dataset attributes to be renamed across the Autoblocks Python SDK. The changes introduce several key capabilities:
Dataset Update Functionality: A new
update_datasetmethod has been added to the datasets client, allowing users to modify dataset names and schema properties after creation. This method includes comprehensive validation to prevent duplicate property names and follows existing patterns for schema processing.Human Review API Expansion: The human review module has been significantly expanded with new models and endpoints for test cases and comparison pairs. New models include
JobTestCase,TestCaseResult,OutputField,PairItem,Pair, andPairDetail, along with utility functions for text manipulation and item normalization.API Model Refactoring: The codebase has undergone a refactoring from complex
AutoblocksTestCaseResult*models to streamlinedHumanReviewPair*models. This simplification removes nested structures like input/output field types, comments, and grades in favor of a cleaner pair-based comparison approach focused on output fields.Validation Infrastructure: New validation utilities have been added, including
validate_unique_property_nameswhich ensures schema property names remain unique when renaming operations occur. This validation is exposed through the public API and integrated into both create and update operations.Public API Updates: Multiple modules have been updated to expose new functionality through their public interfaces, including datasets utils, human review models, and API models. All changes follow the established pattern of re-exporting implementation details from the
_implfolder.The changes integrate well with the existing codebase architecture, maintaining backward compatibility through deprecation warnings while introducing cleaner, more focused APIs for dataset manipulation and human review workflows.
Confidence score: 4/5
autoblocks/_impl/datasets/client.pyandautoblocks/_impl/api/client.pyfor the core dataset update and human review refactoring logic