HydroPowerModels.jl icon indicating copy to clipboard operation
HydroPowerModels.jl copied to clipboard

Improve accuracy of unit-testing

Open frapac opened this issue 5 years ago • 1 comments

At first sight, the code coverage seems very low (25%), but you did a lot of appreciable efforts to test correctly HydroPowerModels.jl. Investigating it further with codecov, it occurs that most files are perfectly tested, except:

  • IO.jl (75%)
  • utilities.jl ( 43%)
  • and visualize_data.jl (0%)

The code coverage is low because of this last file. Do you think it could be relevant to move it a separate folder, dedicated to the plotting utilities (as src/visualization in the package SDDP.jl)?

Another question is: why are only the deterministic examples tested in runtests.jl? I would appreciate having a testing procedure that tests stochastic and non-linear examples as well. My opinion is that running a non-linear version of SDDP is one of the key ideas in HydroPowerModels.jl, and you might want to put more emphasis on it.

X-ref https://github.com/JuliaCon/proceedings-review/issues/35

frapac avatar Jul 15 '19 20:07 frapac

The code coverage is low because of this last file. Do you think it could be relevant to move it a separate folder, dedicated to the plotting utilities (as src/visualization in the package SDDP.jl)?

Yes this is a good suggestion! Added in 250becbcb589eb0b2bf3ac71b6797bb714ca4ec1 .

I would appreciate having a testing procedure that tests stochastic and non-linear examples as well. My opinion is that running a non-linear version of SDDP is one of the key ideas in HydroPowerModels.jl, and you might want to put more emphasis on it.

Case 3 is a small but stochastic case. Just added a SOC stochastic case in 250becbcb589eb0b2bf3ac71b6797bb714ca4ec1.

andrewrosemberg avatar Jul 15 '19 22:07 andrewrosemberg