Skip to content

Add JSON round-trip test for TupleTimeSeries serialization#592

Merged
luke-kiernan merged 1 commit into
IS4from
test/tuple-time-series-serialization-568
Jul 1, 2026
Merged

Add JSON round-trip test for TupleTimeSeries serialization#592
luke-kiernan merged 1 commit into
IS4from
test/tuple-time-series-serialization-568

Conversation

@luke-kiernan

Copy link
Copy Markdown
Contributor

Summary

Resolves #568 — adds a serialization round-trip test for the new TupleTimeSeries type.

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: the NamedTuple field names ride on PARAMETERS_KEY as a JSON array of strings, and must survive a JSON.jsonJSON.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 NamedTuple type, 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

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

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.85%. Comparing base (04aa9fc) to head (fd99539).
⚠️ Report is 1 commits behind head on IS4.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              IS4     #592   +/-   ##
=======================================
  Coverage   83.85%   83.85%           
=======================================
  Files          73       73           
  Lines        6301     6301           
=======================================
  Hits         5284     5284           
  Misses       1017     1017           
Flag Coverage Δ
unittests 83.85% <ø> (ø)

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

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@luke-kiernan
luke-kiernan merged commit c2d818f into IS4 Jul 1, 2026
7 of 10 checks passed
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.

3 participants