probsys / AutoGP.jl

Automated Bayesian model discovery for time series data
https://probsys.github.io/AutoGP.jl/
Apache License 2.0
61 stars 5 forks source link

Lighter dependencies? #2

Closed nilshg closed 1 year ago

nilshg commented 1 year ago

Is there a reason why this package has to have such a heavy dependency list? It pulls in CSV, DataFrames, IJulia and PyPlot, which I would think aren't really necessary if I as a user wanted to e.g. get some data from an arrow file, store it in a NamedTuple, and plot it using UnicodePlots in the REPL?

fsaad commented 1 year ago

Only DataFrames is strictly required to use the pubic API, because forecasts, probabilities, etc. are returned as DataFrame objects.

CSV, IJulia, and PyPlot are extra dependencies that required to run the tutorials and the command-line script online.jl, and thus technically optional for the main library.

I am not aware of how to specify optional or extra requirements in Julia. In Python, for example, we could use pip install AutoGP (for the main library) and pip install AutoGP[extras] (for the additional features). Let me know if you have suggestions.

nilshg commented 1 year ago

There's generally a tendency in Julia to rely on the Tables.jl interface and not require a specific tables package. In this case, returned objects could be NamedTuples of vectors, which is the simplest kind of table (and turns into a DataFrame by simply doing DataFrame(mynamedtuple) if the user desires).

Package extensions are a new feature of Julia 1.9, see: https://docs.julialang.org/en/v1.9/manual/code-loading/#man-extensions

fsaad commented 1 year ago

Thank you for the suggestions. Feel free to make a PR and I would be glad to merge it in.

fsaad commented 1 year ago

The Python-dependent package dependencies---IJulia and PyPlot---have been removed. CSV and DataFrames are standard Julia packages and should not be too problematic.