Skip to content

Debugging OnionSmoothInsight.load_from_json()#135

Merged
matteobecchi merged 2 commits intoGMPavanLab:mainfrom
matteobecchi:devel
Nov 24, 2025
Merged

Debugging OnionSmoothInsight.load_from_json()#135
matteobecchi merged 2 commits intoGMPavanLab:mainfrom
matteobecchi:devel

Conversation

@matteobecchi
Copy link
Copy Markdown
Collaborator

@matteobecchi matteobecchi commented Nov 21, 2025

Related Issues: #134
Requested Reviewers: @SimoneMartino98 @andrewtarzia

The OnionInsight.state_list attribute is converted to dict when dumped to JSON, and then not converted back when loaded from JSON. Issues has been solved.

The data type (StateUni or StateMulti) is inferred and each element of the state_list is converted back to the original format. In this way, the OnionInsight methods work correctly even when the object is loaded from JSON file.

@matteobecchi matteobecchi changed the title Debugging OnionSmothInsight.load_from_json() Debugging OnionSmothInsight.load_from_json() Nov 21, 2025
@matteobecchi matteobecchi self-assigned this Nov 21, 2025
@matteobecchi matteobecchi changed the title Debugging OnionSmothInsight.load_from_json() Debugging OnionSmoothInsight.load_from_json() Nov 21, 2025
@matteobecchi matteobecchi marked this pull request as ready for review November 21, 2025 09:35
Copy link
Copy Markdown
Collaborator

@andrewtarzia andrewtarzia left a comment

Choose a reason for hiding this comment

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

LGTM

@matteobecchi matteobecchi linked an issue Nov 21, 2025 that may be closed by this pull request
@matteobecchi matteobecchi merged commit 4ea9466 into GMPavanLab:main Nov 24, 2025
11 checks passed
@matteobecchi matteobecchi deleted the devel branch November 24, 2025 09:16
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.

Onion state_list not has wrong format when loaded from JSON

3 participants