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

Remove some dependencies in Project.toml?

Open frapac opened this issue 5 years ago • 5 comments

Looking at the file Project.toml, it occurs to me that we might want to reduce the dependencies of HydroPowerModels.jl.

For instance, do we need Ipopt.jl, Weave.jl, Cairo.jl or GR.jl in Project.toml? By looking at the code in the module, it seems that we only need PowerModels.jl, JuMP.jl, GLPK.jl and SDDP.jl as main dependencies. Maybe we could move the other packages in [extras] for testing purposes?

Furthermore, do you think we could add Plots.jl as an optional dependency (for instance by exporting the plotting functions only if Plots.jl is already installed)? When deporting some computations in a cluster, we might want to load only the minimal set of packages IMO.

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

frapac avatar Jul 15 '19 20:07 frapac

Good Point! Although, I must admit I'm not having much luck with the building of the weave reports in the documentation when I remove those visualization packages. Does anyone have a suggestion on how to organize the project tomls of the package? @Thuener @odow @joaquimg

andrewrosemberg avatar Jul 16 '19 15:07 andrewrosemberg

You can add the solvers just for the tests, e.g., https://github.com/odow/SDDP.jl/blob/0490bea2c46787e1d4d63a5491ea0106c7fe70cf/Project.toml#L24-L30

I haven't tried optional dependencies.

odow avatar Jul 16 '19 15:07 odow

You can add the solvers just for the tests, e.g., https://github.com/odow/SDDP.jl/blob/0490bea2c46787e1d4d63a5491ea0106c7fe70cf/Project.toml#L24-L30

I haven't tried optional dependencies.

Even if I run them also for the documentation?

andrewrosemberg avatar Jul 16 '19 16:07 andrewrosemberg

Could the vizualization packages simply be testing dependencies first? Later on we try to set them as optional.

joaquimg avatar Jul 16 '19 17:07 joaquimg

Fixed test packages to extra in 3916f4afcefb6f367a08b79303f096dde2390aae . Although, it seams that, since the visualization functions are inside the module, I'm not able to move them to extra. The only other package outside the scope of the module is Weave, but some how the target to "docs" folder is not being successful : https://travis-ci.com/andrewrosemberg/HydroPowerModels.jl/builds/119367814

andrewrosemberg avatar Jul 16 '19 20:07 andrewrosemberg