Skip to content

Commit

Permalink
mt schema
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Aug 10, 2021
1 parent 8d205d7 commit 266367d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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
#@reexport using StatsModels

import StatsModels: StatisticalModel
import Tables: istable, columnaccess, columns, getcolumn, columnnames
import Tables: istable, columnaccess, columns, getcolumn, columnnames, schema, rowaccess, rows

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

Expand Down
2 changes: 2 additions & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Tables.getcolumn(t::MetidaTableRow, nm::Symbol) = getfield(t, :source)[getfield(

Tables.columnnames(t::MetidaTableRow) = names(getfield(t, :source))

Tables.schema(t::MetidaTable) = Tables.Schema(names(t), eltype(y) for y in t.table)

################################################################################
# BASE
################################################################################
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,6 @@ using Test, DataFrames
MetidaBase.varfromcv(0.4) 0.1484200051182734
MetidaBase.cvfromvar(0.4) 0.7013021443295824
MetidaBase.cvfromsd(0.4) 0.41654636115540644

smt = MetidaBase.Tables.schema(mt)
end

2 comments on commit 266367d

@PharmCat
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/42674

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.2 -m "<description of version>" 266367d873da59e1240dca2dc7a4730f36636a18
git push origin v0.3.2

Please sign in to comment.