Skip to content
This repository was archived by the owner on Mar 27, 2022. It is now read-only.
This repository was archived by the owner on Mar 27, 2022. It is now read-only.

Remove PyPlot from ModiaMath installation #11

@MartinOtter

Description

@MartinOtter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions