diff --git a/examples/XBT_transect.jl b/examples/XBT_transect.jl index b7e3058..239ca6a 100644 --- a/examples/XBT_transect.jl +++ b/examples/XBT_transect.jl @@ -1,5 +1,5 @@ ### A Pluto.jl notebook ### -# v0.20.3 +# v0.20.4 using Markdown using InteractiveUtils diff --git a/src/files_XBT.jl b/src/files_XBT.jl index fa92e91..4b35fa9 100644 --- a/src/files_XBT.jl +++ b/src/files_XBT.jl @@ -325,9 +325,15 @@ end ### -function download_all_AOML(path="XBT_AOML") +""" + download_all_AOML(;path="XBT_AOML",quick_test=false) + +Download XBT data files from AOML site. +""" +function download_all_AOML(;path="XBT_AOML",quick_test=false) !ispath(path) ? mkdir(path) : nothing lst_AOML=query(XBTtransect,"AOML") + lst_AOML=(quick_test ? lst_AOML[1:2] : nothing) for transect in lst_AOML lst_AOML_files=DataFrame("transect"=>String[],"cruise"=>Int[],"file"=>String[]) println(transect) diff --git a/test/runtests.jl b/test/runtests.jl index eac2cc8..9448d19 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -134,4 +134,12 @@ using Test xbt=read(XBTtransect(),source="AOML",transect="AX08",cr=1) fig=plot(xbt) @test isa(fig,Figure) + + ## + + path0=tempname() + mkdir(path0) + XBT.download_all_AOML(path=path0,quick_test=true) + @test isfile(joinpath(path0,"list_AX01.csv")) + end