Skip to content

Commit

Permalink
Merge pull request #4 from PharmCat/dev
Browse files Browse the repository at this point in the history
dev 0.11.1
  • Loading branch information
PharmCat authored May 8, 2023
2 parents 31de92f + d32a9c4 commit a1b934d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MetidaBase"
uuid = "075456b7-4006-432f-9324-2f8453996c49"
authors = ["PharmCat <[email protected]> and contributors"]
version = "0.11.0"
version = "0.11.2"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -16,7 +16,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
CategoricalArrays = "0.9, 0.10"
CPUSummary = "0.1"
CPUSummary = "0.1, 0.2"
PrettyTables = "2"
Requires = "1"
SnoopPrecompile = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/MetidaBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module MetidaBase
import Tables: istable, columnaccess, columns, getcolumn, columnnames, schema, rowaccess, rows
import CPUSummary: num_cores

import Base: getindex, length, ht_keyindex, show, pushfirst!, iterate, size, findfirst
import Base: getindex, length, ht_keyindex, show, pushfirst!, iterate, size, findfirst, push!, append!

include("abstracttype.jl")
include("m_tables.jl")
Expand Down
24 changes: 14 additions & 10 deletions src/dataset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ function Base.map(f, d::DataSet)
DataSet(map(f, getdata(d)))
end

function Base.push!(d::DataSet, el)
push!(getdata(d), el)
end

function Base.append!(d::DataSet, d2::DataSet)
append!(getdata(d), getdata(d2))
end

function Base.append!(d::DataSet, el)
append!(getdata(d), el)
end


################################################################################
# BASE
################################################################################
Expand Down Expand Up @@ -169,16 +182,7 @@ function uniqueidlist(d::DataSet{T}, list::Symbol) where T <: AbstractIdData
end
dl
end
#=
function uniqueidlist(d::DataSet{T}) where T <: AbstractIdData
dl = Vector{Dict}(undef, 0)
for i in d
id = getid(i)
if id ∉ dl push!(dl, id) end
end
dl
end
=#

function uniqueidlist(::DataSet{T}, ::Nothing) where T <: AbstractIdData
nothing
end
Expand Down
1 change: 1 addition & 0 deletions src/typedtables.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# TypedTables.jl interface

function TypedTables.Table(obj::AbstractDataSet; kwargs...)
TypedTables.Table(metida_table_(obj; kwargs...))
end
Expand Down
1 change: 1 addition & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# MetidaFreq.jl

struct Proportion <: AbstractData
x::Int
n::Int
Expand Down

0 comments on commit a1b934d

Please sign in to comment.