Skip to content

Commit 3c8e143

Browse files
committed
Use Downloads.download
1 parent 39fbc9d commit 3c8e143

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/AO.jl

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
module AO
22

33
using DataDeps # For storage location of data
4+
using Downloads
45

56
function fallback_download(remotepath, localdir)
67
@assert(isdir(localdir))
78
filename = basename(remotepath) # only works for URLs with filename as last part of name
89
localpath = joinpath(localdir, filename)
9-
Base.download(remotepath, localpath)
10+
Downloads.download(remotepath, localpath)
1011
return localpath
1112
end
1213

@@ -48,14 +49,14 @@ function download_and_unpack()
4849
4950
(in shell mode) to check its contents.
5051
51-
Please check with Seth John ([email protected]) for references
52+
Please check with Seth John ([email protected]) for references
5253
to cite if you use the other data contained in the AO files,
5354
e.g., GEOTRACES, WOA, Weber and John, and so on.
5455
55-
Also note that downloading files like this from GitHub is
56-
probably not very robust. However, some of the data files in
56+
Also note that downloading files like this from GitHub is
57+
probably not very robust. However, some of the data files in
5758
the AO repository do not exist anywhere else officially,
58-
therefore this seems like the best solution at this stage.
59+
therefore this seems like the best solution at this stage.
5960
PRs welcome to improve this!
6061
"""
6162
return AO_path

src/GroundWaters.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ using OceanGrids
44
using Unitful
55
using Unitful: m, yr
66
using DataDeps # For storage location of data
7+
using Downloads
78
using Shapefile
89
using DataFrames
910
import OceanGrids: regrid
@@ -18,7 +19,7 @@ function fallback_download(remotepath, localdir)
1819
@assert(isdir(localdir))
1920
filename = basename(remotepath) # only works for URLs with filename as last part of name
2021
localpath = joinpath(localdir, filename)
21-
Base.download(remotepath, localpath)
22+
Downloads.download(remotepath, localpath)
2223
return localpath
2324
end
2425

0 commit comments

Comments
 (0)