Add JSON round-trip test for TupleTimeSeries serialization#592
Merged
Conversation
Strengthens the TupleTimeSeries serialization round-trip coverage with a
true JSON-string round-trip for both arity-2 and arity-3 shapes. The
NamedTuple field names ride on PARAMETERS_KEY as a JSON array of strings;
round-tripping through JSON.json -> JSON.parse (dicttype Dict{String, Any})
mimics the on-disk format and verifies the concrete type, instance type,
underlying NamedTuple type, and time-series key survive the cycle.
Closes #568.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## IS4 #592 +/- ##
=======================================
Coverage 83.85% 83.85%
=======================================
Files 73 73
Lines 6301 6301
=======================================
Hits 5284 5284
Misses 1017 1017
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
daniel-thom
approved these changes
Jun 30, 2026
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.
Summary
Resolves #568 — adds a serialization round-trip test for the new
TupleTimeSeriestype.A basic in-memory round-trip test already existed (serialize/deserialize via
serialize_struct+get_type_from_serialization_data). This PR strengthens it with a true JSON-string round-trip for both arity-2 and arity-3 shapes, which is the actual risk the in-memory test didn't cover: theNamedTuplefield names ride onPARAMETERS_KEYas a JSON array of strings, and must survive aJSON.json→JSON.parse(...; dicttype = Dict{String, Any})cycle (which retypes the dict and downcasts strings) — mimicking the on-disk format.The new assertions verify the resolved concrete type, the deserialized instance type, the underlying
NamedTupletype, and the time-series key name/type all survive the cycle.Testing
run_tests("TupleTimeSeries")passes: 35 → 45 passing checks, no failures.Closes #568.
🤖 Generated with Claude Code