Skip to content

add new serialization and test#580

Open
jd-lara wants to merge 2 commits intomainfrom
jd/add_vector_uuid_serialization
Open

add new serialization and test#580
jd-lara wants to merge 2 commits intomainfrom
jd/add_vector_uuid_serialization

Conversation

@jd-lara
Copy link
Copy Markdown
Member

@jd-lara jd-lara commented May 4, 2026

This is needed for the PR in PSY for monitored components Sienna-Platform/PowerSystems.jl#1672

Copy link
Copy Markdown

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 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 convert Vector{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
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.91%. Comparing base (4c9a97f) to head (9876c66).

Files with missing lines Patch % Lines
src/serialization.jl 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 78.91% <50.00%> (+1.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/serialization.jl 73.22% <50.00%> (+0.42%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants