Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name = "IntervalSets"
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
version = "0.7.12"
version = "0.7.13"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[weakdeps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[extensions]
IntervalSetsPrintfExt = "Printf"
IntervalSetsRandomExt = "Random"
IntervalSetsRecipesBaseExt = "RecipesBase"
IntervalSetsStatisticsExt = "Statistics"
Expand All @@ -24,7 +22,6 @@ Aqua = "0.8"
Dates = "1"
OffsetArrays = "1"
Plots = "1"
Printf = "1"
Random = "1"
RecipesBase = "1"
Statistics = "1"
Expand All @@ -37,12 +34,11 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[targets]
test = ["Aqua", "Dates", "Test", "Plots", "Printf", "Random", "RecipesBase", "OffsetArrays", "Statistics", "Unitful"]
test = ["Aqua", "Dates", "Test", "Plots", "Random", "RecipesBase", "OffsetArrays", "Statistics", "Unitful"]
30 changes: 0 additions & 30 deletions ext/IntervalSetsPrintfExt.jl

This file was deleted.

10 changes: 4 additions & 6 deletions src/interval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ julia> 3 ± 2
±(x, y) = ClosedInterval(x - y, x + y)
±(x::CartesianIndex, y::CartesianIndex) = ClosedInterval(x-y, x+y)

_show_suffix(::ClosedInterval) = ""
_show_suffix(::OpenInterval) = " (open)"
_show_suffix(::Interval{:open,:closed}) = " (open-closed)"
_show_suffix(::Interval{:closed,:open}) = " (closed-open)"

show(io::IO, I::Interval) = print(io, leftendpoint(I), " .. ", rightendpoint(I), _show_suffix(I))
show(io::IO, I::ClosedInterval) = print(io, leftendpoint(I), " .. ", rightendpoint(I))
show(io::IO, I::OpenInterval) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (open)")
show(io::IO, I::Interval{:open,:closed}) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (open-closed)")
show(io::IO, I::Interval{:closed,:open}) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (closed-open)")

# The following are not typestable for mixed endpoint types
_left_intersect_type(::Type{Val{:open}}, ::Type{Val{L2}}, a1, a2) where L2 = a1 < a2 ? (a2,L2) : (a1,:open)
Expand Down
10 changes: 0 additions & 10 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Statistics: mean
using Random
using Unitful
using Plots
using Printf

import IntervalSets: Domain, endpoints, closedendpoints, TypedEndpointsInterval

Expand Down Expand Up @@ -444,15 +443,6 @@ struct IncompleteInterval <: AbstractInterval{Int} end
@test_throws MethodError 2 in I
end

VERSION ≥ v"1.9" && @testset "stringify" begin
@test string(0..1) == "0 .. 1"
@test string(iv"[0,1)") == "0 .. 1 (closed-open)"
@test @sprintf("%d", 0..1) == "0 .. 1"
@test @sprintf("%.2f", 0..1) == "0.00 .. 1.00"
@test @sprintf("%.2f", iv"[0,1)") == "0.00 .. 1.00 (closed-open)"
@test @sprintf("%.2f", 0u"m"..1u"m") == "0.00 m .. 1.00 m"
end

include("base_methods.jl")
include("setoperations.jl")
include("findall.jl")
Expand Down
Loading