Skip to content

Commit

Permalink
extend code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelforget committed Jan 15, 2025
1 parent 5bf2474 commit 97af4ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/XBT_transect.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### A Pluto.jl notebook ###
# v0.20.3
# v0.20.4

using Markdown
using InteractiveUtils
Expand Down
8 changes: 7 additions & 1 deletion src/files_XBT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 97af4ab

Please sign in to comment.