Skip to content

Commit

Permalink
Get rid of extra type for AbstractRange (#9)
Browse files Browse the repository at this point in the history
* Get rid of extra type for AbstractRange: It's useful to have MetaUnitRange for axes but we don't really need anything beyond the MetaArray otherwise
* fall back to getmeta for more stuff
  • Loading branch information
Tokazama authored Oct 24, 2021
1 parent 5ccc037 commit 4625ec9
Show file tree
Hide file tree
Showing 9 changed files with 420 additions and 504 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Metadata"
uuid = "4fb893c1-3164-4f58-823a-cb4c64eabb4f"
authors = ["Zachary P. Christensen <[email protected]>"]
version = "0.2.9"
version = "0.3"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
10 changes: 2 additions & 8 deletions src/Metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ const METADATA_TYPES = Union{<:AbstractDict{String,Any},<:AbstractDict{Symbol,An
const MDict = Union{Dict{Symbol,Any},Dict{String,Any}}

include("utils.jl")
include("metastruct.jl")
include("types.jl")
include("methods.jl")
include("metaarray.jl")
include("ranges.jl")
include("io.jl")

for T in (MetaIO, MetaStruct, MetaArray, MetaRange, MetaUnitRange)
for T in (MetaIO, MetaStruct, MetaArray, MetaUnitRange)
@eval begin
@inline function Metadata.metadata(x::$T; dim=nothing, kwargs...)
if dim === nothing
Expand All @@ -53,8 +50,6 @@ end

@defproperties MetaArray

@defproperties MetaRange

@defproperties MetaUnitRange

@defproperties MetaStruct
Expand Down Expand Up @@ -105,4 +100,3 @@ function test_wrapper(::Type{T}, data) where {T}
end

end # module

46 changes: 0 additions & 46 deletions src/io.jl

This file was deleted.

161 changes: 0 additions & 161 deletions src/metaarray.jl

This file was deleted.

34 changes: 0 additions & 34 deletions src/metastruct.jl

This file was deleted.

Loading

0 comments on commit 4625ec9

Please sign in to comment.