Skip to content

Commit 0060fb7

Browse files
rafaqzasinghvi17
andauthored
use GeoInterface plot macros in extensions (#224)
Co-authored-by: Anshul Singhvi <[email protected]>
1 parent de77adb commit 0060fb7

File tree

9 files changed

+28
-25
lines changed

9 files changed

+28
-25
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
version:
17-
- '1.9'
17+
- 'lts'
1818
- '1'
1919
- 'nightly'
2020
os:

Project.toml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
name = "LibGEOS"
22
uuid = "a90b1aa1-3769-5649-ba7e-abc5a9d163eb"
33
license = "MIT"
4-
version = "0.9.4"
4+
version = "0.9.5"
55

66
[deps]
77
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
88
Extents = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
99
GEOS_jll = "d604d12d-fa86-5845-992e-78dc15976526"
1010
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
11-
GeoInterfaceMakie = "0edc0954-3250-4c18-859d-ec71c1660c08"
12-
GeoInterfaceRecipes = "0329782f-3d07-4b52-b9f6-d3137cf03c7a"
1311

1412
[weakdeps]
1513
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
14+
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1615

1716
[extensions]
1817
LibGEOSMakieExt = "Makie"
18+
LibGEOSRecipesBaseExt = "RecipesBase"
1919

2020
[compat]
2121
Aqua = "0.8"
2222
CEnum = "0.2, 0.3, 0.4, 0.5"
2323
Extents = "0.1.1"
2424
GEOS_jll = "3.13"
25-
GeoInterface = "1"
26-
GeoInterfaceMakie = "0.1"
27-
GeoInterfaceRecipes = "1"
28-
Makie = "0.20, 0.21, 0.22"
25+
GeoInterface = "1.5"
26+
Makie = "0.23, 0.24"
2927
Plots = "1"
3028
RecipesBase = "1"
3129
Test = "<0.0.1,1"
@@ -35,7 +33,6 @@ julia = "1.9"
3533
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3634
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
3735
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
38-
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
3936
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4037

4138
[targets]

ext/LibGEOSMakieExt.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module LibGEOSMakieExt
2-
using GeoInterfaceMakie: GeoInterfaceMakie
3-
using LibGEOS: LibGEOS
42

5-
GeoInterfaceMakie.@enable LibGEOS.AbstractGeometry
3+
import GeoInterface
4+
import LibGEOS
5+
import Makie
6+
7+
GeoInterface.@enable_makie Makie LibGEOS.AbstractGeometry
68

79
end

ext/LibGEOSRecipesBaseExt.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module LibGEOSRecipesBaseExt
2+
3+
import GeoInterface
4+
import LibGEOS
5+
import RecipesBase
6+
7+
GeoInterface.@enable_plots RecipesBase LibGEOS.AbstractGeometry
8+
9+
end

src/LibGEOS.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module LibGEOS
22

33
using GEOS_jll
44
using GeoInterface
5-
using GeoInterfaceRecipes
65
using Extents
76
using CEnum
87

src/geo_interface.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ GeoInterface.union(
309309
b::AbstractGeometry,
310310
) = union(a, b)
311311

312-
GeoInterfaceRecipes.@enable_geo_plots AbstractGeometry
313-
314312
# -----
315313
# LibGeos operations for any GeoInterface.jl compatible geometries
316314
# -----

test/runtests.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
using GeoInterface, GeoInterfaceRecipes, Extents
2-
using GeoInterface, Extents
3-
using Test, LibGEOS, RecipesBase
1+
using Extents
2+
using GeoInterface
3+
using LibGEOS
4+
using Test
45

56
import Aqua
67

@@ -17,11 +18,7 @@ end
1718

1819
@testset "LibGEOS" begin
1920
@testset "Aqua.jl" begin
20-
Aqua.test_all(
21-
LibGEOS;
22-
ambiguities = (exclude = [GeoInterfaceRecipes.RecipesBase.apply_recipe],),
23-
stale_deps = (ignore = [:GeoInterfaceMakie],),
24-
)
21+
Aqua.test_all(LibGEOS)
2522
end
2623

2724
include("test_geos_types.jl")

test/test_geo_interface.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ const LG = LibGEOS
6767
@test GeoInterface.testgeometry(mpt)
6868
@test GeoInterface.is3d(mpt) == false
6969
Plots.plot(mpt)
70-
Makie.plot(mpt)
70+
# Makie no longer plots GeometryBasics.MultiPoint
71+
@test_broken Makie.plot(mpt)
7172

7273

7374

test/test_geos_functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using Extents
1818
outputdim = 3,
1919
roundingprecision = 2,
2020
)
21-
@test_broken writegeom(p, writer) == "POINT (0.12 2)" # Broken in GEOS 3.13.0 https://github.com/libgeos/geos/issues/1198
21+
@test writegeom(p, writer) == "POINT (0.12 2)"
2222

2323
# round to 2 decimals and don't trim trailing zeros
2424
writer = LibGEOS.WKTWriter(

0 commit comments

Comments
 (0)