Skip to content

Commit ca62bee

Browse files
disable too strick data type check for now #22
1 parent f05454a commit ca62bee

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/catalog.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,14 @@ function Catalog(url::String; parent = nothing, limit = 1000)
118118
if !haskey(data,:id)
119119
throw(ArgumentError("The mandatory STAC id element is missing in $url"))
120120
end
121-
if haskey(data, :type)
122-
if data[:type] !== "Catalog"
123-
throw(ArgumentError("The provided STAC url is of type $(data[:type]). Expected a STAC url of type Catalog."))
124-
end
125-
end
121+
122+
# data[:type] is sometimes Collection
123+
# this need more debugging.
124+
# if haskey(data, :type)
125+
# if data[:type] !== "Catalog"
126+
# throw(ArgumentError("The provided STAC url is of type $(data[:type]). Expected a STAC url of type Catalog."))
127+
# end
128+
# end
126129

127130
assets = _assets(data)
128131

test/runtests.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ end
9090
@test length(STAC.CACHE) == 0
9191
end
9292

93-
@testset "Malformed URL" begin
94-
@test_throws ArgumentError STAC.Catalog("https://geoservice.dlr.de/eoc/ogc/stac/v1/collections/TDM_FNF_50")
95-
@test_throws ArgumentError STAC.Catalog("https://stac.core.eopf.eodc.eu/collections")
96-
end
93+
94+
# broken
95+
# @testset "Malformed URL" begin
96+
# @test_throws ArgumentError STAC.Catalog("https://geoservice.dlr.de/eoc/ogc/stac/v1/collections/TDM_FNF_50")
97+
# @test_throws ArgumentError STAC.Catalog("https://stac.core.eopf.eodc.eu/collections")
98+
# end
9799

98100

99101
@testset "search" begin

0 commit comments

Comments
 (0)