Closed daniel-thom closed 3 years ago
Merging #149 into pre-10 will increase coverage by
1.90%
. The diff coverage is86.30%
.
@@ Coverage Diff @@
## pre-10 #149 +/- ##
==========================================
+ Coverage 64.71% 66.61% +1.90%
==========================================
Files 42 45 +3
Lines 2267 2408 +141
==========================================
+ Hits 1467 1604 +137
- Misses 800 804 +4
Impacted Files | Coverage Δ | |
---|---|---|
src/InfrastructureSystems.jl | 66.66% <ø> (ø) |
|
src/abstract_time_series.jl | 75.00% <0.00%> (-25.00%) |
:arrow_down: |
src/generated/Deterministic.jl | 61.53% <ø> (ø) |
|
src/generated/DeterministicMetadata.jl | 57.14% <ø> (+11.68%) |
:arrow_up: |
src/generated/ProbabilisticMetadata.jl | 45.83% <ø> (ø) |
|
src/generated/ScenariosMetadata.jl | 0.00% <ø> (ø) |
|
src/time_series_utils.jl | 100.00% <ø> (ø) |
|
src/utils/utils.jl | 52.40% <0.00%> (+5.03%) |
:arrow_up: |
src/generated/DeterministicSingleTimeSeries.jl | 7.69% <7.69%> (ø) |
|
src/generated/SingleTimeSeriesMetadata.jl | 66.66% <75.00%> (+8.77%) |
:arrow_up: |
... and 19 more |
After testing the workflow the following found these problems:
IS.transform_single_time_series!
: Here is the stack trace: [1] _get_time_series_path(::HDF5.HDF5Group, ::Base.UUID) at /Users/jdlara/.julia/dev/InfrastructureSystems/src/hdf5_time_series_storage.jl:404
[2] (::InfrastructureSystems.var"#94#95"{InfrastructureSystems.Hdf5TimeSeriesStorage,Base.UUID,Base.UUID,String})(::HDF5.HDF5File) at /Users/jdlara/.julia/dev/InfrastructureSystems/src/hdf5_time_series_storage.jl:250
[3] h5open(::InfrastructureSystems.var"#94#95"{InfrastructureSystems.Hdf5TimeSeriesStorage,Base.UUID,Base.UUID,String}, ::String, ::Vararg{String,N} where N; swmr::Bool) at /Users/jdlara/.julia/packages/HDF5/T1b9x/src/HDF5.jl:696
[4] h5open at /Users/jdlara/.julia/packages/HDF5/T1b9x/src/HDF5.jl:694 [inlined]
[5] remove_time_series! at /Users/jdlara/.julia/dev/InfrastructureSystems/src/hdf5_time_series_storage.jl:248 [inlined]
[6] clear_time_series_storage!(::VariableReserve{ReserveUp}) at /Users/jdlara/.julia/dev/InfrastructureSystems/src/component.jl:625
[7] prepare_for_removal!(::VariableReserve{ReserveUp}) at /Users/jdlara/.julia/dev/InfrastructureSystems/src/component.jl:478
[8] _remove_component!(::Type{VariableReserve{ReserveUp}}, ::InfrastructureSystems.Components, ::String) at /Users/jdlara/.julia/dev/InfrastructureSystems/src/components.jl:143
[9] remove_component! at /Users/jdlara/.julia/dev/InfrastructureSystems/src/components.jl:110 [inlined]
[10] remove_component! at /Users/jdlara/.julia/dev/InfrastructureSystems/src/system_data.jl:293 [inlined]
[11] remove_component!(::System, ::VariableReserve{ReserveUp}) at /Users/jdlara/.julia/dev/PowerSystems/src/base.jl:537
[12] top-level scope at /Users/jdlara/Dropbox/Code/nrel-experiments/data_conversion_test.jl:63
[13] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
[14] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./essentials.jl:710
[15] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:709
[16] inlineeval(::Module, ::String, ::Int64, ::Int64, ::String; softscope::Bool) at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/eval.jl:83
[17] (::VSCodeServer.var"#43#45"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool})() at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/eval.jl:45
[18] withpath(::VSCodeServer.var"#43#45"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool}, ::String) at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/repl.jl:118
[19] (::VSCodeServer.var"#42#44"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool,Bool})() at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/eval.jl:43
[20] hideprompt(::VSCodeServer.var"#42#44"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool,Bool}) at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/repl.jl:36
[21] repl_runcode_request(::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint,Base.PipeEndpoint}, ::VSCodeServer.ReplRunCodeRequestParams) at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/eval.jl:23
[22] dispatch_msg(::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint,Base.PipeEndpoint}, ::VSCodeServer.JSONRPC.MsgDispatcher, ::Dict{String,Any}) at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/JSONRPC/src/typed.jl:66
[23] macro expansion at /Users/jdlara/.vscode/extensions/julialang.language-julia-1.0.8/scripts/packages/VSCodeServer/src/VSCodeServer.jl:95 [inlined]
[24] (::VSCodeServer.var"#61#63"{Bool,String})() at ./task.jl:356
in expression starting at /Users/jdlara/Dropbox/Code/nrel-experiments/data_conversion_test.jl:58
For the following tests, I move the call to IS.transform_single_time_series!
after the modifications to the system
After testing the workflow the following found these problems:
Thanks. I fixed it.
Additions:
transform_single_time_series
will allow all SingleTimeSeries instances to be retrieved as DeterministicSingleTimeSeries.get_time_series_array|values|timestamp
support an existing TimeSeriesData instance.Note that when
transform_single_time_series
causes additional metadata to get added to each component for the DeterministicSingleTimeSeries. You can still retrieve the original SingleTimeSeries instance. If you ever want to revert the changes then you would have to delete the DeterministicSingleTimeSeries instances one-by-one withremove_time_series!
. That could be automated in the future if users need it.