From b0050fc6906bcff956c16f8375959435b1994d9d Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Wed, 25 Sep 2024 01:29:47 -0400 Subject: [PATCH] change isGeoRegion to isgeo --- src/GeoRegions.jl | 2 +- src/georegions/is.jl | 4 ++-- src/georegions/remove.jl | 2 +- test/runtests.jl | 20 ++++++++++---------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/GeoRegions.jl b/src/GeoRegions.jl index 98c1510f..1dbda945 100644 --- a/src/GeoRegions.jl +++ b/src/GeoRegions.jl @@ -15,7 +15,7 @@ export GeoRegion, RectRegion, PolyRegion, TiltRegion, - ==, isGeoRegion, isID, + ==, isgeo, isID, add, rm, rmID, overwrite, setupGeoRegions, readGeoRegions, addGeoRegions, deleteGeoRegions, diff --git a/src/georegions/is.jl b/src/georegions/is.jl index 60fbf70d..8ce5957c 100644 --- a/src/georegions/is.jl +++ b/src/georegions/is.jl @@ -7,7 +7,7 @@ ==(geo1::T, geo2::T) where T <: TiltRegion = getfield.(Ref(geo1),fieldnames(T)) == getfield.(Ref(geo2),fieldnames(T)) -function isGeoRegion( +function isgeo( geo :: GeoRegion; path :: AbstractString = dirname(geo.path), throw :: Bool = true @@ -37,7 +37,7 @@ function isGeoRegion( end """ - isGeoRegion( + isID( geoID :: AbstractString; path :: AbstractString = homedir(), throw :: Bool = true diff --git a/src/georegions/remove.jl b/src/georegions/remove.jl index baf30942..198e2327 100644 --- a/src/georegions/remove.jl +++ b/src/georegions/remove.jl @@ -18,7 +18,7 @@ Keyword Arguments rm( geo :: GeoRegion; path :: AbstractString = dirname(geo.path) -) = if isGeoRegion(geo,path=path) +) = if isgeo(geo,path=path) rmID(geo.ID,path=path) end diff --git a/test/runtests.jl b/test/runtests.jl index 1da50f6f..6f6027a2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,9 +6,9 @@ using Test disable_logging(Logging.Warn) geo = RectRegion("TRP","GLB","Tropics",[30,-30,360,0]) - @test !isGeoRegion(geo,throw=false) + @test !isgeo(geo,throw=false) @test add(geo) === nothing - @test isGeoRegion(geo,throw=false) + @test isgeo(geo,throw=false) rm(geo) disable_logging(Logging.Debug) @@ -17,12 +17,12 @@ using Test geo1 = RectRegion("TRP","GLB","Tropics",[30,-30,360,0],save=true) geo2 = RectRegion("TRP_DTP","GLB","Deep Tropics",[10,-10,360,0],save=true) @test isID("TRP",throw=false) - @test isGeoRegion(geo1,throw=false) + @test isgeo(geo1,throw=false) @test rm(geo1) === nothing - @test !isGeoRegion(geo1,throw=false) - @test isGeoRegion(geo2,throw=false) + @test !isgeo(geo1,throw=false) + @test isgeo(geo2,throw=false) @test rmID("TRP_DTP") === nothing - @test !isGeoRegion(geo2,throw=false) + @test !isgeo(geo2,throw=false) disable_logging(Logging.Debug) end @@ -34,11 +34,11 @@ end geo1 = RectRegion("TRP","GLB","Tropics",[30,-30,360,0],path=pwd(),save=true) @test !isID("TRP",throw=false) @test isID("TRP",path=pwd(),throw=false) - @test isGeoRegion(geo1,throw=false) - @test !isGeoRegion(geo1,path=homedir(),throw=false) + @test isgeo(geo1,throw=false) + @test !isgeo(geo1,path=homedir(),throw=false) @test_throws "not a valid GeoRegion identifier" rm(geo1,path=homedir()) @test rm(geo1) === nothing - @test !isGeoRegion(geo1,throw=false) + @test !isgeo(geo1,throw=false) disable_logging(Logging.Debug) end @@ -63,7 +63,7 @@ end IDvec,_,_ = GeoRegions.listall() for ID in IDvec @test isID(ID,throw=false); - @test isGeoRegion(GeoRegion(ID),throw=false); + @test isgeo(GeoRegion(ID),throw=false); end disable_logging(Logging.Debug)