NREL-Sienna / InfrastructureSystems.jl

Utility package for Sienna's simulation infrastructure
https://nrel-sienna.github.io/InfrastructureSystems.jl/
BSD 3-Clause "New" or "Revised" License
38 stars 20 forks source link

Don't serialize an empty time series file #248

Closed daniel-thom closed 3 years ago

daniel-thom commented 3 years ago

Fixes https://github.com/NREL-SIIP/PowerSystems.jl/issues/791

This does not require any changes from PowerSystems. However, if user1 serializes a system with no time series with this version of InfrastructureSystems and then shares that system with user2 who has not upgraded, deserialization will fail.

codecov[bot] commented 3 years ago

Codecov Report

Merging #248 (12474b7) into master (1879ffa) will increase coverage by 0.06%. The diff coverage is 95.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   76.35%   76.42%   +0.06%     
==========================================
  Files          43       43              
  Lines        3155     3164       +9     
==========================================
+ Hits         2409     2418       +9     
  Misses        746      746              
Flag Coverage Δ
unittests 76.42% <95.00%> (+0.06%) :arrow_up:

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

Impacted Files Coverage Δ
src/time_series_storage.jl 77.77% <ø> (ø)
src/system_data.jl 86.55% <93.33%> (+0.28%) :arrow_up:
src/hdf5_time_series_storage.jl 93.59% <100.00%> (+0.07%) :arrow_up:
src/in_memory_time_series_storage.jl 72.64% <100.00%> (+0.26%) :arrow_up:
src/utils/lazy_dict_from_iterator.jl 96.15% <0.00%> (-0.15%) :arrow_down: