-
Notifications
You must be signed in to change notification settings - Fork 11
Remove PyPlot from ModiaMath installation #11
Description
There are the following problems:
-
Pkg.add("ModiaMath") fails with the JuliaCIBot of the Julia package registry (METADATA) because errors occur when "PyPlot" is installed by JuliaCIBot, see Tag ModiaMath.jl v0.2.1 #16719. Manual intervention of the Julia team is needed to still accept a release (because the CL of Julia fails and the Travis CL of the ModiaMath github repository has to be inspected). This is bad, because such a manual procedure is then also needed for Modia and Modia3D (because they depend on ModiaMath).
-
The Travis CL of ModiaMath required some "tweaking" in the
.travis.yml
script to explicitely install PyPlot. -
It is also not nice, that potential users must first install PyPlot correctly, before they can run a simulation example (even, if they just would like to try ModiaMath out, without taking the large burden to install PyPlot).
-
Most of the time of the Travis CL (about 10-15 min. from 20 min) is spent to install PyPlot. Getting feedback of a failed Travis CL would be much quicker if PyPlot would not be installed. This holds probably for every reasonable plot package (e.g. Makie), because they have a huge functionality and installing all of this takes time.
The issues above could be fixed if the result plotting would by default have the plot package "NoPlot" (so the command "ModiaMath.plot(..)" would just give an info message that no plot package has yet been selected for ModiaMath) but no error would occur. Once the user has installed PyPlot, ModiaMath.plot(..) would plot with PyPlot (in the future optionally also with Makie; currently, I cannot use Makie, because it does no install on Windows; opened a ticket).
The implementation could be performed in a similar way as in Plots by using the @require macro from package Requires.jl that makes functionality only available if the defined package was loaded outside of the package.
Help and suggestions are welcome (@HildingElmqvist, @tshort, @ChrisRackauckas).
P.S. The goal would be to release a new version of ModiaMath with the feature above, before further versions of Modia and Modia3D are registered in METADATA of Julia.