Skip to content

Commit

Permalink
Merge pull request #171 from JuliaAI/rm-persistence-diagram-scitype-o…
Browse files Browse the repository at this point in the history
…verloading

rm persistence diagram scitype overloading
  • Loading branch information
ablaom authored Oct 11, 2021
2 parents 2f374f0 + 41366c1 commit fb66054
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
CorpusLoaders = "214a0ac2-f95b-54f7-a80b-442ed9c2c9e8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
PersistenceDiagramsBase = "b1ad91c1-539c-4ace-90bd-ea06abc420fa"
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161"
Expand All @@ -20,7 +19,6 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
CategoricalArrays = "0.8, 0.9, 0.10"
ColorTypes = "0.9, 0.10, 0.11"
Distributions = "0.25.1"
PersistenceDiagramsBase = "0.1"
PrettyTables = "1"
Reexport = "1.2"
ScientificTypesBase = "2.2"
Expand Down
1 change: 0 additions & 1 deletion src/ScientificTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ using Reexport
using Tables
using CategoricalArrays
using ColorTypes
using PersistenceDiagramsBase
using CorpusLoaders
using PrettyTables
using Dates
Expand Down
4 changes: 2 additions & 2 deletions src/convention/scitype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ColorImage{size(img)...}

# Persistence diagrams

ST.scitype(::PersistenceDiagram, ::DefaultConvention) = PersistenceDiagram
# ST.scitype(::PersistenceDiagram, ::DefaultConvention) = PersistenceDiagram

# CategoricalArray scitype

Expand Down Expand Up @@ -76,4 +76,4 @@ ST.Scitype(::Type{<:TimeType}, ::DefaultConvention) = ScientificTimeTy
ST.Scitype(::Type{<:Date}, ::DefaultConvention) = ScientificDate
ST.Scitype(::Type{<:Time}, ::DefaultConvention) = ScientificTime
ST.Scitype(::Type{<:DateTime}, ::DefaultConvention) = ScientificDateTime
ST.Scitype(::Type{<:PersistenceDiagram}, ::DefaultConvention) = PersistenceDiagram
# ST.Scitype(::Type{<:PersistenceDiagram}, ::DefaultConvention) = PersistenceDiagram
12 changes: 6 additions & 6 deletions test/basic_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ end
@test scitype(gray_image) == GrayImage{10,20}
end

@testset "PersistenceDiagrams" begin
diagram = PersistenceDiagram([(1, Inf), (2, 3)], dim=0)
@test scitype(diagram) == PersistenceDiagram
# @testset "PersistenceDiagrams" begin
# diagram = PersistenceDiagram([(1, Inf), (2, 3)], dim=0)
# @test scitype(diagram) == PersistenceDiagram

diagrams = [diagram, diagram, diagram]
@test scitype(diagrams) == Vec{PersistenceDiagram}
end
# diagrams = [diagram, diagram, diagram]
# @test scitype(diagrams) == Vec{PersistenceDiagram}
# end

@testset "temporal types" begin
d = Date(2020, 4, 21)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test, ScientificTypes, ScientificTypesBase, Random
using Tables, CategoricalArrays, DataFrames
using ColorTypes, PersistenceDiagramsBase, CorpusLoaders
using ColorTypes, CorpusLoaders
using Dates
# using CSV # dropped until julia release new LTS as issue for 1.0
import Distributions
Expand Down

0 comments on commit fb66054

Please sign in to comment.