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
39 stars 20 forks source link

changing error to warning for consistency #219

Closed claytonpbarrows closed 3 years ago

claytonpbarrows commented 3 years ago

This PR makes the behavior of set_component! consistent when it fails to find any component specified with a concrete type or with an abstract type by issuing a warning in both cases. Previously if set_component! was given an abstract type and failed to find a match, it would issue a warning, and if it was given a concrete type it would throw an error. Additionally, this makes it easier to have a time series metadata file with entries for components that don't exist in a system.

codecov[bot] commented 3 years ago

Codecov Report

Merging #219 (54cd688) into master (4611338) will decrease coverage by 0.04%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
- Coverage   74.89%   74.85%   -0.05%     
==========================================
  Files          42       42              
  Lines        3019     3018       -1     
==========================================
- Hits         2261     2259       -2     
- Misses        758      759       +1     
Flag Coverage Δ
unittests 74.85% <0.00%> (-0.05%) :arrow_down:

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

Impacted Files Coverage Δ
src/system_data.jl 87.79% <0.00%> (ø)
src/utils/utils.jl 60.33% <0.00%> (-0.43%) :arrow_down:
src/utils/lazy_dict_from_iterator.jl 96.15% <0.00%> (-0.15%) :arrow_down: