fix(utils): handle newer schema response format in summary#667
Conversation
Release 0.4.56
Release 0.4.57
Release 0.4.58
There was a problem hiding this comment.
Pull request overview
This PR updates Utils.summary() to tolerate newer GetSchema response shapes where connections["classes"][<class>] may be returned as a nested dictionary rather than strictly a single dict or a list, preventing iteration/type errors when summarizing connection classes.
Changes:
- Normalizes per-connection-class schema entries into an iterable list before calling
_object_summary. - Adds inline documentation describing the supported connection schema shapes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ef4051f to
753daae
Compare
f20d042 to
e3404b7
Compare
Closes #619. Newer versions of ApertureDB can return connections in the schema as a dictionary of connections rather than a direct object or list. This normalizes the object to a list before iterating over it in .
3c2bffc to
991dbe2
Compare
ad-claw000
left a comment
There was a problem hiding this comment.
Addressed the review comments by normalizing the schema structure in a new _normalize_class_data method and updating the summary and visualize_schema code.
ad-claw000
left a comment
There was a problem hiding this comment.
Applied autopep8 formatting to the new log messages to fix the pre-commit CI failure.
ad-claw000
left a comment
There was a problem hiding this comment.
Addressed all three points in commit 4aca1b2: extracted _normalize_class_data to normalize connections data in both summary() and visualize_schema(), removed # autopep8: off/on pragmas, and added a robust mock-based test suite for summary() with nested connections.
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: luisremis <9687635+luisremis@users.noreply.github.com>
Resolved by merging |
Closes #619
Newer versions of ApertureDB return connection classes as a nested dictionary of connections in the
GetSchemaresponse, rather than as a list or a flat object. This updatesUtils.summary()to properly normalize theconnectionsobject so that it iterates successfully over the returned structure.