JuliaDataReaders / DataReaders.jl

A Julia library to get remote data via Requests.jl and get DataFrame (from DataFrames.jl) or TimeArray (from TimeSeries.jl)
MIT License
10 stars 7 forks source link

Remove TimeSeriesIO dependency #23

Open femtotrader opened 7 years ago

femtotrader commented 7 years ago

https://github.com/femtotrader/TimeSeriesIO.jl/issues/19

Most of data/table like could be output using https://github.com/davidanthoff/IterableTables.jl

TimeSeriesIO dependency can be removed in favor of IterableTables.jl which support several different data structures.

Require may also (or not) be considered https://discourse.julialang.org/t/optional-dependencies-requires-jl/3294/5

Pankaj-Baranwal commented 6 years ago

I have started working on this issue. Here is my approach: google/daily.jl contains a function TimeArray. I will replace it with IterableTables' TimeSeries.jl

Is this okay?

scls19fr commented 6 years ago

Several approaches are possible.

using directly TimeArray from TimeSeries will involve to add TimeSeries.jl as a dependency.

For now TimeSeries is currently required by DataReaders.jl https://github.com/JuliaDataReaders/DataReaders.jl/blob/d618e5da546942a339904e70c64419c88eaa8506/REQUIRE#L6 but it's probably not a good idea... because such an approach won't work if we want to add support for several kind of datastructures (IndexedTables, Temporal TS...) as this package will have too much dependencies.

I think it's better to require IterableTables than TimeSeries

For datastructures that are not supported currently by IterableTables (NamedArrays for example), using Requires.jl will be necessary to have optional dependencies.

But you can try both approach and see pros and cons.

I'm really open about implementation but I would prefer not to have too much dependencies.