Skip to content

fix(utils): handle newer schema response format in summary#667

Merged
luisremis merged 16 commits into
developfrom
fix/619-utils-summary-error
May 20, 2026
Merged

fix(utils): handle newer schema response format in summary#667
luisremis merged 16 commits into
developfrom
fix/619-utils-summary-error

Conversation

@ad-claw000
Copy link
Copy Markdown
Contributor

Closes #619

Newer versions of ApertureDB return connection classes as a nested dictionary of connections in the GetSchema response, rather than as a list or a flat object. This updates Utils.summary() to properly normalize the connections object so that it iterates successfully over the returned structure.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread aperturedb/Utils.py Outdated
Comment thread aperturedb/Utils.py Outdated
@ad-claw000 ad-claw000 force-pushed the fix/619-utils-summary-error branch from ef4051f to 753daae Compare May 4, 2026 09:33
@ad-claw000 ad-claw000 force-pushed the fix/619-utils-summary-error branch from f20d042 to e3404b7 Compare May 19, 2026 02:38
@ad-claw000 ad-claw000 requested a review from luisremis May 19, 2026 04:08
@luisremis luisremis requested a review from Copilot May 19, 2026 20:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 4 changed files in this pull request and generated 3 comments.

Comment thread aperturedb/Utils.py Outdated
Comment thread aperturedb/Utils.py Outdated
Comment thread aperturedb/Utils.py Outdated
@ad-claw000 ad-claw000 force-pushed the fix/619-utils-summary-error branch from 3c2bffc to 991dbe2 Compare May 20, 2026 01:07
Copy link
Copy Markdown
Contributor Author

@ad-claw000 ad-claw000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the review comments by normalizing the schema structure in a new _normalize_class_data method and updating the summary and visualize_schema code.

Copy link
Copy Markdown
Contributor Author

@ad-claw000 ad-claw000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied autopep8 formatting to the new log messages to fix the pre-commit CI failure.

Copilot AI review requested due to automatic review settings May 20, 2026 08:06
Copy link
Copy Markdown
Contributor Author

@ad-claw000 ad-claw000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.

Comment thread test/test_Images.py Outdated
@luisremis
Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Co-authored-by: luisremis <9687635+luisremis@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 19:31
@ad-claw000 ad-claw000 review requested due to automatic review settings May 20, 2026 19:31
Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

@copilot resolve the merge conflicts in this pull request

Resolved by merging origin/develop into this branch and fixing the conflict in test/test_Images.py; pushed in commit e8c7a4b.

@luisremis luisremis merged commit 83ad122 into develop May 20, 2026
2 of 3 checks passed
@luisremis luisremis deleted the fix/619-utils-summary-error branch May 20, 2026 23:53
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.

Utils.summary seems to fail with newer versions of ApertureDB

4 participants