From b1139d860fefe200c54fbb5c657b7b309a82ce31 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Mon, 30 Nov 2020 08:00:32 +0100 Subject: [PATCH] use the new NetCDF_jll; require julia 1.3 (#123) * use the new NetCDF_jll; require julia 1.3 I wanted to give the new NetCDF_jll from JuliaPackaging/Yggdrasil#1090 a test run. Since this relies on Artifacts being available it needs julia 1.3 minimum and therefore a minor version bump, to 0.11. https://github.com/JuliaBinaryWrappers/NetCDF_jll.jl Also see https://github.com/Alexander-Barth/NCDatasets.jl/pull/88 * update CI versions * update docs projects This adds NetCDF itself as a dependency, just like is done in PkgTemplates. That means Conda is still a dependency for now until we tag a new release. * add NetCDF_jll to deps * update Documenter to 0.25 With prettyurls set to false for local builds, such that you don't need to run a local server to click around. --- .travis.yml | 4 ++-- Project.toml | 13 +++++------ appveyor.yml | 2 +- deps/build.jl | 15 ------------- docs/Manifest.toml | 56 +++++++++++++++++++++++++++++++++------------- docs/Project.toml | 6 ++--- docs/make.jl | 8 +++++-- src/NetCDF.jl | 1 + src/netcdf_c.jl | 7 ------ 9 files changed, 57 insertions(+), 55 deletions(-) delete mode 100644 deps/build.jl diff --git a/.travis.yml b/.travis.yml index 66a88df..43932e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ os: - linux - osx julia: - - 1.2 - 1.3 + - 1 - nightly matrix: allow_failures: @@ -19,7 +19,7 @@ notifications: jobs: include: - stage: "Documentation" - julia: 1.3 + julia: 1 os: linux script: - julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); diff --git a/Project.toml b/Project.toml index da8bdfe..f72ddfb 100644 --- a/Project.toml +++ b/Project.toml @@ -3,21 +3,18 @@ uuid = "30363a11-5582-574a-97bb-aa9a979735b9" keywords = ["NetCDF", "IO"] license = "MIT" desc = "NetCDF file reading and writing" -version = "0.10.3" +version = "0.11.0" [deps] -BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee" -CondaBinDeps = "a9693cdc-2bc8-5703-a9cd-1da358117377" -Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0" -Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" +Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0" +NetCDF_jll = "7243133f-43d8-5620-bbf4-c2c921802cf3" [compat] -BinDeps = "1.0.1" -CondaBinDeps = "0.1.0, 0.2" DiskArrays = "0.2" Formatting = "0.3.2, 0.4" -julia = "1.2" +NetCDF_jll = "4.7.4" +julia = "1.3" [extras] Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" diff --git a/appveyor.yml b/appveyor.yml index 181557b..3a8eb5b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ environment: matrix: - - julia_version: 1.2 - julia_version: 1.3 + - julia_version: 1 - julia_version: nightly platform: diff --git a/deps/build.jl b/deps/build.jl deleted file mode 100644 index e2f5124..0000000 --- a/deps/build.jl +++ /dev/null @@ -1,15 +0,0 @@ -using BinDeps -import CondaBinDeps - -@BinDeps.setup -libnetcdf = library_dependency( - "libnetcdf", - aliases = ["libnetcdf4", "libnetcdf-7", "netcdf"], -) - -#CondaBinDeps.Conda.add_channel("conda-forge") -provides(CondaBinDeps.Manager, "libnetcdf", libnetcdf) -provides(AptGet, "libnetcdf-dev", libnetcdf, os = :Linux) -provides(Yum, "netcdf-devel", libnetcdf, os = :Linux) - -@BinDeps.install Dict(:libnetcdf => :libnetcdf) diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 8c7becd..50b8116 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -5,15 +5,15 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[BinDeps]] deps = ["Libdl", "Pkg", "SHA", "URIParser", "Unicode"] -git-tree-sha1 = "66158ad56b4bf6cc8413b37d0b7bc52402682764" +git-tree-sha1 = "1289b57e8cf019aede076edab0587eb9644175bd" uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee" -version = "1.0.0" +version = "1.0.2" [[Conda]] deps = ["JSON", "VersionParsing"] -git-tree-sha1 = "9a11d428dcdc425072af4aea19ab1e8c3e01c032" +git-tree-sha1 = "c0647249d785f1d5139c0cc96db8f6b32f7ec416" uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.3.0" +version = "1.5.0" [[CondaBinDeps]] deps = ["BinDeps", "Conda"] @@ -25,21 +25,26 @@ version = "0.2.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[DiskArrays]] +git-tree-sha1 = "b7e455ed02dd16dcb5f1069c9427cf537046fb8a" +uuid = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3" +version = "0.2.6" + [[Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[DocStringExtensions]] deps = ["LibGit2", "Markdown", "Pkg", "Test"] -git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a" +git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.1" +version = "0.8.3" [[Documenter]] -deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Unicode"] -git-tree-sha1 = "580155ffaeb175f37dc0bd31ed6c127663efbc60" +deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] +git-tree-sha1 = "a4875e0763112d6d017126f3944f4133abb342ae" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.22.6" +version = "0.25.5" [[Formatting]] deps = ["Printf"] @@ -47,17 +52,24 @@ git-tree-sha1 = "a0c901c29c0e7c763342751c0a94211d56c0de5c" uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" version = "0.4.1" +[[IOCapture]] +deps = ["Logging"] +git-tree-sha1 = "377252859f740c217b936cebcd918a44f9b53b59" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.1.1" + [[InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[JSON]] -deps = ["Dates", "Distributed", "Mmap", "Sockets", "Test", "Unicode"] -git-tree-sha1 = "1f7a25b53ec67f5e9422f1f551ee216503f4a0fa" +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.20.0" +version = "0.21.1" [[LibGit2]] +deps = ["Printf"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" [[Libdl]] @@ -73,8 +85,20 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +[[NetCDF]] +deps = ["BinDeps", "CondaBinDeps", "DiskArrays", "Formatting", "Libdl"] +git-tree-sha1 = "dda7b49694d15d7d1a1ba1d7c2a9142777028bd5" +uuid = "30363a11-5582-574a-97bb-aa9a979735b9" +version = "0.10.3" + +[[Parsers]] +deps = ["Dates"] +git-tree-sha1 = "b417be52e8be24e916e34b3d70ec2da7bdf56a68" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "1.0.12" + [[Pkg]] -deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] +deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [[Printf]] @@ -103,10 +127,10 @@ deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[URIParser]] -deps = ["Test", "Unicode"] -git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69" +deps = ["Unicode"] +git-tree-sha1 = "53a9f49546b8d2dd2e688d216421d050c9a31d0d" uuid = "30578b45-9adc-5946-b283-645ec420af67" -version = "0.4.0" +version = "0.4.1" [[UUIDs]] deps = ["Random", "SHA"] diff --git a/docs/Project.toml b/docs/Project.toml index 904e26d..ab9a631 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,8 +1,6 @@ [deps] -BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee" -CondaBinDeps = "a9693cdc-2bc8-5703-a9cd-1da358117377" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0" +NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9" [compat] -Documenter = "~0.22" +Documenter = "0.25" diff --git a/docs/make.jl b/docs/make.jl index e15b6e3..68442c7 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -2,7 +2,11 @@ using Documenter, NetCDF makedocs( modules = [NetCDF], - format = Documenter.HTML(), + format = Documenter.HTML(; + prettyurls = get(ENV, "CI", "false") == "true", + canonical = "https://juliageo.github.io/NetCDF.jl", + assets = String[], + ), sitename = "NetCDF.jl", authors = "Fabian Gans and contributors", pages = [ @@ -11,4 +15,4 @@ makedocs( ], ) -deploydocs(repo = "github.com/JuliaGeo/NetCDF.jl.git") +deploydocs(repo = "github.com/JuliaGeo/NetCDF.jl") diff --git a/src/NetCDF.jl b/src/NetCDF.jl index 0adb2b8..4198ef3 100644 --- a/src/NetCDF.jl +++ b/src/NetCDF.jl @@ -1,5 +1,6 @@ module NetCDF +using NetCDF_jll using Formatting using Base.Cartesian import DiskArrays: readblock!, writeblock!, AbstractDiskArray, eachchunk, GridChunks, diff --git a/src/netcdf_c.jl b/src/netcdf_c.jl index 3d2543c..a85ca05 100644 --- a/src/netcdf_c.jl +++ b/src/netcdf_c.jl @@ -1,12 +1,5 @@ # This file is based on automatically generated code from gen/wrap.jl -const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") -if isfile(depfile) - include(depfile) -else - error("libnetcdf not properly installed. Please run Pkg.build(\"NetCDF\")") -end - const NC_NAT = 0 const NC_BYTE = 1 const NC_CHAR = 2