diff --git a/Project.toml b/Project.toml index 87f0be3..f65df0a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NeutralLandscapes" uuid = "71847384-8354-4223-ac08-659a5128069f" authors = ["Timothée Poisot ", "Michael Krabbe Borregaard ", "Michael David Catchen ", "Rafael Schouten ", "Virgile Baudrot "] -version = "0.1.4" +version = "0.1.5" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" @@ -10,16 +10,14 @@ HaltonSequences = "13907d55-377f-55d6-a9d6-25ac19e11b95" NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -Requires = "ae029012-a4dd-5104-9daa-d747884805df" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" [compat] DataStructures = "0.18" +Distributions = "0.25" +HaltonSequences = "0.2" NaNMath = "0.3, 1.0" NearestNeighbors = "0.4" StatsBase = "0.3, 0.34" julia = "1.9" -HaltonSequences = "0.2" -Distributions = "0.25" -Requires = "1.3" diff --git a/src/NeutralLandscapes.jl b/src/NeutralLandscapes.jl index 8b66e1e..7d890af 100644 --- a/src/NeutralLandscapes.jl +++ b/src/NeutralLandscapes.jl @@ -55,11 +55,6 @@ export SpatiotemporallyAutocorrelatedUpdater export rate, variability export normalize -using Requires -function __init__() - @require SpeciesDistributionToolkit="72b53823-5c0b-4575-ad0e-8e97227ad13b" include(joinpath("integrations", "simplesdmlayers.jl")) -end - end # module diff --git a/src/integrations/simplesdmlayers.jl b/src/integrations/simplesdmlayers.jl deleted file mode 100644 index 378c196..0000000 --- a/src/integrations/simplesdmlayers.jl +++ /dev/null @@ -1,14 +0,0 @@ -@info "Loading NeutralLandscapes support for SimpleSDMLayers.jl..." - -""" - NeutralLandscapes.mask!(array::AbstractArray{<:Float64}, masklayer::T) where {T<:SimpleSDMLayers.SimpleSDMLayer} - -Masks an `array` by the values of `nothing` in `masklayer`, where `masklayer` is -a `SimpleSDMLayer` - -""" -function NeutralLandscapes.mask!(array::AbstractArray{<:Float64}, masklayer::T) where {T<:SpeciesDistributionToolkit.SimpleSDMLayers.SimpleSDMLayer} - I = findall(isnothing, masklayer.grid) - array[I] .= NaN - return array -end diff --git a/test/Project.toml b/test/Project.toml index 04348f3..4e8527a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,4 +1,3 @@ [deps] SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" -SpeciesDistributionToolkit = "72b53823-5c0b-4575-ad0e-8e97227ad13b" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/integrations.jl b/test/integrations.jl deleted file mode 100644 index 6a4c9b7..0000000 --- a/test/integrations.jl +++ /dev/null @@ -1,10 +0,0 @@ -using NeutralLandscapes -using Test -using SpeciesDistributionToolkit - - -bbox = (left=-83.0, bottom=46.4, right=-55.2, top=63.7) -temp = SimpleSDMPredictor(RasterData(WorldClim2, AverageTemperature); bbox...) - -mpd = rand(MidpointDisplacement(), size(temp), mask=temp) -@test findall(isnan, mpd) == findall(isnothing, temp.grid) diff --git a/test/runtests.jl b/test/runtests.jl index 2da45d1..dcabf80 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,5 +2,4 @@ using Test, SafeTestsets @time @safetestset "updaters" begin include("updaters.jl") end @time @safetestset "planar gradient" begin include("planar.jl") end -@time @safetestset "integrations" begin include("integrations.jl") end @time @safetestset "rand" begin include("rand.jl") end