/ Processing / src / precompile.jl
precompile.jl
 1  using .Lang: PrecompileTools, @preset, @precomp
 2  
 3  @preset let
 4      using Data: Data as da
 5      path = joinpath(@__DIR__, "../../PlanarDev/test/stubs/ohlcv.jls")
 6      df = read(path) |> da.todata
 7      @precomp begin
 8          resample(df, tf"1d")
 9          normalize!([1.0, 2, 3]; unit=true)
10          normalize!([1.0, 2, 3]; unit=false)
11          trail!(df, timeframe(df); to=(lastdate(df) + tf"1m" * 3))
12          cleanup_ohlcv_data(df, timeframe(df))
13          isincomplete(dt"2020-01-01", tf"1m")
14          islast("2020-01-01", "1d")
15          islast(da.default_value(Candle), tf"1d")
16          isadjacent(dt"2020-01-02", dt"2020-01-01", tf"1d")
17      end
18  end