Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends InfrastructureSystems’ JSON serialization/deserialization support to correctly handle Vector{Base.UUID} fields (needed for downstream PSY monitored components use cases), and adds a focused round-trip test to prevent regressions.
Changes:
- Add a
deserialize(::Type{Vector{Base.UUID}}, ::AbstractVector)method to convertVector{Dict}→Vector{Base.UUID}during struct deserialization. - Add a new testset validating UUID vector serialization/deserialization, including a JSON round-trip to mimic on-disk format.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/serialization.jl |
Adds a specialized deserializer for Vector{Base.UUID} so vector UUID fields don’t remain as Vector{Dict} after deserialization. |
test/test_serialization.jl |
Adds coverage for UUID vector round-tripping through IS.serialize/IS.deserialize and JSON3 encoding/decoding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
==========================================
+ Coverage 77.81% 78.91% +1.09%
==========================================
Files 75 75
Lines 6734 6643 -91
==========================================
+ Hits 5240 5242 +2
+ Misses 1494 1401 -93
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
This is needed for the PR in PSY for monitored components Sienna-Platform/PowerSystems.jl#1672